config

package
v0.0.0-...-0548c99 Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	URL    string            `json:"url"`
	Method string            `json:"method"`
	Data   map[string]string `json:"data,omitempty"`
	Files  []*HTTPFile       `json:"files,omitempty"`
}

type HTTPFile

type HTTPFile struct {
	Filename string `json:"filename"`
	Path     string `json:"path"`
}

func (*HTTPFile) Err

func (f *HTTPFile) Err() error

type Job

type Job struct {
	Retry           *Retry       `json:retry,omitempty"`
	TaskDefault     *TaskDefault `json:"task_default,omitempty"`
	Tasks           []*Task      `json:"tasks"`
	FinishReportURL string       `json:"finish_report_url,omitempty"`
}

type Retry

type Retry struct {
	Number    int    `json:"number,omitempty"`
	Timeout   string `json:"timeout,omitempty"`
	DelayTime string `json:"delay,omitempty"`

	NumRetry    int        `json:"-"`
	CheckedTime *time.Time `json:"-"`
	// contains filtered or unexported fields
}

func (*Retry) GetDelayTime

func (r *Retry) GetDelayTime() (time.Duration, error)

func (*Retry) GetTimeout

func (r *Retry) GetTimeout() (*time.Duration, error)

func (*Retry) IncrRetry

func (r *Retry) IncrRetry() bool

type Task

type Task struct {
	Name    string `json:"name"`
	Cmd     string `json:"cmd,omitempty"`
	HTTP    *HTTP  `json:"http,omitempty"`
	When    string `json:"when,omitempty"`
	Timeout string `json:"timeout,omitempty"`
	Retry   Retry  `json:"retry,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Err

func (t *Task) Err() error

func (*Task) Ok

func (t *Task) Ok() bool

func (*Task) Output

func (t *Task) Output() string

func (*Task) Read

func (tr *Task) Read(val string, ctx interface{}) (string, error)

Read is to execute Template context for each variables

func (*Task) StartEndTimes

func (t *Task) StartEndTimes() []*time.Time

func (*Task) State

func (t *Task) State() string

func (*Task) TaskName

func (t *Task) TaskName() string

type TaskDefault

type TaskDefault struct {
	Retry   Retry             `json:"retry,omitempty"`
	Timeout string            `json:"timeout,omitempty"`
	Vars    map[string]string `json:"vars,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskDefault) Read

func (tr *TaskDefault) Read(val string, ctx interface{}) (string, error)

Read is to execute Template context for each variables

Jump to

Keyboard shortcuts

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