Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConditionTypeReady = "Ready" ConditionTypePlanning = "Planning" ConditionTypeValidation = "Validation" ConditionTypeExecution = "Execution" ReasonInProgress = "InProgress" ReasonSucceeded = "Succeeded" ReasonFailed = "Failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
ID BatchID
Resources []rules.WSAResource
StartTime time.Time
Plan *ReconciliationPlan
ValidationResult *ValidationResult
LastError error
RequeueAfter time.Duration
}
type BatchID ¶
func NewBatchID ¶
func NewBatchID() BatchID
type BatchQueue ¶
type BatchQueue interface {
Add(batch *Batch)
AddRateLimited(batch *Batch)
Get() (*Batch, bool)
Done(batch *Batch)
Forget(batch *Batch)
NumRequeues(batch *Batch) int
ShutDown()
}
func NewBatchQueue ¶
func NewBatchQueue() BatchQueue
type Debouncer ¶
type Debouncer struct {
// contains filtered or unexported fields
}
func NewDebouncer ¶
type EventCollector ¶
type EventCollector struct {
// contains filtered or unexported fields
}
func NewEventCollector ¶
func NewEventCollector(debounceInterval time.Duration, maxBatchSize int) *EventCollector
func (*EventCollector) AddEvent ¶
func (ec *EventCollector) AddEvent(event *EventInfo)
func (*EventCollector) BatchChannel ¶
func (ec *EventCollector) BatchChannel() <-chan []*EventInfo
func (*EventCollector) FlushEvents ¶
func (ec *EventCollector) FlushEvents()
FlushEvents forces any pending events to be sent as a batch immediately.
type ReconciliationPlan ¶
type ReconciliationPlan struct {
ScopeToSA map[rules.Scope]rules.ServiceAccountName
SAToWSAMap map[rules.ServiceAccountName]map[types.NamespacedName]rules.WSAResource
WSAToSANames map[types.NamespacedName][]rules.ServiceAccountName
Vocabulary *rules.GlobalVocabulary
UniqueAccounts []*v1.ServiceAccount
AllResources []rules.WSAResource
TargetNamespaces []string
}
func (*ReconciliationPlan) GetSAToWSAMap ¶
func (rp *ReconciliationPlan) GetSAToWSAMap() map[rules.ServiceAccountName]map[types.NamespacedName]rules.WSAResource
func (*ReconciliationPlan) GetScopeToSA ¶
func (rp *ReconciliationPlan) GetScopeToSA() map[rules.Scope]rules.ServiceAccountName
func (*ReconciliationPlan) GetVocabulary ¶
func (rp *ReconciliationPlan) GetVocabulary() *rules.GlobalVocabulary
type StageOrchestrator ¶
type StageOrchestrator struct {
// contains filtered or unexported fields
}
func NewStageOrchestrator ¶
func NewStageOrchestrator( stages []Stage, collector *EventCollector, engine *rules.InMemoryEngine, c client.Client, stageTimeout time.Duration, recorder record.EventRecorder, ) *StageOrchestrator
func (*StageOrchestrator) NeedLeaderElection ¶
func (so *StageOrchestrator) NeedLeaderElection() bool
type ValidationError ¶
type ValidationResult ¶
type ValidationResult struct {
Valid bool
Errors []ValidationError
Warnings []ValidationWarning
}
type ValidationWarning ¶
Click to show internal directories.
Click to hide internal directories.