workermodel

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactMeta

type ArtifactMeta struct {
	Name string
}

ArtifactMeta holds metadata about an artifact created during building.

type Status

type Status byte

Status is an enum of the different statuses for a Wharf build, stage, or step.

const (
	// StatusUnknown means no status has been set. This is an errornous status.
	StatusUnknown Status = iota
	// StatusNone means no execution has been performed. Such as when running a
	// Wharf build stage with no steps.
	StatusNone
	// StatusScheduling means the step is not yet running.
	StatusScheduling
	// StatusInitializing means the step is still not yet running, but
	// initialization has started.
	StatusInitializing
	// StatusRunning means the step is now running.
	StatusRunning
	// StatusSuccess means the build succeeded.
	StatusSuccess
	// StatusFailed means the build failed. More details of how it failed can be
	// found in the StepResult.Error field.
	StatusFailed
	// StatusCancelled means the build, stage, or step was cancelled.
	StatusCancelled
)

func ParseStatus

func ParseStatus(s string) Status

ParseStatus parses a string as a status, or return StatusUnknown if it cannot find a matching status value. This is the inverse of the Status.String() method.

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (Status) String

func (s Status) String() string

String implements the fmt.Stringer interface.

func (*Status) UnmarshalJSON

func (s *Status) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

Jump to

Keyboard shortcuts

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