Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReadStoreEmptyErr error = errors.New("error reading, store is empty")
View Source
var WriteStoreClosedErr error = errors.New("error writing, store is closed")
View Source
var WriteStoreFullErr error = errors.New("error writing, store is full")
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface {
// Read returns upto N(size) messages from the persisted store, it also returns
// a boolean flag to indicate if the end of file has been reached.
Read(size int64) ([]*isb.ReadMessage, bool, error)
// Write writes message to persistence store
Write(msg *isb.ReadMessage) error
// Close closes store
Close() error
// GC does garbage collection and deletes all the messages that are persisted
GC() error
}
Store provides methods to read, write and delete data from the store.
type StoreProvider ¶ added in v0.6.4
type StoreProvider interface {
// CreateStore returns a new store instance.
CreateStore(context.Context, partition.ID) (Store, error)
// DiscoverPartitions discovers all the managed partitions.
DiscoverPartitions(context.Context) ([]partition.ID, error)
}
StoreProvider defines the functions for store implementation
Click to show internal directories.
Click to hide internal directories.