status

package
v2.4.17 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InProgressStatus = "in progress"
	SuccessStatus    = "success"
	CancelStatus     = "cancel"
	ErrorStatus      = "error"
)
View Source
const NotFromAPI = int(-1)

Variables

View Source
var Current = &AsyncStatus{
	log: apexLog.WithField("logger", "status"),
}

Functions

This section is empty.

Types

type ActionRow

type ActionRow struct {
	ActionRowStatus
	Ctx    context.Context
	Cancel context.CancelFunc
}

type ActionRowStatus

type ActionRowStatus struct {
	Command string `json:"command"`
	Status  string `json:"status"`
	Start   string `json:"start,omitempty"`
	Finish  string `json:"finish,omitempty"`
	Error   string `json:"error,omitempty"`
}

type AsyncStatus

type AsyncStatus struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*AsyncStatus) Cancel

func (status *AsyncStatus) Cancel(command string, err error) error

func (*AsyncStatus) CancelAll

func (status *AsyncStatus) CancelAll(cancelMsg string)

func (*AsyncStatus) CheckCommandInProgress

func (status *AsyncStatus) CheckCommandInProgress(command string) bool

func (*AsyncStatus) GetContextWithCancel

func (status *AsyncStatus) GetContextWithCancel(commandId int) (context.Context, context.CancelFunc, error)

func (*AsyncStatus) GetStatus

func (status *AsyncStatus) GetStatus(current bool, filter string, last int) []ActionRowStatus

func (*AsyncStatus) InProgress

func (status *AsyncStatus) InProgress() bool

func (*AsyncStatus) Start

func (status *AsyncStatus) Start(command string) (int, context.Context)

func (*AsyncStatus) Stop

func (status *AsyncStatus) Stop(commandId int, err error)

Jump to

Keyboard shortcuts

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