status

package
v0.1.62 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ANOTHER_OWNER string = "not_owner"
View Source
const BACKOFF string = "backoff"
View Source
const CATEGORY_END = 3
View Source
const CATEGORY_POSTRUN = 2
View Source
const CATEGORY_PRERUN = 0
View Source
const CATEGORY_WHILERUN = 1
View Source
const CLONED_GIT string = "cloned"
View Source
const CLONING_GIT string = "cloning"
View Source
const COMMIT_GIT string = "pushing_changes"
View Source
const CREATED string = "created"
View Source
const DELETE string = "pending_delete"
View Source
const DRIFTED string = "drifted"
View Source
const GIT_PUSH_SUCCESS string = "git_push_success"
View Source
const INSPECTING string = "inspecting"
View Source
const INSYNC string = "insync"
View Source
const INVALID_DEFINITIONS string = "definitions_invalid"
View Source
const INVALID_GIT string = "git_invalid"
View Source
const INVALID_GIT_PUSH string = "git_push_invalid"
View Source
const PENDING_DELETE = "delete"
View Source
const PENDING_SYNC = "pending_sync"
View Source
const SYNCING string = "syncing"
View Source
const SYNCING_STATE string = "syncing_state"

Variables

This section is empty.

Functions

This section is empty.

Types

type Pending added in v0.1.35

type Pending struct {
	Pending string
}

func NewPending added in v0.1.35

func NewPending() *Pending

func (*Pending) Clear added in v0.1.35

func (p *Pending) Clear()

func (*Pending) Is added in v0.1.35

func (p *Pending) Is(states ...string) bool

func (*Pending) Set added in v0.1.35

func (p *Pending) Set(state string) error

type Status

type Status struct {
	State            *StatusState                `json:"state"`
	StateQueue       []*StatusState              `json:"state_queue"` // Queue of pending states
	Pending          *Pending                    `json:"pending"`
	StateMachine     gograph.Graph[*StatusState] `json:"-"`
	Reconciling      bool
	PendingDelete    bool
	InSync           bool
	LastSyncedCommit plumbing.Hash
	LastUpdate       time.Time
	// contains filtered or unexported fields
}

func New added in v0.1.26

func New() *Status

func (*Status) ClearQueue added in v0.1.56

func (status *Status) ClearQueue()

func (*Status) CreateGraph

func (status *Status) CreateGraph()

func (*Status) GetCategory

func (status *Status) GetCategory() int8

func (*Status) GetPending added in v0.1.35

func (status *Status) GetPending() *Pending

func (*Status) GetQueueLength added in v0.1.56

func (status *Status) GetQueueLength() int

GetQueueLength returns the current number of states in the queue (thread-safe)

func (*Status) GetQueueSnapshot added in v0.1.56

func (status *Status) GetQueueSnapshot() []*StatusState

func (*Status) GetState

func (status *Status) GetState() string

func (*Status) GetStateSnapshot added in v0.1.56

func (status *Status) GetStateSnapshot() StatusState

func (*Status) IfStateIs

func (status *Status) IfStateIs(state string) bool

func (*Status) IsQueueEmpty added in v0.1.56

func (status *Status) IsQueueEmpty() bool

func (*Status) PeekState added in v0.1.56

func (status *Status) PeekState() (*StatusState, error)

PeekState returns the first state from the queue without removing it (thread-safe)

func (*Status) PopState added in v0.1.56

func (status *Status) PopState() (*StatusState, error)

PopState removes and returns the first state from the queue (thread-safe)

func (*Status) QueueState added in v0.1.56

func (status *Status) QueueState(state string) error

func (*Status) QueueStates added in v0.1.56

func (status *Status) QueueStates(states []string) error

QueueStates adds multiple states to the queue (thread-safe)

func (*Status) RejectTransition added in v0.1.56

func (status *Status) RejectTransition() bool

func (*Status) SetState

func (status *Status) SetState(state string) error

func (*Status) TransitionState

func (status *Status) TransitionState(group string, name string, destination string) bool

func (*Status) TransitionToNext added in v0.1.56

func (status *Status) TransitionToNext() error

func (*Status) TypeFromString

func (status *Status) TypeFromString(state string) (*StatusState, error)

type StatusState

type StatusState struct {
	State string `json:"state"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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