state

package
v0.0.0-...-dea60c0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyState

type PolicyState struct {
	// contains filtered or unexported fields
}

func NewPolicyState

func NewPolicyState(schedules *apis.SchedulesSpec) (*PolicyState, error)

func (*PolicyState) GetConditions

func (ps *PolicyState) GetConditions() []apis.StatusCondition

func (*PolicyState) GetSchedule

func (ps *PolicyState) GetSchedule(st apis.ConditionScheduleType) *ScheduleState

func (*PolicyState) ScheduleEquals

func (ps *PolicyState) ScheduleEquals(other *PolicyState) bool

func (*PolicyState) ScheduleRequired

func (ps *PolicyState) ScheduleRequired(st apis.ConditionScheduleType, at time.Time) bool

func (*PolicyState) UpdateStatus

func (ps *PolicyState) UpdateStatus(st apis.ConditionScheduleType, at time.Time, err error)

type ScheduleState

type ScheduleState struct {
	// contains filtered or unexported fields
}

func NewSchedule

func NewSchedule(schedule apis.CronSchedule) (*ScheduleState, error)

func (*ScheduleState) Equals

func (ss *ScheduleState) Equals(other *ScheduleState) bool

func (*ScheduleState) GetConditions

func (*ScheduleState) GetExecutedTime

func (ss *ScheduleState) GetExecutedTime() time.Time

func (*ScheduleState) GetFireTime

func (ss *ScheduleState) GetFireTime() time.Time

func (*ScheduleState) GetNextExecutionTime

func (ss *ScheduleState) GetNextExecutionTime(since time.Time) time.Time

func (*ScheduleState) ScheduleRequired

func (ss *ScheduleState) ScheduleRequired(current time.Time) bool

func (*ScheduleState) SetCompleted

func (ss *ScheduleState) SetCompleted(at time.Time)

func (*ScheduleState) SetFailed

func (ss *ScheduleState) SetFailed(at time.Time)

func (*ScheduleState) SetFiredAfter

func (ss *ScheduleState) SetFiredAfter(ts time.Time)

type State

type State struct {
	// contains filtered or unexported fields
}

func New

func New() *State

func (*State) AddOrUpdate

func (s *State) AddOrUpdate(key string, info *PolicyState)

func (*State) Delete

func (s *State) Delete(key string)

func (*State) Get

func (s *State) Get(key string) (*PolicyState, bool)

Jump to

Keyboard shortcuts

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