actors

package
v0.0.0-...-dc3d092 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionFuncMap map[string]*ActionLayout = map[string]*ActionLayout{
	"run_script":       {F: RunScript, N: NextOKKO},
	"define_envs":      {F: DefineEnvs, N: NextOKKO},
	"define_variables": {F: DefineVars, N: NextOKKO},
	"upload_files":     {F: RemoteCopy, N: NextOKKO},
	"download_files":   {F: RemoteCopy, N: NextOKKO},
	"condition":        {F: ConditionParse, N: NextOKKO},
	"start":            {F: Start, N: NextOKKO},
	"stop":             {F: Stop, N: NextOKKO},
	"sleep":            {F: Sleep, N: NextOKKO},
	"ok/ko":            {F: OKKO, N: NextOKKO},
	"log":              {F: Log, N: NextOKKO},
	"noop":             {F: NOOP, N: NextOK},
	"panic":            {F: Panic, N: NextOKKO},

	"join_threads": {F: NOOP, N: NextOK},
}

ActionFuncMap map

Functions

func ConditionParse

func ConditionParse(ctx *ActionContext) (*base.ActionOutput, error)

ConditionParse func

func DefineEnvs

func DefineEnvs(ctx *ActionContext) (*base.ActionOutput, error)

func DefineVars

func DefineVars(ctx *ActionContext) (*base.ActionOutput, error)

DefineVars func

func Log

func Log(ctx *ActionContext) (*base.ActionOutput, error)

Log func

func NOOP

func NOOP(ctx *ActionContext) (*base.ActionOutput, error)

func OKKO

func OKKO(ctx *ActionContext) (*base.ActionOutput, error)

OKKO func

func Panic

func Panic(ctx *ActionContext) (*base.ActionOutput, error)

Panic func

func RemoteCopy

func RemoteCopy(ctx *ActionContext) (*base.ActionOutput, error)

func RunLocalScript

func RunLocalScript(ctx *ActionContext) (*base.ActionOutput, error)

RunLocalScript func

func RunRemoteScript

func RunRemoteScript(ctx *ActionContext) (*base.ActionOutput, error)

RunRemoteScript func

func RunScript

func RunScript(ctx *ActionContext) (*base.ActionOutput, error)

func ScpCopy

func ScpCopy(ctx *ActionContext) (*base.ActionOutput, error)

func Sleep

func Sleep(ctx *ActionContext) (*base.ActionOutput, error)

Sleep func

func Start

func Start(ctx *ActionContext) (*base.ActionOutput, error)

func Stop

func Stop(ctx *ActionContext) (*base.ActionOutput, error)

Types

type ActionContext

type ActionContext struct {
	Action *blueprint.Action
	Store  base.IStore
	Logger base.ILogger
}

ActionContext struct

type ActionFunc

type ActionFunc func(ctx *ActionContext) (*base.ActionOutput, error)

ActionFunc func

type ActionLayout

type ActionLayout struct {
	F ActionFunc
	N NextType
}

ActionLayout struct

type Condition

type Condition struct {
	ID         string       `json:"id"`
	Field      string       `json:"field"`
	Operator   string       `json:"operator"`
	Value      string       `json:"value"`
	Rules      []*Condition `json:"rules"`
	Combinator string       `json:"combinator"`
	//
	Not bool `json:"not"`
	// contains filtered or unexported fields
}

Condition struct

type LogFunc

type LogFunc func(b []byte)

type NextType

type NextType int

NextType int

const (
	// NextOKKO const 0
	NextOKKO NextType = iota
	// NextOK const 1
	NextOK
	// NextKO const
	NextKO
)

Jump to

Keyboard shortcuts

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