workflow

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Workflows map[string]Workflow // the key is the filename for the workflow
	// contains filtered or unexported fields
}

func New

func New(path string, opts *file.Options) (*Cache, error)

New returns a Cache used to manage auto updating a workflow

func (*Cache) Children

func (c *Cache) Children(t task.Task) []Phase

Children of the given task t, a child phase is one that dependsOn another task Empty slice will be returned if no children are found. A task without a type or meta data containing the workflow info will result in an error

func (*Cache) Close

func (c *Cache) Close() error

Close the cache

func (*Cache) Get

func (c *Cache) Get(t task.Task) Phase

Get the Phase associated with the task t

func (*Cache) Refresh

func (c *Cache) Refresh() (files []string, err error)

Refresh checks the cache and reloads any files in the checksum has changed.

type Phase

type Phase struct {
	Task      string // doubles as the Name of the topic to send data to
	Rule      string
	DependsOn string // Task that the previous workflow depends on
	Retry     int
	Template  string // template used to create the task
}

type Workflow

type Workflow struct {
	Checksum string  // md5 hash for the file to check for changes
	Phases   []Phase `toml:"phase"`
}

func (Workflow) Parent

func (r Workflow) Parent() (p []Phase)

Parent phase for the specified workflow file. A parent phase is one that doesn't depend on any other tasks

Jump to

Keyboard shortcuts

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