services

package
v0.0.0-...-a5c446f Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefinitionService

type DefinitionService interface {
	Create(definition *state.Definition) (state.Definition, error)
	Get(definitionID string) (state.Definition, error)
	GetByAlias(alias string) (state.Definition, error)
	List(limit int, offset int, sortBy string,
		order string, filters map[string][]string,
		envFilters map[string]string) (state.DefinitionList, error)
	Update(definitionID string, updates state.Definition) (state.Definition, error)
	Delete(definitionID string) error

	// Metadata oriented
	ListGroups(limit int, offset int, name *string) (state.GroupsList, error)
	ListTags(limit int, offset int, name *string) (state.TagsList, error)
}

DefinitionService defines an interface for operations involving definitions * Like the ExecutionService, is an intermediary layer between state and the execution engine

func NewDefinitionService

func NewDefinitionService(stateManager state.Manager) (DefinitionService, error)

NewDefinitionService configures and returns a DefinitionService

type ExecutionService

type ExecutionService interface {
	CreateDefinitionRunByDefinitionID(definitionID string, req *state.DefinitionExecutionRequest) (state.Run, error)
	CreateDefinitionRunByAlias(alias string, req *state.DefinitionExecutionRequest) (state.Run, error)
	List(
		limit int,
		offset int,
		sortOrder string,
		sortField string,
		filters map[string][]string,
		envFilters map[string]string) (state.RunList, error)
	Get(runID string) (state.Run, error)
	UpdateStatus(runID string, status string, exitCode *int64, runExceptions *state.RunExceptions, exitReason *string) error
	Terminate(runID string, userInfo state.UserInfo) error
	ReservedVariables() []string
	ListClusters() ([]string, error)
	GetDefaultCluster() string
	GetEvents(run state.Run) (state.PodEventList, error)
	CreateTemplateRunByTemplateID(templateID string, req *state.TemplateExecutionRequest) (state.Run, error)
	CreateTemplateRunByTemplateName(templateName string, templateVersion string, req *state.TemplateExecutionRequest) (state.Run, error)
}

ExecutionService interacts with the state manager and queue manager to queue runs, and perform CRUD operations on them * Acts as an intermediary layer between state and the execution engine

func NewExecutionService

func NewExecutionService(conf config.Config, eksExecutionEngine engine.Engine, sm state.Manager, eksClusterClient cluster.Client, emrExecutionEngine engine.Engine) (ExecutionService, error)

NewExecutionService configures and returns an ExecutionService

type LogService

type LogService interface {
	Logs(runID string, lastSeen *string, role *string, facility *string) (string, *string, error)
	LogsText(runID string, w http.ResponseWriter) error
}

func NewLogService

func NewLogService(sm state.Manager, lc logs.Client) (LogService, error)

Initialize a Log service.

type TemplateService

type TemplateService interface {
	GetByID(id string) (state.Template, error)
	GetLatestByName(templateName string) (bool, state.Template, error)
	List(limit int, offset int, sortBy string, order string) (state.TemplateList, error)
	ListLatestOnly(limit int, offset int, sortBy string, order string) (state.TemplateList, error)
	Create(tpl *state.CreateTemplateRequest) (state.CreateTemplateResponse, error)
}

TemplateService defines an interface for operations involving templates.

func NewTemplateService

func NewTemplateService(conf config.Config, sm state.Manager) (TemplateService, error)

NewTemplateService configures and returns a TemplateService.

type WorkerService

type WorkerService interface {
	List(engine string) (state.WorkersList, error)
	Get(workerType string, engine string) (state.Worker, error)
	Update(workerType string, updates state.Worker) (state.Worker, error)
	BatchUpdate(updates []state.Worker) (state.WorkersList, error)
}

WorkerService defines an interface for operations involving workers

func NewWorkerService

func NewWorkerService(conf config.Config, sm state.Manager) (WorkerService, error)

NewWorkerService configures and returns a WorkerService

Jump to

Keyboard shortcuts

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