client

package
v0.0.0-...-1427ac7 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package client is a generated GoMock package.

Package client is a generated GoMock package.

Package client is a generated GoMock package.

Index

Constants

Variables

This section is empty.

Functions

func DefaultDialOptions

func DefaultDialOptions() []grpc.DialOption

Types

type Conn

type Conn interface {
	grpc.ClientConnInterface
	io.Closer
}

type ExecutionInfo

type ExecutionInfo struct {
	Duration time.Duration
	Output   []byte
	Status   Status
	Message  string
	Id       string
}

func (ExecutionInfo) String

func (e ExecutionInfo) String() string

type GRPCError

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

func (*GRPCError) Error

func (e *GRPCError) Error() string

func (*GRPCError) GetDetailsMap

func (e *GRPCError) GetDetailsMap() map[string]interface{}

type Method

type MockSchedulerServiceClient

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

MockSchedulerServiceClient is a mock of SchedulerServiceClient interface

func NewMockSchedulerServiceClient

func NewMockSchedulerServiceClient(ctrl *gomock.Controller) *MockSchedulerServiceClient

NewMockSchedulerServiceClient creates a new mock instance

func (*MockSchedulerServiceClient) EXPECT

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

func (*MockSchedulerServiceClient) ExecutionNotifications

ExecutionNotifications mocks base method

func (*MockSchedulerServiceClient) ScheduleCommandTask

ScheduleCommandTask mocks base method

func (*MockSchedulerServiceClient) ScheduleDummyTask

ScheduleDummyTask mocks base method

func (*MockSchedulerServiceClient) ScheduleRemoteTask

ScheduleRemoteTask mocks base method

type MockSchedulerServiceClientMockRecorder

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

MockSchedulerServiceClientMockRecorder is the mock recorder for MockSchedulerServiceClient

func (*MockSchedulerServiceClientMockRecorder) ExecutionNotifications

func (mr *MockSchedulerServiceClientMockRecorder) ExecutionNotifications(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

ExecutionNotifications indicates an expected call of ExecutionNotifications

func (*MockSchedulerServiceClientMockRecorder) ScheduleCommandTask

func (mr *MockSchedulerServiceClientMockRecorder) ScheduleCommandTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

ScheduleCommandTask indicates an expected call of ScheduleCommandTask

func (*MockSchedulerServiceClientMockRecorder) ScheduleDummyTask

func (mr *MockSchedulerServiceClientMockRecorder) ScheduleDummyTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

ScheduleDummyTask indicates an expected call of ScheduleDummyTask

func (*MockSchedulerServiceClientMockRecorder) ScheduleRemoteTask

func (mr *MockSchedulerServiceClientMockRecorder) ScheduleRemoteTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

ScheduleRemoteTask indicates an expected call of ScheduleRemoteTask

type MockSchedulerServiceServer

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

MockSchedulerServiceServer is a mock of SchedulerServiceServer interface

func NewMockSchedulerServiceServer

func NewMockSchedulerServiceServer(ctrl *gomock.Controller) *MockSchedulerServiceServer

NewMockSchedulerServiceServer creates a new mock instance

func (*MockSchedulerServiceServer) EXPECT

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

func (*MockSchedulerServiceServer) ExecutionNotifications

ExecutionNotifications mocks base method

func (*MockSchedulerServiceServer) ScheduleCommandTask

ScheduleCommandTask mocks base method

func (*MockSchedulerServiceServer) ScheduleDummyTask

ScheduleDummyTask mocks base method

func (*MockSchedulerServiceServer) ScheduleRemoteTask

ScheduleRemoteTask mocks base method

type MockSchedulerServiceServerMockRecorder

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

MockSchedulerServiceServerMockRecorder is the mock recorder for MockSchedulerServiceServer

func (*MockSchedulerServiceServerMockRecorder) ExecutionNotifications

func (mr *MockSchedulerServiceServerMockRecorder) ExecutionNotifications(arg0, arg1 interface{}) *gomock.Call

ExecutionNotifications indicates an expected call of ExecutionNotifications

func (*MockSchedulerServiceServerMockRecorder) ScheduleCommandTask

func (mr *MockSchedulerServiceServerMockRecorder) ScheduleCommandTask(arg0, arg1 interface{}) *gomock.Call

ScheduleCommandTask indicates an expected call of ScheduleCommandTask

func (*MockSchedulerServiceServerMockRecorder) ScheduleDummyTask

func (mr *MockSchedulerServiceServerMockRecorder) ScheduleDummyTask(arg0, arg1 interface{}) *gomock.Call

ScheduleDummyTask indicates an expected call of ScheduleDummyTask

func (*MockSchedulerServiceServerMockRecorder) ScheduleRemoteTask

func (mr *MockSchedulerServiceServerMockRecorder) ScheduleRemoteTask(arg0, arg1 interface{}) *gomock.Call

ScheduleRemoteTask indicates an expected call of ScheduleRemoteTask

type MockSchedulerService_ExecutionNotificationsClient

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

MockSchedulerService_ExecutionNotificationsClient is a mock of SchedulerService_ExecutionNotificationsClient interface

func NewMockSchedulerService_ExecutionNotificationsClient

func NewMockSchedulerService_ExecutionNotificationsClient(ctrl *gomock.Controller) *MockSchedulerService_ExecutionNotificationsClient

NewMockSchedulerService_ExecutionNotificationsClient creates a new mock instance

func (*MockSchedulerService_ExecutionNotificationsClient) CloseSend

CloseSend mocks base method

func (*MockSchedulerService_ExecutionNotificationsClient) Context

Context mocks base method

func (*MockSchedulerService_ExecutionNotificationsClient) EXPECT

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

func (*MockSchedulerService_ExecutionNotificationsClient) Header

Header mocks base method

func (*MockSchedulerService_ExecutionNotificationsClient) Recv

Recv mocks base method

func (*MockSchedulerService_ExecutionNotificationsClient) RecvMsg

func (m *MockSchedulerService_ExecutionNotificationsClient) RecvMsg(arg0 interface{}) error

RecvMsg mocks base method

func (*MockSchedulerService_ExecutionNotificationsClient) SendMsg

func (m *MockSchedulerService_ExecutionNotificationsClient) SendMsg(arg0 interface{}) error

SendMsg mocks base method

func (*MockSchedulerService_ExecutionNotificationsClient) Trailer

Trailer mocks base method

type MockSchedulerService_ExecutionNotificationsClientMockRecorder

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

MockSchedulerService_ExecutionNotificationsClientMockRecorder is the mock recorder for MockSchedulerService_ExecutionNotificationsClient

func (*MockSchedulerService_ExecutionNotificationsClientMockRecorder) CloseSend

CloseSend indicates an expected call of CloseSend

func (*MockSchedulerService_ExecutionNotificationsClientMockRecorder) Context

Context indicates an expected call of Context

func (*MockSchedulerService_ExecutionNotificationsClientMockRecorder) Header

Header indicates an expected call of Header

func (*MockSchedulerService_ExecutionNotificationsClientMockRecorder) Recv

Recv indicates an expected call of Recv

func (*MockSchedulerService_ExecutionNotificationsClientMockRecorder) RecvMsg

RecvMsg indicates an expected call of RecvMsg

func (*MockSchedulerService_ExecutionNotificationsClientMockRecorder) SendMsg

SendMsg indicates an expected call of SendMsg

func (*MockSchedulerService_ExecutionNotificationsClientMockRecorder) Trailer

Trailer indicates an expected call of Trailer

type RemoteConfig

type RemoteConfig struct {
	Method        Method
	URL           string
	Headers       map[string]string
	Body          []byte
	ExpectedCodes []uint32
	Timeout       time.Duration
}

type SchedulerClient

type SchedulerClient interface {
	ScheduleDummyTask(ctx context.Context, id string, time time.Time) error
	ScheduleCommandTask(
		ctx context.Context, id string, time time.Time, timeout time.Duration, command string, arguments ...string,
	) error
	ScheduleRemoteTask(ctx context.Context, id string, time time.Time, retries int32, config RemoteConfig) error
	ExecutionNotifications(ctx context.Context) (<-chan *ExecutionInfo, <-chan error, error)

	Close() error
}

func NewDefaultClient

func NewDefaultClient(host string, port int) (SchedulerClient, error)

func NewSchedulerClient

func NewSchedulerClient(host string, port int, options []grpc.DialOption) (SchedulerClient, error)

type Status

Jump to

Keyboard shortcuts

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