Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReadStoreEmptyErr error = errors.New("error while reading from store, store is empty")
View Source
var WriteStoreClosedErr error = errors.New("error while writing to store, store is closed")
View Source
var WriteStoreFullErr error = errors.New("error while writing to store, store is full")
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface { // Read returns upto N(size) messages from the persisted store Read(size int64) ([]*isb.Message, bool, error) // Write writes message to persistence store Write(msg *isb.Message) 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 StoreOption ¶
type StoreOption func(options *StoreOptions) error
func WithMaxBufferSize ¶
func WithMaxBufferSize(size int64) StoreOption
WithMaxBufferSize sets buffer max size option
func WithPbqStoreType ¶
func WithPbqStoreType(storeType dfv1.StoreType) StoreOption
WithPbqStoreType sets store type option
func WithStoreSize ¶
func WithStoreSize(size int64) StoreOption
WithStoreSize sets store size option
func WithSyncDuration ¶
func WithSyncDuration(maxDuration time.Duration) StoreOption
WithSyncDuration sets sync duration option
type StoreOptions ¶
type StoreOptions struct {
// contains filtered or unexported fields
}
func DefaultOptions ¶
func DefaultOptions() *StoreOptions
func (*StoreOptions) PbqStoreType ¶
func (o *StoreOptions) PbqStoreType() dfv1.StoreType
func (*StoreOptions) StoreSize ¶
func (o *StoreOptions) StoreSize() int64
Click to show internal directories.
Click to hide internal directories.