runner

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Local type using gGRPC to connect to
	Local = "local"

	// Kubernetes type
	Kubernetes = "kubernetes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Schemas() map[string]string // TODO: cache!
}

API expose general methods

type Caller

type Caller interface {
	Call(context context.Context, req *v1.CallRequest) (*v1.CallResponse, error)
}

Caller to call the service

type Killer

type Killer interface {
	Kill() error
}

Killer stop the the service

type MockService

type MockService struct {
	mock.Mock
}

MockService is an autogenerated mock type for the Service type

func (*MockService) Call

func (_m *MockService) Call(_a0 context.Context, req *v1.CallRequest) (*v1.CallResponse, error)

Call provides a mock function with given fields: _a0, req

func (*MockService) Kill

func (_m *MockService) Kill() error

Kill provides a mock function with given fields:

func (*MockService) Run

func (_m *MockService) Run() error

Run provides a mock function with given fields:

func (*MockService) Schemas

func (_m *MockService) Schemas() map[string]string

Schemas provides a mock function with given fields:

type Options

type Options struct {
	Type                 string
	Name                 string
	ID                   string
	Version              string
	Logger               logger.Logger
	Dailer               dialer
	PortGenerator        portGenerator
	ServiceClientCreator serviceClientCreator
	LogsDirectory        string

	// Local runner options
	LocalLogFileCreator logFileCreator
	LocalCommandCreator cmdCreator
	LocalPathToBinary   string

	// Kubernetes runner options
	KubernetesKubeConfigPath   string
	KubernetesContext          string
	KubernetesNamespace        string
	KubeconfigHost             string
	KubeconfigB64Crt           string
	KubeconfigToken            string
	Kube                       kube
	KubernetesGrpcDialViaPodIP bool
	KubernetesVolumeClaimName  string
	KubernetesVolumeName       string
}

Options shows all the available options to build runner

type Service

type Service interface {
	Run() error
	Caller
	Killer
	API
}

Service expose an interface to manage services

func New

func New(opt *Options) Service

New builds new runner based on Options.Type

Jump to

Keyboard shortcuts

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