engine

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Run() error
	Modem() modem.Modem
}

Engine exposes the interface of the engine

func New

func New(opt *Options) (Engine, error)

New creates new Engine from options

type EventReaction

type EventReaction struct {
	Condition condition.Condition
	Reaction  func(ev event.Event, state state.State) []task.Task
}

EventReaction is a binding of an event to a function that builds tasks

type KubernetesOptions

type KubernetesOptions struct {
	Path                string
	Context             string
	Namespace           string
	InCluster           bool
	Host                string
	B64Crt              string
	Token               string
	LogsVolumeClaimName string
	LogsVolumeName      string
}

KubernetesOptions when running in/with kubernetes cluster

type Options

type Options struct {
	Pipeline Pipeline
	// LogsDirectory path where to store logs
	LogsDirectory string
	Kubeconfig    *KubernetesOptions
	Logger        logger.Logger
	// contains filtered or unexported fields
}

Options to create new engine

type Pipeline

type Pipeline struct {
	Metadata PipelineMetadata
	Spec     PipelineSpec
}

Pipeline is the pipeline representation

type PipelineMetadata

type PipelineMetadata struct {
	Name         string
	OS           string
	Architecture string
}

PipelineMetadata holds all the metadata of a pipeline

type PipelineSpec

type PipelineSpec struct {
	Reactions []EventReaction
	Services  []Service
}

PipelineSpec is the spec of a pipeline

type Service

type Service struct {
	// Name is official service which is part of the service catalog
	Name string
	// Version of the service, empty string will use the latest version from catalog
	Version string
	// Path a location of the local fs the service can be found, Path cannot be set with Name together
	Path string
	// As alias name to refer the service as part of the task implementation
	As string
}

Service is a Service a pipeline should execute

Jump to

Keyboard shortcuts

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