workflow

package
v0.0.0-...-39ea062 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	User     string
	Password string
}

type CacheData

type CacheData struct {
	Path string
}

type Condition

type Condition common.TemplateValue

func (Condition) False

func (c Condition) False(ctx interface{}) bool

type Event

type Event struct {
	Job      string `json:"job,omitempty"`
	Task     string `json:"task,omitempty"`
	Step     string `json:"step,omitempty"`
	Event    string `json:"event,omitempty"`
	Err      error  `json:"err"`
	JobState `json:"status"`
	Timing   int64 `json:"timing"`
}

type FileInfobaseConfig

type FileInfobaseConfig struct {
	File string `config:"file,required" json:"file"`
}

type Infobase

type Infobase struct {
	v8.Infobase
	Name string
	ID   string
}

func NewInfobase

func NewInfobase(ctx interface{}, globalAuth Auth, config config.InfobaseConfig) (Infobase, error)

type Job

type Job struct {
	ID        string
	Name      string
	Group     string
	Infobase  Infobase
	Outputs   Values
	Steps     []Step
	State     JobState
	Condition Condition
	Needs     []string
	// contains filtered or unexported fields
}

func (*Job) Err

func (j *Job) Err() error

func (*Job) FuncMap

func (t *Job) FuncMap() map[string]interface{}

func (*Job) Run

func (t *Job) Run(ctx context.Context)

type JobState

type JobState int
const (
	Pending JobState = iota
	Running
	Skip
	Success
	Error
)

func (JobState) String

func (h JobState) String() string

type OutputConfig

type OutputConfig struct {
	Type string `json:"type" yaml:"type"`
}

type ServerInfobaseConfig

type ServerInfobaseConfig struct {
	Serv string `config:"srv,required" json:"srv"`
	Ref  string `config:"ref,required" json:"ref"`
}

type Step

type Step struct {
	ID        string
	Name      string
	Params    map[string]interface{}
	Outputs   map[string]OutputConfig
	Uses      string
	Condition Condition
	Cache     *CacheData
	State     JobState
	// contains filtered or unexported fields
}

func (*Step) Run

func (s *Step) Run(ctx context.Context) error

type Values

type Values map[string]interface{}

type ValuesMap

type ValuesMap map[string]string

type Workflow

type Workflow struct {
	Name   string
	Env    Values
	Params Values

	MaxParallel int

	InfobaseList []Infobase
	Tasks        []*Job

	CurrentTaskIdx int
}

func NewWorkflow

func NewWorkflow(cfg config.Config) (*Workflow, error)

func (*Workflow) FuncMap

func (w *Workflow) FuncMap() map[string]interface{}

func (*Workflow) Run

func (w *Workflow) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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