event

package
v0.36.0-flux.11 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 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 ActionGroup

type ActionGroup struct {
	Name        string
	Action      ResourceAction
	Identifiers object.ObjMetadataSet
}

func (ActionGroup) String

func (ag ActionGroup) String() string

String returns a string suitable for logging

type ActionGroupEvent

type ActionGroupEvent struct {
	GroupName string
	Action    ResourceAction
	Status    ActionGroupEventStatus
}

func (ActionGroupEvent) String

func (age ActionGroupEvent) String() string

String returns a string suitable for logging

type ActionGroupEventStatus

type ActionGroupEventStatus int
const (
	Started ActionGroupEventStatus = iota
	Finished
)

func (ActionGroupEventStatus) String

func (i ActionGroupEventStatus) String() string

type ActionGroupList

type ActionGroupList []ActionGroup

func (ActionGroupList) String

func (agl ActionGroupList) String() string

String returns a string suitable for logging

type ApplyEvent

type ApplyEvent struct {
	GroupName  string
	Identifier object.ObjMetadata
	Status     ApplyEventStatus
	Resource   *unstructured.Unstructured
	Error      error
}

func (ApplyEvent) String

func (ae ApplyEvent) String() string

String returns a string suitable for logging

type ApplyEventStatus

type ApplyEventStatus int
const (
	ApplyPending    ApplyEventStatus = iota // Pending
	ApplySuccessful                         // Successful
	ApplySkipped                            // Skipped
	ApplyFailed                             // Failed
)

func (ApplyEventStatus) String

func (i ApplyEventStatus) String() string

type DeleteEvent

type DeleteEvent struct {
	GroupName  string
	Identifier object.ObjMetadata
	Status     DeleteEventStatus
	Object     *unstructured.Unstructured
	Error      error
}

func (DeleteEvent) String

func (de DeleteEvent) String() string

String returns a string suitable for logging

type DeleteEventStatus

type DeleteEventStatus int
const (
	DeletePending    DeleteEventStatus = iota // Pending
	DeleteSuccessful                          // Successful
	DeleteSkipped                             // Skipped
	DeleteFailed                              // Failed
)

func (DeleteEventStatus) String

func (i DeleteEventStatus) String() string

type ErrorEvent

type ErrorEvent struct {
	Err error
}

func (ErrorEvent) String

func (ee ErrorEvent) String() string

String returns a string suitable for logging

type Event

type Event struct {
	// Type is the type of event.
	Type Type

	// InitEvent contains information about which resources will
	// be applied/pruned.
	InitEvent InitEvent

	// ErrorEvent contains information about any errors encountered.
	ErrorEvent ErrorEvent

	// ActionGroupEvent contains information about the progression of tasks
	// to apply, prune, and destroy resources, and tasks that involves waiting
	// for a set of resources to reach a specific state.
	ActionGroupEvent ActionGroupEvent

	// ApplyEvent contains information about progress pertaining to
	// applying a resource to the cluster.
	ApplyEvent ApplyEvent

	// StatusEvents contains information about the status of one of
	// the applied resources.
	StatusEvent StatusEvent

	// PruneEvent contains information about objects that have been
	// pruned.
	PruneEvent PruneEvent

	// DeleteEvent contains information about object that have been
	// deleted.
	DeleteEvent DeleteEvent

	// WaitEvent contains information about any errors encountered in a WaitTask.
	WaitEvent WaitEvent

	// ValidationEvent contains information about validation errors.
	ValidationEvent ValidationEvent
}

Event is the type of the objects that will be returned through the channel that is returned from a call to Run. It contains information about progress and errors encountered during the process of doing apply, waiting for status and doing a prune.

func (Event) String

func (e Event) String() string

String returns a string suitable for logging

type InitEvent

type InitEvent struct {
	ActionGroups ActionGroupList
}

func (InitEvent) String

func (ie InitEvent) String() string

String returns a string suitable for logging

type PruneEvent

type PruneEvent struct {
	GroupName  string
	Identifier object.ObjMetadata
	Status     PruneEventStatus
	Object     *unstructured.Unstructured
	Error      error
}

func (PruneEvent) String

func (pe PruneEvent) String() string

String returns a string suitable for logging

type PruneEventStatus

type PruneEventStatus int
const (
	PrunePending    PruneEventStatus = iota // Pending
	PruneSuccessful                         // Successful
	PruneSkipped                            // Skipped
	PruneFailed                             // Failed
)

func (PruneEventStatus) String

func (i PruneEventStatus) String() string

type ResourceAction

type ResourceAction int
const (
	ApplyAction     ResourceAction = iota // Apply
	PruneAction                           // Prune
	DeleteAction                          // Delete
	WaitAction                            // Wait
	InventoryAction                       // Inventory
)

func (ResourceAction) String

func (i ResourceAction) String() string

type StatusEvent

type StatusEvent struct {
	Identifier       object.ObjMetadata
	PollResourceInfo *pollevent.ResourceStatus
	Resource         *unstructured.Unstructured
	Error            error
}

func (StatusEvent) String

func (se StatusEvent) String() string

String returns a string suitable for logging

type Type

type Type int

Type determines the type of events that are available.

const (
	InitType Type = iota
	ErrorType
	ActionGroupType
	ApplyType
	StatusType
	PruneType
	DeleteType
	WaitType
	ValidationType
)

func (Type) String

func (i Type) String() string

type ValidationEvent

type ValidationEvent struct {
	Identifiers object.ObjMetadataSet
	Error       error
}

func (ValidationEvent) String

func (ve ValidationEvent) String() string

String returns a string suitable for logging

type WaitEvent

type WaitEvent struct {
	GroupName  string
	Identifier object.ObjMetadata
	Status     WaitEventStatus
}

func (WaitEvent) String

func (we WaitEvent) String() string

String returns a string suitable for logging

type WaitEventStatus

type WaitEventStatus int
const (
	ReconcilePending    WaitEventStatus = iota // Pending
	ReconcileSuccessful                        // Successful
	ReconcileSkipped                           // Skipped
	ReconcileTimeout                           // Timeout
	ReconcileFailed                            // Failed
)

func (WaitEventStatus) String

func (i WaitEventStatus) String() string

Jump to

Keyboard shortcuts

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