squadron

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const All = "all"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func NewCommand

func NewCommand(l log.Logger, squadron *Squadron, kubectl *kubectl.Kubectl, op *onepassword.OnePassword, opts ...CommandOption) *Command

func (*Command) Complete

func (c *Command) Complete(ctx context.Context, r *readline.Readline) []goprompt.Suggest

func (*Command) Description

func (c *Command) Description() string

func (*Command) Execute

func (c *Command) Execute(ctx context.Context, r *readline.Readline) error

func (*Command) Help

func (c *Command) Help(ctx context.Context, r *readline.Readline) string

func (*Command) Name

func (c *Command) Name() string

type CommandOption

type CommandOption func(*Command)

func CommandWithNamespaceFn

func CommandWithNamespaceFn(v NamespaceFn) CommandOption

func CommandWithSlack

func CommandWithSlack(v *slack.Slack) CommandOption

func CommandWithSlackChannelID

func CommandWithSlackChannelID(v string) CommandOption

type NamespaceFn

type NamespaceFn func(cluster, fleet, squadron string) string

type Option

type Option func(*Squadron) error

func WithConfigKey

func WithConfigKey(v string) Option

type Squadron

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

func New

func New(l log.Logger, kubectl *kubectl.Kubectl, opts ...Option) (*Squadron, error)

func (*Squadron) Cluster

func (s *Squadron) Cluster(name string) (squadron.Cluster, bool)

func (*Squadron) Exists

func (s *Squadron) Exists(name string) bool

func (*Squadron) GetFiles

func (s *Squadron) GetFiles(squadron, cluster, fleet string, override bool) []string

func (*Squadron) List

func (s *Squadron) List() ([]string, error)

func (*Squadron) ListUnits

func (s *Squadron) ListUnits(ctx context.Context, squadron, cluster, fleet string, override bool) ([]string, error)

func (*Squadron) UnitDirs

func (s *Squadron) UnitDirs(squadron string) []string

func (*Squadron) UnitExists

func (s *Squadron) UnitExists(ctx context.Context, squadron, cluster, fleet, name string, override bool) bool

Jump to

Keyboard shortcuts

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