Documentation
¶
Index ¶
- Variables
- func New(db *badger.DB) *store
- type ApplyResponse
- type MockStore
- func (_mock *MockStore) Apply(l *raft.Log) any
- func (_mock *MockStore) CommitGroupPosition(stream string, group string, parition int64, position string) error
- func (_mock *MockStore) DeleteStream(name string) error
- func (_m *MockStore) EXPECT() *MockStore_Expecter
- func (_mock *MockStore) ExtendLease(worker *kayakv1.Worker, expires time.Duration) error
- func (_mock *MockStore) GetGroupInformation(streamName string, groupName string) (*kayakv1.Group, error)
- func (_mock *MockStore) GetGroupPosition(stream string, group string, partition int64) (string, error)
- func (_mock *MockStore) GetPartitionAssignment(stream string, group string, partition int64) (string, error)
- func (_mock *MockStore) GetPartitionAssignments(stream string, group string) (map[int64]*kayakv1.PartitionAssignment, error)
- func (_mock *MockStore) GetRecords(streamName string, partition int64, startPosition string, limit int) ([]*kayakv1.Record, error)
- func (_mock *MockStore) GetStream(name string) (*kayakv1.Stream, error)
- func (_mock *MockStore) GetStreamStats(name string) (*kayakv1.StreamStats, error)
- func (_mock *MockStore) GetStreams() ([]*kayakv1.Stream, error)
- func (_mock *MockStore) HasLease(worker *kayakv1.Worker) error
- func (_mock *MockStore) PutRecords(streamName string, records ...*kayakv1.Record) error
- func (_mock *MockStore) PutStream(stream *kayakv1.Stream) error
- func (_mock *MockStore) RemoveLease(worker *kayakv1.Worker) error
- func (_mock *MockStore) Restore(snapshot io.ReadCloser) error
- func (_mock *MockStore) Snapshot() (raft.FSMSnapshot, error)
- type MockStore_Apply_Call
- type MockStore_CommitGroupPosition_Call
- func (_c *MockStore_CommitGroupPosition_Call) Return(err error) *MockStore_CommitGroupPosition_Call
- func (_c *MockStore_CommitGroupPosition_Call) Run(run func(stream string, group string, parition int64, position string)) *MockStore_CommitGroupPosition_Call
- func (_c *MockStore_CommitGroupPosition_Call) RunAndReturn(run func(stream string, group string, parition int64, position string) error) *MockStore_CommitGroupPosition_Call
- type MockStore_DeleteStream_Call
- type MockStore_Expecter
- func (_e *MockStore_Expecter) Apply(l interface{}) *MockStore_Apply_Call
- func (_e *MockStore_Expecter) CommitGroupPosition(stream interface{}, group interface{}, parition interface{}, ...) *MockStore_CommitGroupPosition_Call
- func (_e *MockStore_Expecter) DeleteStream(name interface{}) *MockStore_DeleteStream_Call
- func (_e *MockStore_Expecter) ExtendLease(worker interface{}, expires interface{}) *MockStore_ExtendLease_Call
- func (_e *MockStore_Expecter) GetGroupInformation(streamName interface{}, groupName interface{}) *MockStore_GetGroupInformation_Call
- func (_e *MockStore_Expecter) GetGroupPosition(stream interface{}, group interface{}, partition interface{}) *MockStore_GetGroupPosition_Call
- func (_e *MockStore_Expecter) GetPartitionAssignment(stream interface{}, group interface{}, partition interface{}) *MockStore_GetPartitionAssignment_Call
- func (_e *MockStore_Expecter) GetPartitionAssignments(stream interface{}, group interface{}) *MockStore_GetPartitionAssignments_Call
- func (_e *MockStore_Expecter) GetRecords(streamName interface{}, partition interface{}, startPosition interface{}, ...) *MockStore_GetRecords_Call
- func (_e *MockStore_Expecter) GetStream(name interface{}) *MockStore_GetStream_Call
- func (_e *MockStore_Expecter) GetStreamStats(name interface{}) *MockStore_GetStreamStats_Call
- func (_e *MockStore_Expecter) GetStreams() *MockStore_GetStreams_Call
- func (_e *MockStore_Expecter) HasLease(worker interface{}) *MockStore_HasLease_Call
- func (_e *MockStore_Expecter) PutRecords(streamName interface{}, records ...interface{}) *MockStore_PutRecords_Call
- func (_e *MockStore_Expecter) PutStream(stream interface{}) *MockStore_PutStream_Call
- func (_e *MockStore_Expecter) RemoveLease(worker interface{}) *MockStore_RemoveLease_Call
- func (_e *MockStore_Expecter) Restore(snapshot interface{}) *MockStore_Restore_Call
- func (_e *MockStore_Expecter) Snapshot() *MockStore_Snapshot_Call
- type MockStore_ExtendLease_Call
- func (_c *MockStore_ExtendLease_Call) Return(err error) *MockStore_ExtendLease_Call
- func (_c *MockStore_ExtendLease_Call) Run(run func(worker *kayakv1.Worker, expires time.Duration)) *MockStore_ExtendLease_Call
- func (_c *MockStore_ExtendLease_Call) RunAndReturn(run func(worker *kayakv1.Worker, expires time.Duration) error) *MockStore_ExtendLease_Call
- type MockStore_GetGroupInformation_Call
- func (_c *MockStore_GetGroupInformation_Call) Return(group *kayakv1.Group, err error) *MockStore_GetGroupInformation_Call
- func (_c *MockStore_GetGroupInformation_Call) Run(run func(streamName string, groupName string)) *MockStore_GetGroupInformation_Call
- func (_c *MockStore_GetGroupInformation_Call) RunAndReturn(run func(streamName string, groupName string) (*kayakv1.Group, error)) *MockStore_GetGroupInformation_Call
- type MockStore_GetGroupPosition_Call
- func (_c *MockStore_GetGroupPosition_Call) Return(s string, err error) *MockStore_GetGroupPosition_Call
- func (_c *MockStore_GetGroupPosition_Call) Run(run func(stream string, group string, partition int64)) *MockStore_GetGroupPosition_Call
- func (_c *MockStore_GetGroupPosition_Call) RunAndReturn(run func(stream string, group string, partition int64) (string, error)) *MockStore_GetGroupPosition_Call
- type MockStore_GetPartitionAssignment_Call
- func (_c *MockStore_GetPartitionAssignment_Call) Return(s string, err error) *MockStore_GetPartitionAssignment_Call
- func (_c *MockStore_GetPartitionAssignment_Call) Run(run func(stream string, group string, partition int64)) *MockStore_GetPartitionAssignment_Call
- func (_c *MockStore_GetPartitionAssignment_Call) RunAndReturn(run func(stream string, group string, partition int64) (string, error)) *MockStore_GetPartitionAssignment_Call
- type MockStore_GetPartitionAssignments_Call
- func (_c *MockStore_GetPartitionAssignments_Call) Return(int64ToPartitionAssignment map[int64]*kayakv1.PartitionAssignment, err error) *MockStore_GetPartitionAssignments_Call
- func (_c *MockStore_GetPartitionAssignments_Call) Run(run func(stream string, group string)) *MockStore_GetPartitionAssignments_Call
- func (_c *MockStore_GetPartitionAssignments_Call) RunAndReturn(...) *MockStore_GetPartitionAssignments_Call
- type MockStore_GetRecords_Call
- func (_c *MockStore_GetRecords_Call) Return(records []*kayakv1.Record, err error) *MockStore_GetRecords_Call
- func (_c *MockStore_GetRecords_Call) Run(run func(streamName string, partition int64, startPosition string, limit int)) *MockStore_GetRecords_Call
- func (_c *MockStore_GetRecords_Call) RunAndReturn(...) *MockStore_GetRecords_Call
- type MockStore_GetStreamStats_Call
- func (_c *MockStore_GetStreamStats_Call) Return(streamStats *kayakv1.StreamStats, err error) *MockStore_GetStreamStats_Call
- func (_c *MockStore_GetStreamStats_Call) Run(run func(name string)) *MockStore_GetStreamStats_Call
- func (_c *MockStore_GetStreamStats_Call) RunAndReturn(run func(name string) (*kayakv1.StreamStats, error)) *MockStore_GetStreamStats_Call
- type MockStore_GetStream_Call
- func (_c *MockStore_GetStream_Call) Return(stream *kayakv1.Stream, err error) *MockStore_GetStream_Call
- func (_c *MockStore_GetStream_Call) Run(run func(name string)) *MockStore_GetStream_Call
- func (_c *MockStore_GetStream_Call) RunAndReturn(run func(name string) (*kayakv1.Stream, error)) *MockStore_GetStream_Call
- type MockStore_GetStreams_Call
- func (_c *MockStore_GetStreams_Call) Return(streams []*kayakv1.Stream, err error) *MockStore_GetStreams_Call
- func (_c *MockStore_GetStreams_Call) Run(run func()) *MockStore_GetStreams_Call
- func (_c *MockStore_GetStreams_Call) RunAndReturn(run func() ([]*kayakv1.Stream, error)) *MockStore_GetStreams_Call
- type MockStore_HasLease_Call
- type MockStore_PutRecords_Call
- func (_c *MockStore_PutRecords_Call) Return(err error) *MockStore_PutRecords_Call
- func (_c *MockStore_PutRecords_Call) Run(run func(streamName string, records ...*kayakv1.Record)) *MockStore_PutRecords_Call
- func (_c *MockStore_PutRecords_Call) RunAndReturn(run func(streamName string, records ...*kayakv1.Record) error) *MockStore_PutRecords_Call
- type MockStore_PutStream_Call
- type MockStore_RemoveLease_Call
- func (_c *MockStore_RemoveLease_Call) Return(err error) *MockStore_RemoveLease_Call
- func (_c *MockStore_RemoveLease_Call) Run(run func(worker *kayakv1.Worker)) *MockStore_RemoveLease_Call
- func (_c *MockStore_RemoveLease_Call) RunAndReturn(run func(worker *kayakv1.Worker) error) *MockStore_RemoveLease_Call
- type MockStore_Restore_Call
- type MockStore_Snapshot_Call
- type Store
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyRegistered = errors.New("partition is alreay registered")
var ErrInvalidLease = errors.New("invalid lease")
var ErrNewerPositionCommitted = errors.New("a newer position has already been commited")
Functions ¶
Types ¶
type ApplyResponse ¶
type ApplyResponse struct {
Error error
}
type MockStore ¶
MockStore is an autogenerated mock type for the Store type
func NewMockStore ¶
NewMockStore creates a new instance of MockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockStore) CommitGroupPosition ¶
func (_mock *MockStore) CommitGroupPosition(stream string, group string, parition int64, position string) error
CommitGroupPosition provides a mock function for the type MockStore
func (*MockStore) DeleteStream ¶
DeleteStream provides a mock function for the type MockStore
func (*MockStore) EXPECT ¶
func (_m *MockStore) EXPECT() *MockStore_Expecter
func (*MockStore) ExtendLease ¶
ExtendLease provides a mock function for the type MockStore
func (*MockStore) GetGroupInformation ¶
func (_mock *MockStore) GetGroupInformation(streamName string, groupName string) (*kayakv1.Group, error)
GetGroupInformation provides a mock function for the type MockStore
func (*MockStore) GetGroupPosition ¶
func (_mock *MockStore) GetGroupPosition(stream string, group string, partition int64) (string, error)
GetGroupPosition provides a mock function for the type MockStore
func (*MockStore) GetPartitionAssignment ¶
func (_mock *MockStore) GetPartitionAssignment(stream string, group string, partition int64) (string, error)
GetPartitionAssignment provides a mock function for the type MockStore
func (*MockStore) GetPartitionAssignments ¶
func (_mock *MockStore) GetPartitionAssignments(stream string, group string) (map[int64]*kayakv1.PartitionAssignment, error)
GetPartitionAssignments provides a mock function for the type MockStore
func (*MockStore) GetRecords ¶
func (_mock *MockStore) GetRecords(streamName string, partition int64, startPosition string, limit int) ([]*kayakv1.Record, error)
GetRecords provides a mock function for the type MockStore
func (*MockStore) GetStreamStats ¶
func (_mock *MockStore) GetStreamStats(name string) (*kayakv1.StreamStats, error)
GetStreamStats provides a mock function for the type MockStore
func (*MockStore) GetStreams ¶
GetStreams provides a mock function for the type MockStore
func (*MockStore) PutRecords ¶
PutRecords provides a mock function for the type MockStore
func (*MockStore) RemoveLease ¶
RemoveLease provides a mock function for the type MockStore
type MockStore_Apply_Call ¶
MockStore_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'
func (*MockStore_Apply_Call) Return ¶
func (_c *MockStore_Apply_Call) Return(v any) *MockStore_Apply_Call
func (*MockStore_Apply_Call) Run ¶
func (_c *MockStore_Apply_Call) Run(run func(l *raft.Log)) *MockStore_Apply_Call
func (*MockStore_Apply_Call) RunAndReturn ¶
func (_c *MockStore_Apply_Call) RunAndReturn(run func(l *raft.Log) any) *MockStore_Apply_Call
type MockStore_CommitGroupPosition_Call ¶
MockStore_CommitGroupPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitGroupPosition'
func (*MockStore_CommitGroupPosition_Call) Return ¶
func (_c *MockStore_CommitGroupPosition_Call) Return(err error) *MockStore_CommitGroupPosition_Call
func (*MockStore_CommitGroupPosition_Call) Run ¶
func (_c *MockStore_CommitGroupPosition_Call) Run(run func(stream string, group string, parition int64, position string)) *MockStore_CommitGroupPosition_Call
func (*MockStore_CommitGroupPosition_Call) RunAndReturn ¶
func (_c *MockStore_CommitGroupPosition_Call) RunAndReturn(run func(stream string, group string, parition int64, position string) error) *MockStore_CommitGroupPosition_Call
type MockStore_DeleteStream_Call ¶
MockStore_DeleteStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteStream'
func (*MockStore_DeleteStream_Call) Return ¶
func (_c *MockStore_DeleteStream_Call) Return(err error) *MockStore_DeleteStream_Call
func (*MockStore_DeleteStream_Call) Run ¶
func (_c *MockStore_DeleteStream_Call) Run(run func(name string)) *MockStore_DeleteStream_Call
func (*MockStore_DeleteStream_Call) RunAndReturn ¶
func (_c *MockStore_DeleteStream_Call) RunAndReturn(run func(name string) error) *MockStore_DeleteStream_Call
type MockStore_Expecter ¶
type MockStore_Expecter struct {
// contains filtered or unexported fields
}
func (*MockStore_Expecter) Apply ¶
func (_e *MockStore_Expecter) Apply(l interface{}) *MockStore_Apply_Call
Apply is a helper method to define mock.On call
- l
func (*MockStore_Expecter) CommitGroupPosition ¶
func (_e *MockStore_Expecter) CommitGroupPosition(stream interface{}, group interface{}, parition interface{}, position interface{}) *MockStore_CommitGroupPosition_Call
CommitGroupPosition is a helper method to define mock.On call
- stream
- group
- parition
- position
func (*MockStore_Expecter) DeleteStream ¶
func (_e *MockStore_Expecter) DeleteStream(name interface{}) *MockStore_DeleteStream_Call
DeleteStream is a helper method to define mock.On call
- name
func (*MockStore_Expecter) ExtendLease ¶
func (_e *MockStore_Expecter) ExtendLease(worker interface{}, expires interface{}) *MockStore_ExtendLease_Call
ExtendLease is a helper method to define mock.On call
- worker
- expires
func (*MockStore_Expecter) GetGroupInformation ¶
func (_e *MockStore_Expecter) GetGroupInformation(streamName interface{}, groupName interface{}) *MockStore_GetGroupInformation_Call
GetGroupInformation is a helper method to define mock.On call
- streamName
- groupName
func (*MockStore_Expecter) GetGroupPosition ¶
func (_e *MockStore_Expecter) GetGroupPosition(stream interface{}, group interface{}, partition interface{}) *MockStore_GetGroupPosition_Call
GetGroupPosition is a helper method to define mock.On call
- stream
- group
- partition
func (*MockStore_Expecter) GetPartitionAssignment ¶
func (_e *MockStore_Expecter) GetPartitionAssignment(stream interface{}, group interface{}, partition interface{}) *MockStore_GetPartitionAssignment_Call
GetPartitionAssignment is a helper method to define mock.On call
- stream
- group
- partition
func (*MockStore_Expecter) GetPartitionAssignments ¶
func (_e *MockStore_Expecter) GetPartitionAssignments(stream interface{}, group interface{}) *MockStore_GetPartitionAssignments_Call
GetPartitionAssignments is a helper method to define mock.On call
- stream
- group
func (*MockStore_Expecter) GetRecords ¶
func (_e *MockStore_Expecter) GetRecords(streamName interface{}, partition interface{}, startPosition interface{}, limit interface{}) *MockStore_GetRecords_Call
GetRecords is a helper method to define mock.On call
- streamName
- partition
- startPosition
- limit
func (*MockStore_Expecter) GetStream ¶
func (_e *MockStore_Expecter) GetStream(name interface{}) *MockStore_GetStream_Call
GetStream is a helper method to define mock.On call
- name
func (*MockStore_Expecter) GetStreamStats ¶
func (_e *MockStore_Expecter) GetStreamStats(name interface{}) *MockStore_GetStreamStats_Call
GetStreamStats is a helper method to define mock.On call
- name
func (*MockStore_Expecter) GetStreams ¶
func (_e *MockStore_Expecter) GetStreams() *MockStore_GetStreams_Call
GetStreams is a helper method to define mock.On call
func (*MockStore_Expecter) HasLease ¶
func (_e *MockStore_Expecter) HasLease(worker interface{}) *MockStore_HasLease_Call
HasLease is a helper method to define mock.On call
- worker
func (*MockStore_Expecter) PutRecords ¶
func (_e *MockStore_Expecter) PutRecords(streamName interface{}, records ...interface{}) *MockStore_PutRecords_Call
PutRecords is a helper method to define mock.On call
- streamName
- records
func (*MockStore_Expecter) PutStream ¶
func (_e *MockStore_Expecter) PutStream(stream interface{}) *MockStore_PutStream_Call
PutStream is a helper method to define mock.On call
- stream
func (*MockStore_Expecter) RemoveLease ¶
func (_e *MockStore_Expecter) RemoveLease(worker interface{}) *MockStore_RemoveLease_Call
RemoveLease is a helper method to define mock.On call
- worker
func (*MockStore_Expecter) Restore ¶
func (_e *MockStore_Expecter) Restore(snapshot interface{}) *MockStore_Restore_Call
Restore is a helper method to define mock.On call
- snapshot
func (*MockStore_Expecter) Snapshot ¶
func (_e *MockStore_Expecter) Snapshot() *MockStore_Snapshot_Call
Snapshot is a helper method to define mock.On call
type MockStore_ExtendLease_Call ¶
MockStore_ExtendLease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExtendLease'
func (*MockStore_ExtendLease_Call) Return ¶
func (_c *MockStore_ExtendLease_Call) Return(err error) *MockStore_ExtendLease_Call
func (*MockStore_ExtendLease_Call) Run ¶
func (_c *MockStore_ExtendLease_Call) Run(run func(worker *kayakv1.Worker, expires time.Duration)) *MockStore_ExtendLease_Call
func (*MockStore_ExtendLease_Call) RunAndReturn ¶
func (_c *MockStore_ExtendLease_Call) RunAndReturn(run func(worker *kayakv1.Worker, expires time.Duration) error) *MockStore_ExtendLease_Call
type MockStore_GetGroupInformation_Call ¶
MockStore_GetGroupInformation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupInformation'
func (*MockStore_GetGroupInformation_Call) Return ¶
func (_c *MockStore_GetGroupInformation_Call) Return(group *kayakv1.Group, err error) *MockStore_GetGroupInformation_Call
func (*MockStore_GetGroupInformation_Call) Run ¶
func (_c *MockStore_GetGroupInformation_Call) Run(run func(streamName string, groupName string)) *MockStore_GetGroupInformation_Call
func (*MockStore_GetGroupInformation_Call) RunAndReturn ¶
func (_c *MockStore_GetGroupInformation_Call) RunAndReturn(run func(streamName string, groupName string) (*kayakv1.Group, error)) *MockStore_GetGroupInformation_Call
type MockStore_GetGroupPosition_Call ¶
MockStore_GetGroupPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGroupPosition'
func (*MockStore_GetGroupPosition_Call) Return ¶
func (_c *MockStore_GetGroupPosition_Call) Return(s string, err error) *MockStore_GetGroupPosition_Call
func (*MockStore_GetGroupPosition_Call) Run ¶
func (_c *MockStore_GetGroupPosition_Call) Run(run func(stream string, group string, partition int64)) *MockStore_GetGroupPosition_Call
func (*MockStore_GetGroupPosition_Call) RunAndReturn ¶
func (_c *MockStore_GetGroupPosition_Call) RunAndReturn(run func(stream string, group string, partition int64) (string, error)) *MockStore_GetGroupPosition_Call
type MockStore_GetPartitionAssignment_Call ¶
MockStore_GetPartitionAssignment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionAssignment'
func (*MockStore_GetPartitionAssignment_Call) Return ¶
func (_c *MockStore_GetPartitionAssignment_Call) Return(s string, err error) *MockStore_GetPartitionAssignment_Call
func (*MockStore_GetPartitionAssignment_Call) Run ¶
func (_c *MockStore_GetPartitionAssignment_Call) Run(run func(stream string, group string, partition int64)) *MockStore_GetPartitionAssignment_Call
func (*MockStore_GetPartitionAssignment_Call) RunAndReturn ¶
func (_c *MockStore_GetPartitionAssignment_Call) RunAndReturn(run func(stream string, group string, partition int64) (string, error)) *MockStore_GetPartitionAssignment_Call
type MockStore_GetPartitionAssignments_Call ¶
MockStore_GetPartitionAssignments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPartitionAssignments'
func (*MockStore_GetPartitionAssignments_Call) Return ¶
func (_c *MockStore_GetPartitionAssignments_Call) Return(int64ToPartitionAssignment map[int64]*kayakv1.PartitionAssignment, err error) *MockStore_GetPartitionAssignments_Call
func (*MockStore_GetPartitionAssignments_Call) Run ¶
func (_c *MockStore_GetPartitionAssignments_Call) Run(run func(stream string, group string)) *MockStore_GetPartitionAssignments_Call
func (*MockStore_GetPartitionAssignments_Call) RunAndReturn ¶
func (_c *MockStore_GetPartitionAssignments_Call) RunAndReturn(run func(stream string, group string) (map[int64]*kayakv1.PartitionAssignment, error)) *MockStore_GetPartitionAssignments_Call
type MockStore_GetRecords_Call ¶
MockStore_GetRecords_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRecords'
func (*MockStore_GetRecords_Call) Return ¶
func (_c *MockStore_GetRecords_Call) Return(records []*kayakv1.Record, err error) *MockStore_GetRecords_Call
func (*MockStore_GetRecords_Call) Run ¶
func (_c *MockStore_GetRecords_Call) Run(run func(streamName string, partition int64, startPosition string, limit int)) *MockStore_GetRecords_Call
func (*MockStore_GetRecords_Call) RunAndReturn ¶
func (_c *MockStore_GetRecords_Call) RunAndReturn(run func(streamName string, partition int64, startPosition string, limit int) ([]*kayakv1.Record, error)) *MockStore_GetRecords_Call
type MockStore_GetStreamStats_Call ¶
MockStore_GetStreamStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStreamStats'
func (*MockStore_GetStreamStats_Call) Return ¶
func (_c *MockStore_GetStreamStats_Call) Return(streamStats *kayakv1.StreamStats, err error) *MockStore_GetStreamStats_Call
func (*MockStore_GetStreamStats_Call) Run ¶
func (_c *MockStore_GetStreamStats_Call) Run(run func(name string)) *MockStore_GetStreamStats_Call
func (*MockStore_GetStreamStats_Call) RunAndReturn ¶
func (_c *MockStore_GetStreamStats_Call) RunAndReturn(run func(name string) (*kayakv1.StreamStats, error)) *MockStore_GetStreamStats_Call
type MockStore_GetStream_Call ¶
MockStore_GetStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStream'
func (*MockStore_GetStream_Call) Return ¶
func (_c *MockStore_GetStream_Call) Return(stream *kayakv1.Stream, err error) *MockStore_GetStream_Call
func (*MockStore_GetStream_Call) Run ¶
func (_c *MockStore_GetStream_Call) Run(run func(name string)) *MockStore_GetStream_Call
func (*MockStore_GetStream_Call) RunAndReturn ¶
func (_c *MockStore_GetStream_Call) RunAndReturn(run func(name string) (*kayakv1.Stream, error)) *MockStore_GetStream_Call
type MockStore_GetStreams_Call ¶
MockStore_GetStreams_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStreams'
func (*MockStore_GetStreams_Call) Return ¶
func (_c *MockStore_GetStreams_Call) Return(streams []*kayakv1.Stream, err error) *MockStore_GetStreams_Call
func (*MockStore_GetStreams_Call) Run ¶
func (_c *MockStore_GetStreams_Call) Run(run func()) *MockStore_GetStreams_Call
func (*MockStore_GetStreams_Call) RunAndReturn ¶
func (_c *MockStore_GetStreams_Call) RunAndReturn(run func() ([]*kayakv1.Stream, error)) *MockStore_GetStreams_Call
type MockStore_HasLease_Call ¶
MockStore_HasLease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasLease'
func (*MockStore_HasLease_Call) Return ¶
func (_c *MockStore_HasLease_Call) Return(err error) *MockStore_HasLease_Call
func (*MockStore_HasLease_Call) Run ¶
func (_c *MockStore_HasLease_Call) Run(run func(worker *kayakv1.Worker)) *MockStore_HasLease_Call
func (*MockStore_HasLease_Call) RunAndReturn ¶
func (_c *MockStore_HasLease_Call) RunAndReturn(run func(worker *kayakv1.Worker) error) *MockStore_HasLease_Call
type MockStore_PutRecords_Call ¶
MockStore_PutRecords_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutRecords'
func (*MockStore_PutRecords_Call) Return ¶
func (_c *MockStore_PutRecords_Call) Return(err error) *MockStore_PutRecords_Call
func (*MockStore_PutRecords_Call) Run ¶
func (_c *MockStore_PutRecords_Call) Run(run func(streamName string, records ...*kayakv1.Record)) *MockStore_PutRecords_Call
func (*MockStore_PutRecords_Call) RunAndReturn ¶
func (_c *MockStore_PutRecords_Call) RunAndReturn(run func(streamName string, records ...*kayakv1.Record) error) *MockStore_PutRecords_Call
type MockStore_PutStream_Call ¶
MockStore_PutStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutStream'
func (*MockStore_PutStream_Call) Return ¶
func (_c *MockStore_PutStream_Call) Return(err error) *MockStore_PutStream_Call
func (*MockStore_PutStream_Call) Run ¶
func (_c *MockStore_PutStream_Call) Run(run func(stream *kayakv1.Stream)) *MockStore_PutStream_Call
func (*MockStore_PutStream_Call) RunAndReturn ¶
func (_c *MockStore_PutStream_Call) RunAndReturn(run func(stream *kayakv1.Stream) error) *MockStore_PutStream_Call
type MockStore_RemoveLease_Call ¶
MockStore_RemoveLease_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveLease'
func (*MockStore_RemoveLease_Call) Return ¶
func (_c *MockStore_RemoveLease_Call) Return(err error) *MockStore_RemoveLease_Call
func (*MockStore_RemoveLease_Call) Run ¶
func (_c *MockStore_RemoveLease_Call) Run(run func(worker *kayakv1.Worker)) *MockStore_RemoveLease_Call
func (*MockStore_RemoveLease_Call) RunAndReturn ¶
func (_c *MockStore_RemoveLease_Call) RunAndReturn(run func(worker *kayakv1.Worker) error) *MockStore_RemoveLease_Call
type MockStore_Restore_Call ¶
MockStore_Restore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restore'
func (*MockStore_Restore_Call) Return ¶
func (_c *MockStore_Restore_Call) Return(err error) *MockStore_Restore_Call
func (*MockStore_Restore_Call) Run ¶
func (_c *MockStore_Restore_Call) Run(run func(snapshot io.ReadCloser)) *MockStore_Restore_Call
func (*MockStore_Restore_Call) RunAndReturn ¶
func (_c *MockStore_Restore_Call) RunAndReturn(run func(snapshot io.ReadCloser) error) *MockStore_Restore_Call
type MockStore_Snapshot_Call ¶
MockStore_Snapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Snapshot'
func (*MockStore_Snapshot_Call) Return ¶
func (_c *MockStore_Snapshot_Call) Return(fSMSnapshot raft.FSMSnapshot, err error) *MockStore_Snapshot_Call
func (*MockStore_Snapshot_Call) Run ¶
func (_c *MockStore_Snapshot_Call) Run(run func()) *MockStore_Snapshot_Call
func (*MockStore_Snapshot_Call) RunAndReturn ¶
func (_c *MockStore_Snapshot_Call) RunAndReturn(run func() (raft.FSMSnapshot, error)) *MockStore_Snapshot_Call
type Store ¶
type Store interface {
PutStream(stream *kayakv1.Stream) error
GetStream(name string) (*kayakv1.Stream, error)
GetStreams() ([]*kayakv1.Stream, error)
DeleteStream(name string) error
PutRecords(streamName string, records ...*kayakv1.Record) error
GetRecords(streamName string, partition int64, startPosition string, limit int) ([]*kayakv1.Record, error)
// GetLease()
ExtendLease(worker *kayakv1.Worker, expires time.Duration) error
RemoveLease(worker *kayakv1.Worker) error
HasLease(worker *kayakv1.Worker) error
GetGroupPosition(stream, group string, partition int64) (string, error)
CommitGroupPosition(stream, group string, parition int64, position string) error
GetPartitionAssignment(stream, group string, partition int64) (string, error)
GetPartitionAssignments(stream, group string) (map[int64]*kayakv1.PartitionAssignment, error)
GetGroupInformation(streamName, groupName string) (*kayakv1.Group, error)
GetStreamStats(name string) (*kayakv1.StreamStats, error)
// raft FSM
Apply(l *raft.Log) any
Snapshot() (raft.FSMSnapshot, error)
Restore(snapshot io.ReadCloser) error
}