status

package
v2.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 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

InProgress any .Status == InProgressStatus command shall return true, https://github.com/Altinity/clickhouse-backup/issues/827

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