mirror of
https://github.com/hanzoai/s3.git
synced 2026-10-30 14:59:09 +00:00
hanzoai/s3 was an AGPL-3.0 MinIO fork whose network-copyleft blocks embedding
and reselling as a managed service. Replace it wholesale with a fork of
SeaweedFS (github.com/seaweedfs/seaweedfs, Apache-2.0, Go) which ships a
built-in S3 gateway + Filer.
- License: AGPL-3.0 -> Apache-2.0 (upstream LICENSE kept verbatim, incl.
"Copyright 2025 Chris Lu"); NOTICE added crediting SeaweedFS. No AGPL/BUSL/
SSPL/GPL or enterprise ("ee") files remain.
- Module: go.mod path set to github.com/hanzoai/s3 with a self-replace
(replace github.com/seaweedfs/seaweedfs => ./) so the ~1800 internal Go files
keep their upstream import paths with zero churn. Internal identifiers and
import paths are intentionally NOT renamed.
- CLI rebrand: the binary is built as `s3` (was `weed`); root usage, per-command
help/usage/flag strings, shell autocomplete program name, and the product name
in CLI output now read "Hanzo S3" / `s3`. Users never see `weed`.
(e.g. `s3 server`, `s3 filer`, `s3 master`, `s3 volume`, `s3 s3`, `s3 mount`.)
- Build: `make` (or `go build -o s3 ./weed`) builds the `s3` binary green;
`cmd/weed-db` and `cmd/weed-sql` also build; `go vet ./weed/command/` clean.
- README/LLM.md rewritten for Hanzo S3; AGENTS.md/CLAUDE.md symlinks preserved.
- Dropped a 33MB prebuilt Mach-O `stress` binary upstream had committed; `.gitignore`
updated to ignore the `s3` build output.
188 lines
4.8 KiB
Go
188 lines
4.8 KiB
Go
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
|
|
|
package message_fbs
|
|
|
|
import (
|
|
flatbuffers "github.com/google/flatbuffers/go"
|
|
)
|
|
|
|
type MessageBatch struct {
|
|
_tab flatbuffers.Table
|
|
}
|
|
|
|
func GetRootAsMessageBatch(buf []byte, offset flatbuffers.UOffsetT) *MessageBatch {
|
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
|
x := &MessageBatch{}
|
|
x.Init(buf, n+offset)
|
|
return x
|
|
}
|
|
|
|
func GetSizePrefixedRootAsMessageBatch(buf []byte, offset flatbuffers.UOffsetT) *MessageBatch {
|
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
|
x := &MessageBatch{}
|
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
|
return x
|
|
}
|
|
|
|
func (rcv *MessageBatch) Init(buf []byte, i flatbuffers.UOffsetT) {
|
|
rcv._tab.Bytes = buf
|
|
rcv._tab.Pos = i
|
|
}
|
|
|
|
func (rcv *MessageBatch) Table() flatbuffers.Table {
|
|
return rcv._tab
|
|
}
|
|
|
|
func (rcv *MessageBatch) ProducerId() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateProducerId(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(4, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) ProducerEpoch() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateProducerEpoch(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(6, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) SegmentId() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateSegmentId(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(8, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) Flags() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateFlags(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(10, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) SegmentSeqBase() int64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateSegmentSeqBase(n int64) bool {
|
|
return rcv._tab.MutateInt64Slot(12, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) SegmentSeqMaxDelta() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateSegmentSeqMaxDelta(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(14, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) TsMsBase() int64 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(16))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt64(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateTsMsBase(n int64) bool {
|
|
return rcv._tab.MutateInt64Slot(16, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) TsMsMaxDelta() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(18))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *MessageBatch) MutateTsMsMaxDelta(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(18, n)
|
|
}
|
|
|
|
func (rcv *MessageBatch) Messages(obj *Message, j int) bool {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(20))
|
|
if o != 0 {
|
|
x := rcv._tab.Vector(o)
|
|
x += flatbuffers.UOffsetT(j) * 4
|
|
x = rcv._tab.Indirect(x)
|
|
obj.Init(rcv._tab.Bytes, x)
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (rcv *MessageBatch) MessagesLength() int {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(20))
|
|
if o != 0 {
|
|
return rcv._tab.VectorLen(o)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func MessageBatchStart(builder *flatbuffers.Builder) {
|
|
builder.StartObject(9)
|
|
}
|
|
func MessageBatchAddProducerId(builder *flatbuffers.Builder, producerId int32) {
|
|
builder.PrependInt32Slot(0, producerId, 0)
|
|
}
|
|
func MessageBatchAddProducerEpoch(builder *flatbuffers.Builder, producerEpoch int32) {
|
|
builder.PrependInt32Slot(1, producerEpoch, 0)
|
|
}
|
|
func MessageBatchAddSegmentId(builder *flatbuffers.Builder, segmentId int32) {
|
|
builder.PrependInt32Slot(2, segmentId, 0)
|
|
}
|
|
func MessageBatchAddFlags(builder *flatbuffers.Builder, flags int32) {
|
|
builder.PrependInt32Slot(3, flags, 0)
|
|
}
|
|
func MessageBatchAddSegmentSeqBase(builder *flatbuffers.Builder, segmentSeqBase int64) {
|
|
builder.PrependInt64Slot(4, segmentSeqBase, 0)
|
|
}
|
|
func MessageBatchAddSegmentSeqMaxDelta(builder *flatbuffers.Builder, segmentSeqMaxDelta int32) {
|
|
builder.PrependInt32Slot(5, segmentSeqMaxDelta, 0)
|
|
}
|
|
func MessageBatchAddTsMsBase(builder *flatbuffers.Builder, tsMsBase int64) {
|
|
builder.PrependInt64Slot(6, tsMsBase, 0)
|
|
}
|
|
func MessageBatchAddTsMsMaxDelta(builder *flatbuffers.Builder, tsMsMaxDelta int32) {
|
|
builder.PrependInt32Slot(7, tsMsMaxDelta, 0)
|
|
}
|
|
func MessageBatchAddMessages(builder *flatbuffers.Builder, messages flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(8, flatbuffers.UOffsetT(messages), 0)
|
|
}
|
|
func MessageBatchStartMessagesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
|
|
return builder.StartVector(4, numElems, 4)
|
|
}
|
|
func MessageBatchEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
|
return builder.EndObject()
|
|
}
|