commander

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdGuard

type CmdGuard interface {
	GetServerResourceMap() (map[string]metav1.APIResource, error)
	GetResourceDetailsFromMap(selectedVerb, resourceType string, resMap map[string]metav1.APIResource) (command.Resource, error)
}

CmdGuard is responsible for guarding kubectl commands.

type Command

type Command struct {
	Name string
	Cmd  string
}

Command defines a command that is executed by the app.

type Commander

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

Commander is responsible for generating kubectl commands for the given event.

func NewCommander

func NewCommander(log logrus.FieldLogger, guard CmdGuard, commands config.Commands) *Commander

NewCommander creates a new Commander instance.

func (*Commander) GetCommandsForEvent

func (c *Commander) GetCommandsForEvent(event event.Event) ([]Command, error)

GetCommandsForEvent returns a list of commands for the given event.

Jump to

Keyboard shortcuts

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