Documentation ¶
Index ¶
- Variables
- func BeforeBound(str string, strBound ...string) bool
- func Generate(s string) []string
- func Perm(a []rune, f func([]rune))
- type Copy
- type DataOp
- func (*DataOp) Descriptor() ([]byte, []int)
- func (m *DataOp) GetDataRefs() []*chunk.DataRef
- func (m *DataOp) GetOp() Op
- func (m *DataOp) GetTags() []*Tag
- func (m *DataOp) Marshal() (dAtA []byte, err error)
- func (m *DataOp) MarshalTo(dAtA []byte) (int, error)
- func (m *DataOp) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DataOp) ProtoMessage()
- func (m *DataOp) Reset()
- func (m *DataOp) Size() (n int)
- func (m *DataOp) String() string
- func (m *DataOp) Unmarshal(dAtA []byte) error
- func (m *DataOp) XXX_DiscardUnknown()
- func (m *DataOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DataOp) XXX_Merge(src proto.Message)
- func (m *DataOp) XXX_Size() int
- func (m *DataOp) XXX_Unmarshal(b []byte) error
- type Header
- type Index
- func (*Index) Descriptor() ([]byte, []int)
- func (m *Index) GetDataOp() *DataOp
- func (m *Index) GetLastPathChunk() string
- func (m *Index) GetRange() *Range
- func (m *Index) GetSizeBytes() int64
- func (m *Index) Marshal() (dAtA []byte, err error)
- func (m *Index) MarshalTo(dAtA []byte) (int, error)
- func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Index) ProtoMessage()
- func (m *Index) Reset()
- func (m *Index) Size() (n int)
- func (m *Index) String() string
- func (m *Index) Unmarshal(dAtA []byte) error
- func (m *Index) XXX_DiscardUnknown()
- func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Index) XXX_Merge(src proto.Message)
- func (m *Index) XXX_Size() int
- func (m *Index) XXX_Unmarshal(b []byte) error
- type Op
- type Option
- type PathRange
- type Range
- func (*Range) Descriptor() ([]byte, []int)
- func (m *Range) GetLastPath() string
- func (m *Range) GetOffset() int64
- func (m *Range) Marshal() (dAtA []byte, err error)
- func (m *Range) MarshalTo(dAtA []byte) (int, error)
- func (m *Range) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Range) ProtoMessage()
- func (m *Range) Reset()
- func (m *Range) Size() (n int)
- func (m *Range) String() string
- func (m *Range) Unmarshal(dAtA []byte) error
- func (m *Range) XXX_DiscardUnknown()
- func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Range) XXX_Merge(src proto.Message)
- func (m *Range) XXX_Size() int
- func (m *Range) XXX_Unmarshal(b []byte) error
- type Reader
- type Tag
- func (*Tag) Descriptor() ([]byte, []int)
- func (m *Tag) GetId() string
- func (m *Tag) GetSizeBytes() int64
- func (m *Tag) Marshal() (dAtA []byte, err error)
- func (m *Tag) MarshalTo(dAtA []byte) (int, error)
- func (m *Tag) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Tag) ProtoMessage()
- func (m *Tag) Reset()
- func (m *Tag) Size() (n int)
- func (m *Tag) String() string
- func (m *Tag) Unmarshal(dAtA []byte) error
- func (m *Tag) XXX_DiscardUnknown()
- func (m *Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tag) XXX_Merge(src proto.Message)
- func (m *Tag) XXX_Size() int
- func (m *Tag) XXX_Unmarshal(b []byte) error
- type Writer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupIndex = fmt.Errorf("proto: unexpected end of group") )
var Op_name = map[int32]string{
0: "APPEND",
1: "OVERWRITE",
2: "DELETE",
}
var Op_value = map[string]int32{
"APPEND": 0,
"OVERWRITE": 1,
"DELETE": 2,
}
Functions ¶
func BeforeBound ¶ added in v1.9.5
BeforeBound checks if the passed in string is before the string bound (exclusive). The string bound is optional, so if no string bound is passed then it returns true.
Types ¶
type Copy ¶ added in v1.9.5
type Copy struct {
// contains filtered or unexported fields
}
Copy is the basic data structure to represent a copy of data from a reader to a writer.
type DataOp ¶
type DataOp struct { DataRefs []*chunk.DataRef `protobuf:"bytes,1,rep,name=data_refs,json=dataRefs,proto3" json:"data_refs,omitempty"` Op Op `protobuf:"varint,2,opt,name=op,proto3,enum=index.Op" json:"op,omitempty"` Tags []*Tag `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
DataOp is a sequence of data references and an operation associated with the referenced data. Tags map identifiers to data in the resulting byte stream.
func (*DataOp) Descriptor ¶
func (*DataOp) GetDataRefs ¶
func (*DataOp) MarshalToSizedBuffer ¶
func (*DataOp) ProtoMessage ¶
func (*DataOp) ProtoMessage()
func (*DataOp) XXX_DiscardUnknown ¶
func (m *DataOp) XXX_DiscardUnknown()
func (*DataOp) XXX_Marshal ¶
func (*DataOp) XXX_Unmarshal ¶
type Index ¶
type Index struct { Range *Range `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` DataOp *DataOp `protobuf:"bytes,2,opt,name=data_op,json=dataOp,proto3" json:"data_op,omitempty"` // Size of the content being indexed (does not include headers). SizeBytes int64 `protobuf:"varint,3,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` LastPathChunk string `protobuf:"bytes,4,opt,name=last_path_chunk,json=lastPathChunk,proto3" json:"last_path_chunk,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Index stores an index to and metadata about a tar stream.
func (*Index) Descriptor ¶
func (*Index) GetLastPathChunk ¶ added in v1.9.5
func (*Index) GetSizeBytes ¶
func (*Index) ProtoMessage ¶
func (*Index) ProtoMessage()
func (*Index) XXX_DiscardUnknown ¶
func (m *Index) XXX_DiscardUnknown()
func (*Index) XXX_Marshal ¶
func (*Index) XXX_Unmarshal ¶
type Op ¶
type Op int32
Op is the set of operations that can be associated with data.
func (Op) EnumDescriptor ¶
type Option ¶ added in v1.9.6
type Option func(r *Reader)
Option configures an index reader.
func WithPrefix ¶ added in v1.9.6
WithPrefix sets a prefix filter for the read.
type PathRange ¶ added in v1.9.6
type PathRange struct {
Lower, Upper string
}
PathRange is a range of paths. The range is inclusive: [Lower, Upper].
type Range ¶
type Range struct { Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` LastPath string `protobuf:"bytes,2,opt,name=last_path,json=lastPath,proto3" json:"last_path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Range) Descriptor ¶
func (*Range) GetLastPath ¶
func (*Range) ProtoMessage ¶
func (*Range) ProtoMessage()
func (*Range) XXX_DiscardUnknown ¶
func (m *Range) XXX_DiscardUnknown()
func (*Range) XXX_Marshal ¶
func (*Range) XXX_Unmarshal ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is used for reading a multi-level index.
func NewReader ¶
func NewReader(ctx context.Context, objC obj.Client, chunks *chunk.Storage, path string, opts ...Option) *Reader
NewReader create a new Reader.
type Tag ¶
type Tag struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Tag) Descriptor ¶
func (*Tag) GetSizeBytes ¶
func (*Tag) ProtoMessage ¶
func (*Tag) ProtoMessage()
func (*Tag) XXX_DiscardUnknown ¶
func (m *Tag) XXX_DiscardUnknown()
func (*Tag) XXX_Unmarshal ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is used for creating a multi-level index into a serialized FileSet. Each index level consists of compressed tar stream chunks. Each index tar entry has the full index in the content section.
func (*Writer) WriteCopyFunc ¶ added in v1.9.5
WriteCopyFunc executes a function for copying data to the writer.
func (*Writer) WriteHeaders ¶ added in v1.9.5
WriteHeaders writes a set of Header to the index.