services

package
v1.11.17 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package services is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleSubscription

func HandleSubscription[T Service, U interface{}](
	ctx context.Context,
	topic string,
	s T,
	get func() (U, error),
) (<-chan U, error)

func Map

func Map[T interface{}, U interface{}](list []T, mapper func(item T) U) []U

Types

type ExecutorsService

type ExecutorsService interface {
	List(selector string) ([]testkube.ExecutorDetails, error)
	SubscribeList(ctx context.Context, selector string) (<-chan []testkube.ExecutorDetails, error)
}

func NewExecutorsService

func NewExecutorsService(service Service, client *executorsclientv1.ExecutorsClient) ExecutorsService

type MockExecutorsService

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

MockExecutorsService is a mock of ExecutorsService interface.

func NewMockExecutorsService

func NewMockExecutorsService(ctrl *gomock.Controller) *MockExecutorsService

NewMockExecutorsService creates a new mock instance.

func (*MockExecutorsService) EXPECT

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

func (*MockExecutorsService) List

List mocks base method.

func (*MockExecutorsService) SubscribeList

func (m *MockExecutorsService) SubscribeList(arg0 context.Context, arg1 string) (<-chan []testkube.ExecutorDetails, error)

SubscribeList mocks base method.

type MockExecutorsServiceMockRecorder

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

MockExecutorsServiceMockRecorder is the mock recorder for MockExecutorsService.

func (*MockExecutorsServiceMockRecorder) List

func (mr *MockExecutorsServiceMockRecorder) List(arg0 interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockExecutorsServiceMockRecorder) SubscribeList

func (mr *MockExecutorsServiceMockRecorder) SubscribeList(arg0, arg1 interface{}) *gomock.Call

SubscribeList indicates an expected call of SubscribeList.

type MockService

type MockService interface {
	Service
	BusMock() *bus.EventBusMock
	Reset()
}

func NewMockService

func NewMockService() MockService

type Service

type Service interface {
	Bus() bus.Bus
	Logger() *zap.SugaredLogger
}

func NewService

func NewService(bus bus.Bus, logger *zap.SugaredLogger) Service

type ServiceBase

type ServiceBase struct {
	Service
}

func (*ServiceBase) Bus

func (s *ServiceBase) Bus() bus.Bus

func (*ServiceBase) Logger

func (s *ServiceBase) Logger() *zap.SugaredLogger

Jump to

Keyboard shortcuts

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