Documentation ¶
Index ¶
- Variables
- type BatchInput
- type BatchOutput
- type BoltStore
- func (b *BoltStore) Close() error
- func (b *BoltStore) CreateStream(config *pb.StreamConfig) error
- func (b *BoltStore) DeleteStream(id string) error
- func (b *BoltStore) Exists(id string) bool
- func (b *BoltStore) GetRange(id string, shardID string, from uint64, buff []*pb.StoredMessage) (int, uint64, error)
- func (b *BoltStore) GetStream(id string) *pb.StreamConfig
- func (b *BoltStore) GetStreamStatistics(id string) (*pb.StreamStatistics, error)
- func (b *BoltStore) ListStreams() []*pb.StreamConfig
- func (b *BoltStore) Put(stream string, shardID string, index uint64, payload []byte) error
- func (b *BoltStore) Restore(r io.Reader) error
- func (b *BoltStore) WriteTo(out io.Writer) error
- type Options
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyNotFound is an error indicating a given key does not exist ErrKeyNotFound = errors.New("not found") // ErrStreamNotFound is an error indicating a given stream does not exist ErrStreamNotFound = errors.New("stream not found") // ErrShardNotFound is an error indicating a given shard does not exist ErrShardNotFound = errors.New("shard not found") // ErrIndexOutdated is an error indicating that the supplied index is outdated ErrIndexOutdated = errors.New("index outdated") )
Functions ¶
This section is empty.
Types ¶
type BatchInput ¶
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
func (*BoltStore) CreateStream ¶
func (b *BoltStore) CreateStream(config *pb.StreamConfig) error
func (*BoltStore) DeleteStream ¶
func (*BoltStore) GetStreamStatistics ¶
func (b *BoltStore) GetStreamStatistics(id string) (*pb.StreamStatistics, error)
func (*BoltStore) ListStreams ¶
func (b *BoltStore) ListStreams() []*pb.StreamConfig
type Options ¶
type Options struct { // Path is the file path to the BoltDB to use Path string // BoltOptions contains any specific BoltDB options you might // want to specify [e.g. open timeout] BoltOptions *bolt.Options // NoSync causes the database to skip fsync calls after each // write to the log. This is unsafe, so it should be used // with caution. NoSync bool }
Click to show internal directories.
Click to hide internal directories.