Documentation
¶
Index ¶
- Constants
- type Pending
- type Status
- func (status *Status) ClearQueue()
- func (status *Status) CreateGraph()
- func (status *Status) GetCategory() int8
- func (status *Status) GetPending() *Pending
- func (status *Status) GetQueueLength() int
- func (status *Status) GetQueueSnapshot() []*StatusState
- func (status *Status) GetState() string
- func (status *Status) GetStateSnapshot() StatusState
- func (status *Status) IfStateIs(state string) bool
- func (status *Status) IsQueueEmpty() bool
- func (status *Status) PeekState() (*StatusState, error)
- func (status *Status) PopState() (*StatusState, error)
- func (status *Status) QueueState(state string) error
- func (status *Status) QueueStates(states []string) error
- func (status *Status) RejectTransition() bool
- func (status *Status) SetState(state string) error
- func (status *Status) TransitionState(group string, name string, destination string) bool
- func (status *Status) TransitionToNext() error
- func (status *Status) TypeFromString(state string) (*StatusState, error)
- type StatusState
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
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 (*Status) ClearQueue ¶ added in v0.1.56
func (status *Status) ClearQueue()
func (*Status) CreateGraph ¶
func (status *Status) CreateGraph()
func (*Status) GetCategory ¶
func (*Status) GetPending ¶ added in v0.1.35
func (*Status) GetQueueLength ¶ added in v0.1.56
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) GetStateSnapshot ¶ added in v0.1.56
func (status *Status) GetStateSnapshot() StatusState
func (*Status) IsQueueEmpty ¶ added in v0.1.56
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) QueueStates ¶ added in v0.1.56
QueueStates adds multiple states to the queue (thread-safe)
func (*Status) RejectTransition ¶ added in v0.1.56
func (*Status) TransitionState ¶
func (*Status) TransitionToNext ¶ added in v0.1.56
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
}
Click to show internal directories.
Click to hide internal directories.