Documentation ¶
Index ¶
- Variables
- type Partition
- func (t *Partition) BatchPutMessages(msgs []*sgproto.Message) error
- func (p *Partition) Close() error
- func (p *Partition) ForRange(min, max sandflake.ID, fn func(msg *sgproto.Message) error) error
- func (s *Partition) GetMessage(offset sandflake.ID, k, suffix []byte) (*sgproto.Message, error)
- func (t *Partition) HasKey(key, clusterKey []byte) (bool, error)
- func (t *Partition) InitStore(basePath string) error
- func (p *Partition) Iter() storage.MessageIterator
- func (p *Partition) LastMessage() (*sgproto.Message, error)
- func (p *Partition) LastWALEntry() []byte
- func (t *Partition) NextID() sandflake.ID
- func (t *Partition) PutMessage(msg *sgproto.Message) error
- func (p *Partition) RangeFromWAL(min []byte, fn func(*sgproto.Message) error) error
- func (t *Partition) String() string
- type Topic
- func (t *Topic) BatchPutMessages(msgs []*sgproto.Message) error
- func (t *Topic) ChoosePartition(msg *sgproto.Message) *Partition
- func (t *Topic) ChoosePartitionForKey(key []byte) *Partition
- func (t *Topic) ChooseRandomPartition() *Partition
- func (t *Topic) Close() error
- func (t *Topic) ForEach(fn func(msg *sgproto.Message) error) error
- func (t *Topic) ForRange(min, max sandflake.ID, fn func(msg *sgproto.Message) error) error
- func (t *Topic) GetPartition(id string) *Partition
- func (t *Topic) InitStore(basePath string) error
- func (t *Topic) ListPartitions() []*Partition
- func (t *Topic) PutMessage(partition string, msg *sgproto.Message) error
- func (t *Topic) Validate() error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoKeySet = errors.New("ErrNoKeySet")
)
Functions ¶
This section is empty.
Types ¶
type Partition ¶
func (*Partition) BatchPutMessages ¶
func (*Partition) GetMessage ¶
func (*Partition) Iter ¶
func (p *Partition) Iter() storage.MessageIterator
func (*Partition) LastWALEntry ¶
func (*Partition) RangeFromWAL ¶
type Topic ¶
type Topic struct { Name string Kind sgproto.TopicKind ReplicationFactor int NumPartitions int Partitions []*Partition StorageDriver sgproto.StorageDriver // contains filtered or unexported fields }
func (*Topic) ChoosePartitionForKey ¶
func (*Topic) ChooseRandomPartition ¶ added in v0.1.7
func (*Topic) GetPartition ¶
func (*Topic) ListPartitions ¶
Click to show internal directories.
Click to hide internal directories.