model

package
v1.12.11 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	*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(n *scheduler.Node) *Node

func FromNodes

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

func FromSteps

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

func (*Node) ToNode

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

type Pid

type Pid int
const PidNotRunning Pid = -1

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.SchedulerStatus `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"`
}

func NewStatus

func NewStatus(
	d *dag.DAG,
	nodes []*scheduler.Node,
	status scheduler.SchedulerStatus,
	pid int,
	startTime, endTIme *time.Time,
) *Status

func NewStatusDefault

func NewStatusDefault(d *dag.DAG) *Status

func StatusFromJson

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

func (*Status) CorrectRunningStatus

func (sts *Status) CorrectRunningStatus()

func (*Status) ToJson

func (sts *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