event

package
v0.0.0-...-947b840 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModifyEvents = Events{

	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},

	{
		// contains filtered or unexported fields
	},
}
View Source
var ScaleEvents = Events{
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
	{
		// contains filtered or unexported fields
	},
}
View Source
var UpgradeEvents = Events{
	{
		// contains filtered or unexported fields
	},
}

Functions

func NewConfigChangeError

func NewConfigChangeError(msg string, paths ...string) error

func NewConfigChangeWarning

func NewConfigChangeWarning(msg string, paths ...string) error

Types

type Event

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

func MockEvent

func MockEvent(t *testing.T, eventType EventType, changes []cmp.Change) Event

func (Event) Action

func (e Event) Action() cmp.ActionType

func (Event) Changes

func (e Event) Changes() []cmp.Change

func (Event) Error

func (e Event) Error() error

func (Event) Paths

func (e Event) Paths() []string

type EventType

type EventType string
const (
	OK         EventType = "ok"
	SCALE_UP   EventType = "scale_up"
	SCALE_DOWN EventType = "scale_down"

	// WARN change requires user permission to continue.
	WARN EventType = "warn"

	// BLOCK change prevents further actions on the cluster.
	BLOCK EventType = "block"
)

type Events

type Events []Event

func TriggerEvents

func TriggerEvents(diff *cmp.DiffNode, events Events) Events

triggerEvents returns triggered events of the corresponding action.

func (Events) Blocking

func (es Events) Blocking() Events

Blocking returns events of type BLOCK.

func (Events) Errors

func (es Events) Errors() []error

Errors converts events to the utils.Errors.

func (Events) OfType

func (es Events) OfType(t EventType) Events

OfType returns events matching the given type.

func (Events) Warns

func (es Events) Warns() Events

Warns returns events of type WARN.

Jump to

Keyboard shortcuts

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