Documentation ¶
Overview ¶
Package eventlog is a generated GoMock package.
Index ¶
- Constants
- func Convert2ProtoSegment(ctx context.Context, ins ...Segment) []*metapb.Segment
- type Manager
- type MockManager
- func (m *MockManager) AcquireEventlog(ctx context.Context, eventbusID vanus.ID, eventbusName string) (*metadata.Eventlog, error)
- func (m *MockManager) DeleteEventlog(ctx context.Context, id vanus.ID)
- func (m *MockManager) EXPECT() *MockManagerMockRecorder
- func (m *MockManager) GetAppendableSegment(ctx context.Context, eli *metadata.Eventlog, num int) ([]Segment, error)
- func (m *MockManager) GetBlock(id vanus.ID) *metadata.Block
- func (m *MockManager) GetEventlog(ctx context.Context, id vanus.ID) *metadata.Eventlog
- func (m *MockManager) GetEventlogSegmentList(elID vanus.ID) []Segment
- func (m *MockManager) GetSegmentByBlockID(block *metadata.Block) (Segment, error)
- func (m *MockManager) Run(ctx context.Context, kvClient kv.Client, startTask bool) error
- func (m *MockManager) Stop()
- func (m_2 *MockManager) UpdateSegment(ctx context.Context, m map[string][]Segment)
- func (m *MockManager) UpdateSegmentReplicas(ctx context.Context, segID vanus.ID, term uint64) error
- type MockManagerMockRecorder
- func (mr *MockManagerMockRecorder) AcquireEventlog(ctx, eventbusID, eventbusName interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) DeleteEventlog(ctx, id interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetAppendableSegment(ctx, eli, num interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetBlock(id interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetEventlog(ctx, id interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetEventlogSegmentList(elID interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetSegmentByBlockID(block interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) Run(ctx, kvClient, startTask interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) Stop() *gomock.Call
- func (mr *MockManagerMockRecorder) UpdateSegment(ctx, m interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) UpdateSegmentReplicas(ctx, segID, term interface{}) *gomock.Call
- type ReplicaGroup
- type Segment
- type SegmentState
Constants ¶
const ( StateCreated = SegmentState("created") StateWorking = SegmentState("working") StateFrozen = SegmentState("frozen") StateArchived = SegmentState("archived") StateExpired = SegmentState("expired") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager interface { Run(ctx context.Context, kvClient kv.Client, startTask bool) error Stop() AcquireEventlog(ctx context.Context, eventbusID vanus.ID, eventbusName string) (*metadata.Eventlog, error) GetEventlog(ctx context.Context, id vanus.ID) *metadata.Eventlog DeleteEventlog(ctx context.Context, id vanus.ID) GetBlock(id vanus.ID) *metadata.Block UpdateSegmentReplicas(ctx context.Context, segID vanus.ID, term uint64) error GetEventlogSegmentList(elID vanus.ID) []Segment GetAppendableSegment(ctx context.Context, eli *metadata.Eventlog, num int) ([]Segment, error) UpdateSegment(ctx context.Context, m map[string][]Segment) GetSegmentByBlockID(block *metadata.Block) (Segment, error) }
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface.
func NewMockManager ¶
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance.
func (*MockManager) AcquireEventlog ¶
func (m *MockManager) AcquireEventlog(ctx context.Context, eventbusID vanus.ID, eventbusName string) (*metadata.Eventlog, error)
AcquireEventlog mocks base method.
func (*MockManager) DeleteEventlog ¶
func (m *MockManager) DeleteEventlog(ctx context.Context, id vanus.ID)
DeleteEventlog mocks base method.
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManager) GetAppendableSegment ¶
func (m *MockManager) GetAppendableSegment(ctx context.Context, eli *metadata.Eventlog, num int) ([]Segment, error)
GetAppendableSegment mocks base method.
func (*MockManager) GetBlock ¶
func (m *MockManager) GetBlock(id vanus.ID) *metadata.Block
GetBlock mocks base method.
func (*MockManager) GetEventlog ¶
GetEventlog mocks base method.
func (*MockManager) GetEventlogSegmentList ¶
func (m *MockManager) GetEventlogSegmentList(elID vanus.ID) []Segment
GetEventlogSegmentList mocks base method.
func (*MockManager) GetSegmentByBlockID ¶
func (m *MockManager) GetSegmentByBlockID(block *metadata.Block) (Segment, error)
GetSegmentByBlockID mocks base method.
func (*MockManager) UpdateSegment ¶
func (m_2 *MockManager) UpdateSegment(ctx context.Context, m map[string][]Segment)
UpdateSegment mocks base method.
func (*MockManager) UpdateSegmentReplicas ¶
UpdateSegmentReplicas mocks base method.
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) AcquireEventlog ¶
func (mr *MockManagerMockRecorder) AcquireEventlog(ctx, eventbusID, eventbusName interface{}) *gomock.Call
AcquireEventlog indicates an expected call of AcquireEventlog.
func (*MockManagerMockRecorder) DeleteEventlog ¶
func (mr *MockManagerMockRecorder) DeleteEventlog(ctx, id interface{}) *gomock.Call
DeleteEventlog indicates an expected call of DeleteEventlog.
func (*MockManagerMockRecorder) GetAppendableSegment ¶
func (mr *MockManagerMockRecorder) GetAppendableSegment(ctx, eli, num interface{}) *gomock.Call
GetAppendableSegment indicates an expected call of GetAppendableSegment.
func (*MockManagerMockRecorder) GetBlock ¶
func (mr *MockManagerMockRecorder) GetBlock(id interface{}) *gomock.Call
GetBlock indicates an expected call of GetBlock.
func (*MockManagerMockRecorder) GetEventlog ¶
func (mr *MockManagerMockRecorder) GetEventlog(ctx, id interface{}) *gomock.Call
GetEventlog indicates an expected call of GetEventlog.
func (*MockManagerMockRecorder) GetEventlogSegmentList ¶
func (mr *MockManagerMockRecorder) GetEventlogSegmentList(elID interface{}) *gomock.Call
GetEventlogSegmentList indicates an expected call of GetEventlogSegmentList.
func (*MockManagerMockRecorder) GetSegmentByBlockID ¶
func (mr *MockManagerMockRecorder) GetSegmentByBlockID(block interface{}) *gomock.Call
GetSegmentByBlockID indicates an expected call of GetSegmentByBlockID.
func (*MockManagerMockRecorder) Run ¶
func (mr *MockManagerMockRecorder) Run(ctx, kvClient, startTask interface{}) *gomock.Call
Run indicates an expected call of Run.
func (*MockManagerMockRecorder) Stop ¶
func (mr *MockManagerMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
func (*MockManagerMockRecorder) UpdateSegment ¶
func (mr *MockManagerMockRecorder) UpdateSegment(ctx, m interface{}) *gomock.Call
UpdateSegment indicates an expected call of UpdateSegment.
func (*MockManagerMockRecorder) UpdateSegmentReplicas ¶
func (mr *MockManagerMockRecorder) UpdateSegmentReplicas(ctx, segID, term interface{}) *gomock.Call
UpdateSegmentReplicas indicates an expected call of UpdateSegmentReplicas.
type ReplicaGroup ¶
type Segment ¶
type Segment struct { ID vanus.ID `json:"id,omitempty"` Capacity int64 `json:"capacity,omitempty"` EventlogID vanus.ID `json:"event_log_id,omitempty"` PreviousSegmentID vanus.ID `json:"previous_segment_id,omitempty"` NextSegmentID vanus.ID `json:"next_segment_id,omitempty"` StartOffsetInLog int64 `json:"start_offset_in_log,omitempty"` Replicas *ReplicaGroup `json:"replicas,omitempty"` State SegmentState `json:"state,omitempty"` Size int64 `json:"size,omitempty"` Number int32 `json:"number,omitempty"` FirstEventBornTime time.Time `json:"first_event_born_time"` LastEventBornTime time.Time `json:"last_event_born_time"` }
func (*Segment) GetLeaderBlock ¶
func (*Segment) IsAppendable ¶
type SegmentState ¶
type SegmentState string