dao

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFuzzySelector

func IsFuzzySelector(s string) bool

IsFuzzySelector checks if filter is fuzzy or not.

func IsInverseSelector

func IsInverseSelector(s string) bool

IsInverseSelector checks if inverse char has been provided.

func Truncate

func Truncate(str string, width int) string

Truncate a string to the given l and suffix ellipsis if needed.

Types

type Controller

type Controller interface {
	// Pod returns a pod instance matching the selector.
	Pod(path string) (string, error)
}

Controller represents a pod controller.

type Describer

type Describer interface {
	// Describe describes a resource.
	Describe(path string) (string, error)

	// ToYAML dumps a resource to YAML.
	ToYAML(path string, showManaged bool) (string, error)
}

Describer describes a resource.

type DrainOptions

type DrainOptions struct {
	GracePeriodSeconds  int
	Timeout             time.Duration
	IgnoreAllDaemonSets bool
	DeleteEmptyDirData  bool
	Force               bool
}

DrainOptions tracks drain attributes.

type FactoryFn

type FactoryFn func() MyFactory

type MyFactory

type MyFactory interface {
	Stream(cat string) <-chan render.Rows
	SendCommand(int64) error
	Terminate()
}

type NodeMaintainer

type NodeMaintainer interface {
	// ToggleCordon toggles cordon/uncordon a node.
	ToggleCordon(path string, cordon bool) error

	// Drain drains the given node.
	Drain(path string, opts DrainOptions, w io.Writer) error
}

NodeMaintainer performs node maintenance operations.

type Nuker

type Nuker interface {
	// Delete removes a resource from the api server.
	Delete(path string, cascade, force bool) error
}

Nuker represents a resource deleter.

type Restartable

type Restartable interface {
	// Restart performs a rollout restart.
	Restart(ctx context.Context, path string) error
}

Restartable represents a restartable resource.

type Runnable

type Runnable interface {
	// Run triggers a run.
	Run(path string) error
}

Runnable represents a runnable resource.

type Scalable

type Scalable interface {
	// Scale scales a resource up or down.
	Scale(ctx context.Context, path string, replicas int32) error
}

Scalable represents resources that can scale.

type Switchable

type Switchable interface {
	// Switch changes the active context.
	Switch(ctx string) error
}

Switchable represents a switchable resource.

Jump to

Keyboard shortcuts

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