optimus

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOptimusHostNotFound = errors.New("No Optimus jobs found in this project")
	ErrOptimusHostInvalid  = errors.New("Optimus host is not valid")
)

Functions

func Routes

func Routes(shieldClient shieldv1beta1rpc.ShieldServiceClient, optimusClient OptimusClientBuilder) func(r chi.Router)

Types

type ClientBuilder added in v0.7.19

type ClientBuilder struct{}

func (*ClientBuilder) BuildOptimusClient added in v0.7.19

type Handler

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

func NewHandler

func NewHandler(service *Service) *Handler

type OptimusClientBuilder added in v0.7.19

type OptimusClientBuilder interface {
	BuildOptimusClient(hostname string) (optimusv1beta1grpc.JobSpecificationServiceClient, error)
}

type OptimusClientBuilderMock added in v0.7.19

type OptimusClientBuilderMock interface {
	BuildOptimusClient(hostname string) (optimusv1beta1grpc.JobSpecificationServiceClient, error)
}

type OptimusClientMock added in v0.7.19

type OptimusClientMock struct {
	mock.Mock
}

func (*OptimusClientMock) BuildOptimusClient added in v0.7.19

func (mock *OptimusClientMock) BuildOptimusClient(hostname string) (optimusv1beta1grpc.JobSpecificationServiceClient, error)

type Service

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

func NewService

func NewService(shieldClient shieldv1beta1rpc.ShieldServiceClient, builder OptimusClientBuilder) *Service

func (*Service) FindJobSpec

func (svc *Service) FindJobSpec(ctx context.Context, jobName, projectSlug string) (*optimusv1beta1.JobSpecificationResponse, error)

func (*Service) ListJobs added in v0.7.12

func (svc *Service) ListJobs(ctx context.Context, projectSlug string) ([]*optimusv1beta1.JobSpecificationResponse, error)

Jump to

Keyboard shortcuts

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