event

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionGroup added in v0.26.0

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

func (ActionGroup) String added in v0.27.0

func (ag ActionGroup) String() string

String returns a string suitable for logging

type ActionGroupEvent added in v0.26.0

type ActionGroupEvent struct {
	GroupName string
	Action    ResourceAction
	Type      ActionGroupEventType
}

func (ActionGroupEvent) String added in v0.27.0

func (age ActionGroupEvent) String() string

String returns a string suitable for logging

type ActionGroupEventType added in v0.26.0

type ActionGroupEventType int
const (
	Started ActionGroupEventType = iota
	Finished
)

func (ActionGroupEventType) String added in v0.26.0

func (i ActionGroupEventType) String() string

type ActionGroupList added in v0.27.0

type ActionGroupList []ActionGroup

func (ActionGroupList) String added in v0.27.0

func (agl ActionGroupList) String() string

String returns a string suitable for logging

type ApplyEvent

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

func (ApplyEvent) String added in v0.27.0

func (ae ApplyEvent) String() string

String returns a string suitable for logging

type ApplyEventOperation added in v0.1.1

type ApplyEventOperation int
const (
	ApplyUnspecified ApplyEventOperation = iota
	ServersideApplied
	Created
	Unchanged
	Configured
)

func (ApplyEventOperation) String added in v0.1.1

func (i ApplyEventOperation) String() string

type DeleteEvent added in v0.1.1

type DeleteEvent struct {
	GroupName  string
	Identifier object.ObjMetadata
	Operation  DeleteEventOperation
	Object     *unstructured.Unstructured
	// If delete is skipped, this reason string explains why
	Reason string
	Error  error
}

func (DeleteEvent) String added in v0.27.0

func (de DeleteEvent) String() string

String returns a string suitable for logging

type DeleteEventOperation added in v0.12.0

type DeleteEventOperation int
const (
	DeleteUnspecified DeleteEventOperation = iota
	Deleted
	DeleteSkipped
)

func (DeleteEventOperation) String added in v0.12.0

func (i DeleteEventOperation) String() string

type ErrorEvent

type ErrorEvent struct {
	Err error
}

func (ErrorEvent) String added in v0.27.0

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 added in v0.27.0

func (e Event) String() string

String returns a string suitable for logging

type InitEvent added in v0.6.0

type InitEvent struct {
	ActionGroups ActionGroupList
}

func (InitEvent) String added in v0.27.0

func (ie InitEvent) String() string

String returns a string suitable for logging

type PruneEvent

type PruneEvent struct {
	GroupName  string
	Identifier object.ObjMetadata
	Operation  PruneEventOperation
	Object     *unstructured.Unstructured
	// If prune is skipped, this reason string explains why
	Reason string
	Error  error
}

func (PruneEvent) String added in v0.27.0

func (pe PruneEvent) String() string

String returns a string suitable for logging

type PruneEventOperation added in v0.12.0

type PruneEventOperation int
const (
	PruneUnspecified PruneEventOperation = iota
	Pruned
	PruneSkipped
)

func (PruneEventOperation) String added in v0.12.0

func (i PruneEventOperation) String() string

type ResourceAction added in v0.6.0

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

func (ResourceAction) String added in v0.6.0

func (i ResourceAction) String() string

type StatusEvent added in v0.21.0

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

func (StatusEvent) String added in v0.27.0

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 added in v0.1.1

func (i Type) String() string

type ValidationEvent added in v0.28.0

type ValidationEvent struct {
	Identifiers object.ObjMetadataSet
	Error       error
}

func (ValidationEvent) String added in v0.28.0

func (ve ValidationEvent) String() string

String returns a string suitable for logging

type WaitEvent added in v0.26.1

type WaitEvent struct {
	GroupName  string
	Identifier object.ObjMetadata
	Operation  WaitEventOperation
}

func (WaitEvent) String added in v0.27.0

func (we WaitEvent) String() string

String returns a string suitable for logging

type WaitEventOperation added in v0.27.0

type WaitEventOperation int
const (
	ReconcilePending WaitEventOperation = iota // Pending
	Reconciled
	ReconcileSkipped // Skipped
	ReconcileTimeout // Timeout
	ReconcileFailed  // Failed
)

func (WaitEventOperation) String added in v0.27.0

func (i WaitEventOperation) String() string

Jump to

Keyboard shortcuts

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