cluster

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: 16 Imported by: 1

Documentation

Overview

Package cluster is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	RawClient() ctrlpb.AuthControllerClient
	GetUserByToken(ctx context.Context, token string) (string, error)
	GetUserRole(ctx context.Context, user string) ([]*metapb.UserRole, error)
}

type Cluster

type Cluster interface {
	WaitForControllerReady(createEventbus bool) error
	Status() Topology
	IsReady(createEventbus bool) bool
	NamespaceService() NamespaceService
	EventbusService() EventbusService
	SegmentService() SegmentService
	EventlogService() EventlogService
	TriggerService() TriggerService
	IDService() IDService
	AuthService() AuthService
}

func NewClusterController

func NewClusterController(endpoints []string, credentials credentials.TransportCredentials) Cluster

type EventbusService

type EventbusService interface {
	CreateSystemEventbusIfNotExist(ctx context.Context, name string, desc string) (*metapb.Eventbus, error)
	Delete(ctx context.Context, id uint64) error
	GetSystemEventbusByName(ctx context.Context, name string) (*metapb.Eventbus, error)
	GetEventbus(ctx context.Context, id uint64) (*metapb.Eventbus, error)
	GetEventbusByName(ctx context.Context, ns, name string) (*metapb.Eventbus, error)
	RawClient() ctrlpb.EventbusControllerClient
}

type EventlogService

type EventlogService interface {
	RawClient() ctrlpb.EventlogControllerClient
}

type IDService

type IDService interface {
	RawClient() ctrlpb.SnowflakeControllerClient
}

type MockAuthService

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

MockAuthService is a mock of AuthService interface.

func NewMockAuthService

func NewMockAuthService(ctrl *gomock.Controller) *MockAuthService

NewMockAuthService creates a new mock instance.

func (*MockAuthService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthService) GetUserByToken

func (m *MockAuthService) GetUserByToken(ctx context.Context, token string) (string, error)

GetUserByToken mocks base method.

func (*MockAuthService) GetUserRole

func (m *MockAuthService) GetUserRole(ctx context.Context, user string) ([]*meta.UserRole, error)

GetUserRole mocks base method.

func (*MockAuthService) RawClient

RawClient mocks base method.

type MockAuthServiceMockRecorder

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

MockAuthServiceMockRecorder is the mock recorder for MockAuthService.

func (*MockAuthServiceMockRecorder) GetUserByToken

func (mr *MockAuthServiceMockRecorder) GetUserByToken(ctx, token interface{}) *gomock.Call

GetUserByToken indicates an expected call of GetUserByToken.

func (*MockAuthServiceMockRecorder) GetUserRole

func (mr *MockAuthServiceMockRecorder) GetUserRole(ctx, user interface{}) *gomock.Call

GetUserRole indicates an expected call of GetUserRole.

func (*MockAuthServiceMockRecorder) RawClient

func (mr *MockAuthServiceMockRecorder) RawClient() *gomock.Call

RawClient indicates an expected call of RawClient.

type MockCluster

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

MockCluster is a mock of Cluster interface.

func NewMockCluster

func NewMockCluster(ctrl *gomock.Controller) *MockCluster

NewMockCluster creates a new mock instance.

func (*MockCluster) AuthService

func (m *MockCluster) AuthService() AuthService

AuthService mocks base method.

func (*MockCluster) EXPECT

func (m *MockCluster) EXPECT() *MockClusterMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCluster) EventbusService

func (m *MockCluster) EventbusService() EventbusService

EventbusService mocks base method.

func (*MockCluster) EventlogService

func (m *MockCluster) EventlogService() EventlogService

EventlogService mocks base method.

func (*MockCluster) IDService

func (m *MockCluster) IDService() IDService

IDService mocks base method.

func (*MockCluster) IsReady

func (m *MockCluster) IsReady(createEventbus bool) bool

IsReady mocks base method.

func (*MockCluster) NamespaceService

func (m *MockCluster) NamespaceService() NamespaceService

NamespaceService mocks base method.

func (*MockCluster) SegmentService

func (m *MockCluster) SegmentService() SegmentService

SegmentService mocks base method.

func (*MockCluster) Status

func (m *MockCluster) Status() Topology

Status mocks base method.

func (*MockCluster) TriggerService

func (m *MockCluster) TriggerService() TriggerService

TriggerService mocks base method.

func (*MockCluster) WaitForControllerReady

func (m *MockCluster) WaitForControllerReady(createEventbus bool) error

WaitForControllerReady mocks base method.

type MockClusterMockRecorder

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

MockClusterMockRecorder is the mock recorder for MockCluster.

func (*MockClusterMockRecorder) AuthService

func (mr *MockClusterMockRecorder) AuthService() *gomock.Call

AuthService indicates an expected call of AuthService.

func (*MockClusterMockRecorder) EventbusService

func (mr *MockClusterMockRecorder) EventbusService() *gomock.Call

EventbusService indicates an expected call of EventbusService.

func (*MockClusterMockRecorder) EventlogService

func (mr *MockClusterMockRecorder) EventlogService() *gomock.Call

EventlogService indicates an expected call of EventlogService.

func (*MockClusterMockRecorder) IDService

func (mr *MockClusterMockRecorder) IDService() *gomock.Call

IDService indicates an expected call of IDService.

func (*MockClusterMockRecorder) IsReady

func (mr *MockClusterMockRecorder) IsReady(createEventbus interface{}) *gomock.Call

IsReady indicates an expected call of IsReady.

func (*MockClusterMockRecorder) NamespaceService

func (mr *MockClusterMockRecorder) NamespaceService() *gomock.Call

NamespaceService indicates an expected call of NamespaceService.

func (*MockClusterMockRecorder) SegmentService

func (mr *MockClusterMockRecorder) SegmentService() *gomock.Call

SegmentService indicates an expected call of SegmentService.

func (*MockClusterMockRecorder) Status

func (mr *MockClusterMockRecorder) Status() *gomock.Call

Status indicates an expected call of Status.

func (*MockClusterMockRecorder) TriggerService

func (mr *MockClusterMockRecorder) TriggerService() *gomock.Call

TriggerService indicates an expected call of TriggerService.

func (*MockClusterMockRecorder) WaitForControllerReady

func (mr *MockClusterMockRecorder) WaitForControllerReady(createEventbus interface{}) *gomock.Call

WaitForControllerReady indicates an expected call of WaitForControllerReady.

type MockEventbusService

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

MockEventbusService is a mock of EventbusService interface.

func NewMockEventbusService

func NewMockEventbusService(ctrl *gomock.Controller) *MockEventbusService

NewMockEventbusService creates a new mock instance.

func (*MockEventbusService) CreateSystemEventbusIfNotExist

func (m *MockEventbusService) CreateSystemEventbusIfNotExist(ctx context.Context, name, desc string) (*meta.Eventbus, error)

CreateSystemEventbusIfNotExist mocks base method.

func (*MockEventbusService) Delete

func (m *MockEventbusService) Delete(ctx context.Context, id uint64) error

Delete mocks base method.

func (*MockEventbusService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEventbusService) GetEventbus

func (m *MockEventbusService) GetEventbus(ctx context.Context, id uint64) (*meta.Eventbus, error)

GetEventbus mocks base method.

func (*MockEventbusService) GetEventbusByName

func (m *MockEventbusService) GetEventbusByName(ctx context.Context, ns, name string) (*meta.Eventbus, error)

GetEventbusByName mocks base method.

func (*MockEventbusService) GetSystemEventbusByName

func (m *MockEventbusService) GetSystemEventbusByName(ctx context.Context, name string) (*meta.Eventbus, error)

GetSystemEventbusByName mocks base method.

func (*MockEventbusService) RawClient

RawClient mocks base method.

type MockEventbusServiceMockRecorder

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

MockEventbusServiceMockRecorder is the mock recorder for MockEventbusService.

func (*MockEventbusServiceMockRecorder) CreateSystemEventbusIfNotExist

func (mr *MockEventbusServiceMockRecorder) CreateSystemEventbusIfNotExist(ctx, name, desc interface{}) *gomock.Call

CreateSystemEventbusIfNotExist indicates an expected call of CreateSystemEventbusIfNotExist.

func (*MockEventbusServiceMockRecorder) Delete

func (mr *MockEventbusServiceMockRecorder) Delete(ctx, id interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockEventbusServiceMockRecorder) GetEventbus

func (mr *MockEventbusServiceMockRecorder) GetEventbus(ctx, id interface{}) *gomock.Call

GetEventbus indicates an expected call of GetEventbus.

func (*MockEventbusServiceMockRecorder) GetEventbusByName

func (mr *MockEventbusServiceMockRecorder) GetEventbusByName(ctx, ns, name interface{}) *gomock.Call

GetEventbusByName indicates an expected call of GetEventbusByName.

func (*MockEventbusServiceMockRecorder) GetSystemEventbusByName

func (mr *MockEventbusServiceMockRecorder) GetSystemEventbusByName(ctx, name interface{}) *gomock.Call

GetSystemEventbusByName indicates an expected call of GetSystemEventbusByName.

func (*MockEventbusServiceMockRecorder) RawClient

func (mr *MockEventbusServiceMockRecorder) RawClient() *gomock.Call

RawClient indicates an expected call of RawClient.

type MockEventlogService

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

MockEventlogService is a mock of EventlogService interface.

func NewMockEventlogService

func NewMockEventlogService(ctrl *gomock.Controller) *MockEventlogService

NewMockEventlogService creates a new mock instance.

func (*MockEventlogService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEventlogService) RawClient

RawClient mocks base method.

type MockEventlogServiceMockRecorder

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

MockEventlogServiceMockRecorder is the mock recorder for MockEventlogService.

func (*MockEventlogServiceMockRecorder) RawClient

func (mr *MockEventlogServiceMockRecorder) RawClient() *gomock.Call

RawClient indicates an expected call of RawClient.

type MockIDService

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

MockIDService is a mock of IDService interface.

func NewMockIDService

func NewMockIDService(ctrl *gomock.Controller) *MockIDService

NewMockIDService creates a new mock instance.

func (*MockIDService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIDService) RawClient

RawClient mocks base method.

type MockIDServiceMockRecorder

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

MockIDServiceMockRecorder is the mock recorder for MockIDService.

func (*MockIDServiceMockRecorder) RawClient

func (mr *MockIDServiceMockRecorder) RawClient() *gomock.Call

RawClient indicates an expected call of RawClient.

type MockNamespaceService

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

MockNamespaceService is a mock of NamespaceService interface.

func NewMockNamespaceService

func NewMockNamespaceService(ctrl *gomock.Controller) *MockNamespaceService

NewMockNamespaceService creates a new mock instance.

func (*MockNamespaceService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNamespaceService) GetDefaultNamespace

func (m *MockNamespaceService) GetDefaultNamespace(ctx context.Context) (*meta.Namespace, error)

GetDefaultNamespace mocks base method.

func (*MockNamespaceService) GetNamespace

func (m *MockNamespaceService) GetNamespace(ctx context.Context, id uint64) (*meta.Namespace, error)

GetNamespace mocks base method.

func (*MockNamespaceService) GetNamespaceByName

func (m *MockNamespaceService) GetNamespaceByName(ctx context.Context, name string) (*meta.Namespace, error)

GetNamespaceByName mocks base method.

func (*MockNamespaceService) GetSystemNamespace

func (m *MockNamespaceService) GetSystemNamespace(ctx context.Context) (*meta.Namespace, error)

GetSystemNamespace mocks base method.

func (*MockNamespaceService) RawClient

RawClient mocks base method.

type MockNamespaceServiceMockRecorder

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

MockNamespaceServiceMockRecorder is the mock recorder for MockNamespaceService.

func (*MockNamespaceServiceMockRecorder) GetDefaultNamespace

func (mr *MockNamespaceServiceMockRecorder) GetDefaultNamespace(ctx interface{}) *gomock.Call

GetDefaultNamespace indicates an expected call of GetDefaultNamespace.

func (*MockNamespaceServiceMockRecorder) GetNamespace

func (mr *MockNamespaceServiceMockRecorder) GetNamespace(ctx, id interface{}) *gomock.Call

GetNamespace indicates an expected call of GetNamespace.

func (*MockNamespaceServiceMockRecorder) GetNamespaceByName

func (mr *MockNamespaceServiceMockRecorder) GetNamespaceByName(ctx, name interface{}) *gomock.Call

GetNamespaceByName indicates an expected call of GetNamespaceByName.

func (*MockNamespaceServiceMockRecorder) GetSystemNamespace

func (mr *MockNamespaceServiceMockRecorder) GetSystemNamespace(ctx interface{}) *gomock.Call

GetSystemNamespace indicates an expected call of GetSystemNamespace.

func (*MockNamespaceServiceMockRecorder) RawClient

func (mr *MockNamespaceServiceMockRecorder) RawClient() *gomock.Call

RawClient indicates an expected call of RawClient.

type MockSegmentService

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

MockSegmentService is a mock of SegmentService interface.

func NewMockSegmentService

func NewMockSegmentService(ctrl *gomock.Controller) *MockSegmentService

NewMockSegmentService creates a new mock instance.

func (*MockSegmentService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSegmentService) RawClient

RawClient mocks base method.

func (*MockSegmentService) RegisterHeartbeat

func (m *MockSegmentService) RegisterHeartbeat(ctx context.Context, interval time.Duration, reqFunc func() interface{}) error

RegisterHeartbeat mocks base method.

type MockSegmentServiceMockRecorder

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

MockSegmentServiceMockRecorder is the mock recorder for MockSegmentService.

func (*MockSegmentServiceMockRecorder) RawClient

func (mr *MockSegmentServiceMockRecorder) RawClient() *gomock.Call

RawClient indicates an expected call of RawClient.

func (*MockSegmentServiceMockRecorder) RegisterHeartbeat

func (mr *MockSegmentServiceMockRecorder) RegisterHeartbeat(ctx, interval, reqFunc interface{}) *gomock.Call

RegisterHeartbeat indicates an expected call of RegisterHeartbeat.

type MockTriggerService

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

MockTriggerService is a mock of TriggerService interface.

func NewMockTriggerService

func NewMockTriggerService(ctrl *gomock.Controller) *MockTriggerService

NewMockTriggerService creates a new mock instance.

func (*MockTriggerService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTriggerService) GetSubscription

func (m *MockTriggerService) GetSubscription(ctx context.Context, id uint64) (*meta.Subscription, error)

GetSubscription mocks base method.

func (*MockTriggerService) RawClient

RawClient mocks base method.

func (*MockTriggerService) RegisterHeartbeat

func (m *MockTriggerService) RegisterHeartbeat(ctx context.Context, interval time.Duration, reqFunc func() interface{}) error

RegisterHeartbeat mocks base method.

type MockTriggerServiceMockRecorder

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

MockTriggerServiceMockRecorder is the mock recorder for MockTriggerService.

func (*MockTriggerServiceMockRecorder) GetSubscription

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

GetSubscription indicates an expected call of GetSubscription.

func (*MockTriggerServiceMockRecorder) RawClient

func (mr *MockTriggerServiceMockRecorder) RawClient() *gomock.Call

RawClient indicates an expected call of RawClient.

func (*MockTriggerServiceMockRecorder) RegisterHeartbeat

func (mr *MockTriggerServiceMockRecorder) RegisterHeartbeat(ctx, interval, reqFunc interface{}) *gomock.Call

RegisterHeartbeat indicates an expected call of RegisterHeartbeat.

type NamespaceService

type NamespaceService interface {
	RawClient() ctrlpb.NamespaceControllerClient
	GetSystemNamespace(ctx context.Context) (*metapb.Namespace, error)
	GetDefaultNamespace(ctx context.Context) (*metapb.Namespace, error)
	GetNamespace(ctx context.Context, id uint64) (*metapb.Namespace, error)
	GetNamespaceByName(ctx context.Context, name string) (*metapb.Namespace, error)
}

type SegmentService

type SegmentService interface {
	RegisterHeartbeat(ctx context.Context, interval time.Duration, reqFunc func() interface{}) error
	RawClient() ctrlpb.SegmentControllerClient
}

type Topology

type Topology struct {
	ControllerLeader string
	ControllerURLs   []string
	Uptime           time.Time
}

type TriggerService

type TriggerService interface {
	RawClient() ctrlpb.TriggerControllerClient
	GetSubscription(ctx context.Context, id uint64) (*metapb.Subscription, error)
	RegisterHeartbeat(ctx context.Context, interval time.Duration, reqFunc func() interface{}) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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