model

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTime added in v1.0.6

func FormatTime(val time.Time) string

func Params added in v1.0.6

func Params(params []string) string

func Time added in v1.0.6

func Time(t time.Time) *time.Time

Types

type Node

type Node struct {
	Step       dag.Step             `json:"Step"`
	Log        string               `json:"Log"`
	StartedAt  string               `json:"StartedAt"`
	FinishedAt string               `json:"FinishedAt"`
	Status     scheduler.NodeStatus `json:"Status"`
	RetryCount int                  `json:"RetryCount"`
	DoneCount  int                  `json:"DoneCount"`
	Error      string               `json:"Error"`
	StatusText string               `json:"StatusText"`
}

func FromNode

func FromNode(node scheduler.NodeData) *Node

func FromNodes

func FromNodes(nodes []scheduler.NodeData) []*Node

func FromNodesOrSteps added in v1.0.6

func FromNodesOrSteps(nodes []scheduler.NodeData, steps []dag.Step) []*Node

func FromSteps

func FromSteps(steps []dag.Step) []*Node

func NewNode added in v1.0.6

func NewNode(step dag.Step) *Node

func (*Node) ToNode

func (n *Node) ToNode() *scheduler.Node

type PID added in v1.0.6

type PID int

func (PID) IsRunning added in v1.0.6

func (p PID) IsRunning() bool

func (PID) String added in v1.0.6

func (p PID) String() string

type Status

type Status struct {
	RequestID  string           `json:"RequestId"`
	Name       string           `json:"Name"`
	Status     scheduler.Status `json:"Status"`
	StatusText string           `json:"StatusText"`
	PID        PID              `json:"Pid"`
	Nodes      []*Node          `json:"Nodes"`
	OnExit     *Node            `json:"OnExit"`
	OnSuccess  *Node            `json:"OnSuccess"`
	OnFailure  *Node            `json:"OnFailure"`
	OnCancel   *Node            `json:"OnCancel"`
	StartedAt  string           `json:"StartedAt"`
	FinishedAt string           `json:"FinishedAt"`
	Log        string           `json:"Log"`
	Params     string           `json:"Params"`
	// contains filtered or unexported fields
}

func NewStatus

func NewStatus(
	workflow *dag.DAG,
	nodes []scheduler.NodeData,
	status scheduler.Status,
	pid int,
	startTime, endTime *time.Time,
) *Status

func NewStatusDefault

func NewStatusDefault(workflow *dag.DAG) *Status

func StatusFromJSON added in v1.0.6

func StatusFromJSON(s string) (*Status, error)

func (*Status) CorrectRunningStatus

func (st *Status) CorrectRunningStatus()

func (*Status) ToJSON added in v1.0.6

func (st *Status) ToJSON() ([]byte, error)

type StatusFile

type StatusFile struct {
	File   string
	Status *Status
}

type StatusResponse

type StatusResponse struct {
	Status *Status `json:"status"`
}

Jump to

Keyboard shortcuts

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