model

package
v1.14.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 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

func FormatTime(val time.Time) string

func Params

func Params(params []string) string

func Time

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

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

func FromSteps

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

func NewNode

func NewNode(step dag.Step) *Node

func (*Node) ToNode

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

type PID

type PID int

func (PID) IsRunning

func (p PID) IsRunning() bool

func (PID) String

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

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

func (*Status) CorrectRunningStatus

func (st *Status) CorrectRunningStatus()

func (*Status) ToJSON

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