plugins

package
v0.0.0-...-5ccf328 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubernetesNamespace = "_kubernetes.namespace" // optional (defaults to "tko")
	KubernetesPod       = "_kubernetes.pod"       // required
	KubernetesContainer = "_kubernetes.container" // optional (defaults to _kubernetes.pod)

	DefaultKubernetesNamespace = "tko"
)
View Source
const Command = "command"
View Source
const Kpt = "kpt"
View Source
const PluginTypesDescription = "\"validate\", \"prepare\", or \"schedule\""

Variables

This section is empty.

Functions

func ExecuteLocal

func ExecuteLocal(context contextpkg.Context, stdin io.Reader, command ...string) ([]byte, error)

func IsValidPluginType

func IsValidPluginType(type_ string, allowEmpty bool) bool

Types

type CommandExecutor

type CommandExecutor struct {
	*Executor
}

func NewCommandExecutor

func NewCommandExecutor(arguments []string, properties map[string]string) (*CommandExecutor, error)

func (*CommandExecutor) Execute

func (self *CommandExecutor) Execute(context contextpkg.Context, input any, output any) error

func (*CommandExecutor) GetLog

func (self *CommandExecutor) GetLog(fifoPrefix string, ipStack util.IPStack, address string, port int, log commonlog.Logger) (string, string, error)

type Executor

type Executor struct {
	Arguments  []string
	Properties map[string]string
	Remote     *Remote
}

func NewExecutor

func NewExecutor(arguments []string, properties map[string]string) *Executor

func (*Executor) Execute

func (self *Executor) Execute(context contextpkg.Context, stdin io.Reader, command ...string) ([]byte, error)

func (*Executor) NewRemote

func (self *Executor) NewRemote() *Remote

type KptExecutor

type KptExecutor struct {
	*Executor
}

func NewKptExecutor

func NewKptExecutor(arguments []string, properties map[string]string) (*KptExecutor, error)

func (*KptExecutor) Execute

func (self *KptExecutor) Execute(context contextpkg.Context, targetResourceIdentifer util.ResourceIdentifier, package_ util.Package) (util.Package, error)

type KubernetesREST

type KubernetesREST struct {
	Interface restpkg.Interface
	Config    *restpkg.Config
}

func GetKubernetesREST

func GetKubernetesREST() (*KubernetesREST, error)

func NewKubernetesREST

func NewKubernetesREST() (*KubernetesREST, error)

func (*KubernetesREST) Execute

func (self *KubernetesREST) Execute(context contextpkg.Context, namespace string, podName string, containerName string, stdin io.Reader, command ...string) ([]byte, error)

type Remote

type Remote struct {
	KubernetesNamespace string
	KubernetesPod       string
	KubernetesContainer string
}

Jump to

Keyboard shortcuts

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