direktiv

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 103 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WorkflowStateSubscription is the channel that runs workflow states.
	WorkflowStateSubscription = "workflow-state"
)

Variables

View Source
var (
	ErrCodeJQBadQuery        = "direktiv.jq.badCommand"
	ErrCodeJQNotObject       = "direktiv.jq.notObject"
	ErrCodeMultipleErrors    = "direktiv.workflow.multipleErrors"
	ErrCodeAllBranchesFailed = "direktiv.parallel.allFailed"
)
View Source
var PartitionName = []byte{0x76, 0x0, 0x6f, 0x0, 0x72, 0x0, 0x74, 0x0, 0x65, 0x0, 0x69, 0x0,

	0x6c, 0x0, 0x2d, 0x0, 0x72, 0x0, 0x6f, 0x0, 0x6f, 0x0, 0x74, 0x0} // "vorteil-root" in utf16

PartitionName of the disk

View Source
var PartitionUUID = []byte{
	0x7d, 0x44, 0x48, 0x40,
	0x9d, 0xc0, 0x11, 0xd1,
	0xb2, 0x45, 0x5f, 0xfd,
	0xce, 0x74, 0xfa, 0xd3,
}

PartitionUUID of the disk

Functions

func WrapCatchableError

func WrapCatchableError(msg string, err error) error

Types

type CatchableError

type CatchableError struct {
	Code    string `json:"code"`
	Message string `json:"msg"`
}

func NewCatchableError

func NewCatchableError(code string, msg string, a ...interface{}) *CatchableError

func (*CatchableError) Error

func (err *CatchableError) Error() string

type CmdErrorResponse

type CmdErrorResponse struct {
	Error string    `json:"error"`
	Type  ErrorType `json:"type"`
}

CmdErrorResponse struct for responding when command has an error

type Config

type Config struct {
	FlowAPI struct {
		Bind     string
		Endpoint string
		Registry struct {
			Name, User, Token string
		}
	} `toml:"flowAPI"`

	IngressAPI struct {
		Bind     string
		Endpoint string
	} `toml:"ingressAPI"`

	IsolateAPI struct {
		Bind      string
		Endpoint  string
		Isolation string
	} `toml:"isolateAPI"`

	SecretsAPI struct {
		Bind     string
		Endpoint string
		DB       string
	} `toml:"secretsAPI"`

	Database struct {
		DB string
	}

	Certs struct {
		Directory string
		Secure    int
	}

	InstanceLogging struct {
		Driver string
	}

	Minio struct {
		Secure, SSL    int
		User, Password string
		Endpoint       string
		Encrypt        string
		Region         string
	}

	Kernel struct {
		Linux, Runtime string
	}

	Registries map[string]string
}

Config is the configuration for workflow and runner server

func ReadConfig

func ReadConfig(file string) (*Config, error)

ReadConfig reads the configuration file and overwrites with environment variables if set

type ContainerAuth

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

ContainerAuth implements authn.Authorize. Used for token authentication

func (*ContainerAuth) Authorization

func (f *ContainerAuth) Authorization() (*authn.AuthConfig, error)

Authorization interface impl

type ErrorType

type ErrorType int

ErrorType types of errors direktiv commands can return

const (
	DirektivError ErrorType = iota
	// Ent Errors
	ValidationError
	NotFoundError
	NotSingularError
	NotLoadedError
	ConstraintError
)

func GetErrorType

func GetErrorType(err error) ErrorType

GetErrorType get Error Type from passed error

type GPT

type GPT struct {
	DiskSize int64
	// contains filtered or unexported fields
}

func GenerateGPT

func GenerateGPT(size vcfg.Bytes) (*GPT, error)

func (*GPT) WriteBackup

func (gpt *GPT) WriteBackup(w io.Writer) error

func (*GPT) WritePrimary

func (gpt *GPT) WritePrimary(w io.Writer) error

type InternalError

type InternalError struct {
	Err      error
	Function string
	File     string
	Line     int
}

func NewInternalError

func NewInternalError(err error) *InternalError

func NewInternalErrorWithDepth

func NewInternalErrorWithDepth(err error, depth int) *InternalError

func (*InternalError) Error

func (err *InternalError) Error() string

func (*InternalError) Unwrap

func (err *InternalError) Unwrap() error

type IsolateError

type IsolateError struct {
	ErrorCode    string `json:"errorCode"`
	ErrorMessage string `json:"errorMessage"`
}

IsolateError is the struct returned from isolates if there is an error

type UncatchableError

type UncatchableError struct {
	Code    string
	Message string
}

func NewUncatchableError

func NewUncatchableError(code, msg string, a ...interface{}) *UncatchableError

func (*UncatchableError) Error

func (err *UncatchableError) Error() string

type WorkflowServer

type WorkflowServer struct {
	LifeLine chan bool
	// contains filtered or unexported fields
}

WorkflowServer is a direktiv server

func NewWorkflowServer

func NewWorkflowServer(config *Config, serverType string) (*WorkflowServer, error)

NewWorkflowServer creates a new workflow server

func (*WorkflowServer) Kill

func (s *WorkflowServer) Kill()

Kill kills the server

func (*WorkflowServer) Lifeline

func (s *WorkflowServer) Lifeline() chan bool

Lifeline interface impl

func (*WorkflowServer) Run

func (s *WorkflowServer) Run() error

Run starts all components of direktiv

func (*WorkflowServer) SetInstanceLogger

func (s *WorkflowServer) SetInstanceLogger(l dlog.Log)

SetInstanceLogger set logger for direktiv for firecracker instances

func (*WorkflowServer) Stop

func (s *WorkflowServer) Stop()

Stop stops the server gracefully

Jump to

Keyboard shortcuts

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