subscription

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package subscription is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	SaveOffset(ctx context.Context, id vanus.ID, offsets info.ListOffsetInfo, commit bool) error
	// GetOrSaveOffset get offset only from etcd, if it isn't exist will get from cli and save to etcd,
	// and it contains retry eb offset
	GetOrSaveOffset(ctx context.Context, id vanus.ID) (info.ListOffsetInfo, error)
	// GetOffset get offset only from etcd, it doesn't contain retry eb offset
	GetOffset(ctx context.Context, id vanus.ID) (info.ListOffsetInfo, error)
	GetDeadLetterOffset(ctx context.Context, id vanus.ID) (uint64, error)
	SaveDeadLetterOffset(ctx context.Context, id vanus.ID, offset uint64) error
	ResetOffsetByTimestamp(ctx context.Context, id vanus.ID, timestamp uint64) (info.ListOffsetInfo, error)
	ListSubscription(ctx context.Context) []*metadata.Subscription
	GetSubscription(ctx context.Context, id vanus.ID) *metadata.Subscription
	GetSubscriptionByName(ctx context.Context, namespaceID vanus.ID, name string) *metadata.Subscription
	AddSubscription(ctx context.Context, subscription *metadata.Subscription) error
	UpdateSubscription(ctx context.Context, subscription *metadata.Subscription) error
	Heartbeat(ctx context.Context, id vanus.ID, addr string, time time.Time) error
	DeleteSubscription(ctx context.Context, id vanus.ID) error
	Init(ctx context.Context) error
	Start()
	Stop()
}

func NewSubscriptionManager

func NewSubscriptionManager(storage storage.Storage, secretStorage secret.Storage,
	ebCli eb.Client, cl cluster.Cluster) Manager

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) AddSubscription

func (m *MockManager) AddSubscription(ctx context.Context, subscription *metadata.Subscription) error

AddSubscription mocks base method.

func (*MockManager) DeleteSubscription

func (m *MockManager) DeleteSubscription(ctx context.Context, id vanus.ID) error

DeleteSubscription 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) GetDeadLetterOffset

func (m *MockManager) GetDeadLetterOffset(ctx context.Context, id vanus.ID) (uint64, error)

GetDeadLetterOffset mocks base method.

func (*MockManager) GetOffset

func (m *MockManager) GetOffset(ctx context.Context, id vanus.ID) (info.ListOffsetInfo, error)

GetOffset mocks base method.

func (*MockManager) GetOrSaveOffset

func (m *MockManager) GetOrSaveOffset(ctx context.Context, id vanus.ID) (info.ListOffsetInfo, error)

GetOrSaveOffset mocks base method.

func (*MockManager) GetSubscription

func (m *MockManager) GetSubscription(ctx context.Context, id vanus.ID) *metadata.Subscription

GetSubscription mocks base method.

func (*MockManager) GetSubscriptionByName

func (m *MockManager) GetSubscriptionByName(ctx context.Context, eventbusID vanus.ID, name string) *metadata.Subscription

GetSubscriptionByName mocks base method.

func (*MockManager) Heartbeat

func (m *MockManager) Heartbeat(ctx context.Context, id vanus.ID, addr string, time time.Time) error

Heartbeat mocks base method.

func (*MockManager) Init

func (m *MockManager) Init(ctx context.Context) error

Init mocks base method.

func (*MockManager) ListSubscription

func (m *MockManager) ListSubscription(ctx context.Context) []*metadata.Subscription

ListSubscription mocks base method.

func (*MockManager) ResetOffsetByTimestamp

func (m *MockManager) ResetOffsetByTimestamp(ctx context.Context, id vanus.ID, timestamp uint64) (info.ListOffsetInfo, error)

ResetOffsetByTimestamp mocks base method.

func (*MockManager) SaveDeadLetterOffset

func (m *MockManager) SaveDeadLetterOffset(ctx context.Context, id vanus.ID, offset uint64) error

SaveDeadLetterOffset mocks base method.

func (*MockManager) SaveOffset

func (m *MockManager) SaveOffset(ctx context.Context, id vanus.ID, offsets info.ListOffsetInfo, commit bool) error

SaveOffset mocks base method.

func (*MockManager) Start

func (m *MockManager) Start()

Start mocks base method.

func (*MockManager) Stop

func (m *MockManager) Stop()

Stop mocks base method.

func (*MockManager) UpdateSubscription

func (m *MockManager) UpdateSubscription(ctx context.Context, subscription *metadata.Subscription) error

UpdateSubscription mocks base method.

type MockManagerMockRecorder

type MockManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) AddSubscription

func (mr *MockManagerMockRecorder) AddSubscription(ctx, subscription interface{}) *gomock.Call

AddSubscription indicates an expected call of AddSubscription.

func (*MockManagerMockRecorder) DeleteSubscription

func (mr *MockManagerMockRecorder) DeleteSubscription(ctx, id interface{}) *gomock.Call

DeleteSubscription indicates an expected call of DeleteSubscription.

func (*MockManagerMockRecorder) GetDeadLetterOffset

func (mr *MockManagerMockRecorder) GetDeadLetterOffset(ctx, id interface{}) *gomock.Call

GetDeadLetterOffset indicates an expected call of GetDeadLetterOffset.

func (*MockManagerMockRecorder) GetOffset

func (mr *MockManagerMockRecorder) GetOffset(ctx, id interface{}) *gomock.Call

GetOffset indicates an expected call of GetOffset.

func (*MockManagerMockRecorder) GetOrSaveOffset

func (mr *MockManagerMockRecorder) GetOrSaveOffset(ctx, id interface{}) *gomock.Call

GetOrSaveOffset indicates an expected call of GetOrSaveOffset.

func (*MockManagerMockRecorder) GetSubscription

func (mr *MockManagerMockRecorder) GetSubscription(ctx, id interface{}) *gomock.Call

GetSubscription indicates an expected call of GetSubscription.

func (*MockManagerMockRecorder) GetSubscriptionByName

func (mr *MockManagerMockRecorder) GetSubscriptionByName(ctx, eventbusID, name interface{}) *gomock.Call

GetSubscriptionByName indicates an expected call of GetSubscriptionByName.

func (*MockManagerMockRecorder) Heartbeat

func (mr *MockManagerMockRecorder) Heartbeat(ctx, id, addr, time interface{}) *gomock.Call

Heartbeat indicates an expected call of Heartbeat.

func (*MockManagerMockRecorder) Init

func (mr *MockManagerMockRecorder) Init(ctx interface{}) *gomock.Call

Init indicates an expected call of Init.

func (*MockManagerMockRecorder) ListSubscription

func (mr *MockManagerMockRecorder) ListSubscription(ctx interface{}) *gomock.Call

ListSubscription indicates an expected call of ListSubscription.

func (*MockManagerMockRecorder) ResetOffsetByTimestamp

func (mr *MockManagerMockRecorder) ResetOffsetByTimestamp(ctx, id, timestamp interface{}) *gomock.Call

ResetOffsetByTimestamp indicates an expected call of ResetOffsetByTimestamp.

func (*MockManagerMockRecorder) SaveDeadLetterOffset

func (mr *MockManagerMockRecorder) SaveDeadLetterOffset(ctx, id, offset interface{}) *gomock.Call

SaveDeadLetterOffset indicates an expected call of SaveDeadLetterOffset.

func (*MockManagerMockRecorder) SaveOffset

func (mr *MockManagerMockRecorder) SaveOffset(ctx, id, offsets, commit interface{}) *gomock.Call

SaveOffset indicates an expected call of SaveOffset.

func (*MockManagerMockRecorder) Start

func (mr *MockManagerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockManagerMockRecorder) Stop

func (mr *MockManagerMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop.

func (*MockManagerMockRecorder) UpdateSubscription

func (mr *MockManagerMockRecorder) UpdateSubscription(ctx, subscription interface{}) *gomock.Call

UpdateSubscription indicates an expected call of UpdateSubscription.

Directories

Path Synopsis
Package offset is a generated GoMock package.
Package offset is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL