Documentation ¶
Index ¶
- Variables
- func GenChunkCommonKey(id bnapi.ChunkId) []byte
- func GenShardKey(id *core.ShardKey) []byte
- func NewChunkData(ctx context.Context, vm core.VuidMeta, file string, conf *core.Config, ...) (cd *datafile, err error)
- func NewChunkMeta(ctx context.Context, config *core.Config, meta core.VuidMeta, ...) (cm *metafile, err error)
- func NewReplicateStg(master core.Storage, slave core.Storage, notify notifyFunc) (replStg core.Storage)
- func NewStorage(meta core.MetaHandler, data core.DataHandler) core.Storage
- func NewTinyFileStg(underlying core.Storage, size int) core.Storage
- type ChunkHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrShardOffNotAlignment = errors.New("chunkdata: shard offset not alignment") ErrShardHeaderNotMatch = errors.New("chunkdata: shard header not match") ErrChunkDataMagic = errors.New("chunkdata: magic not match") ErrChunkHeaderBufSize = errors.New("chunkdata: buf size not match") )
View Source
var ( ErrShardBufferSize = errors.New("shard buffer size not match") ErrShardKeyPrefix = errors.New("shard key error prefix") )
Functions ¶
func GenChunkCommonKey ¶
func GenShardKey ¶
func NewChunkData ¶
func NewChunkMeta ¶
func NewReplicateStg ¶
func NewStorage ¶
func NewStorage(meta core.MetaHandler, data core.DataHandler) core.Storage
Types ¶
type ChunkHeader ¶
type ChunkHeader struct {
// contains filtered or unexported fields
}
func (*ChunkHeader) Marshal ¶
func (hdr *ChunkHeader) Marshal() ([]byte, error)
func (*ChunkHeader) String ¶
func (hdr *ChunkHeader) String() string
func (*ChunkHeader) Unmarshal ¶
func (hdr *ChunkHeader) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.