env

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GrafanaResourceType               = "grafana"
	GrafanaContinuousLoadResourceType = "grafana/continuous-load"
)

Variables

View Source
var (
	ErrCloudPlatformNotSupported = errors.New("cloud platform is not supported")
	ErrInvalidEnvironment        = errors.New("environment is not valid")
)
View Source
var (
	ErrorUnknownResourceType = errors.New("unknown resource type")
)

Functions

func Connect

func Connect(s userio.IOStreams, env *environment.Environment, c Commander, port int) error

Connect establishes a connection with a gke cluster via a bastion host

func OpenResource

func OpenResource(resourceType ResourceType, env *environment.Environment) error

func ResourceStringList

func ResourceStringList() []string

func Validate

func Validate(ctx context.Context, env *environment.Environment, cmd Commander, client *gcp.Client) error

Validate checks if the required tools and configurations for the environment are installed and set up correctly.

Types

type Command

type Command struct {
}

func (*Command) Execute

func (c *Command) Execute(cmd string, args ...string) ([]byte, error)

type Commander

type Commander interface {
	Execute(string, ...string) ([]byte, error)
}

func NewCommand

func NewCommand() Commander

type ResourceType

type ResourceType string

type TableEnv

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

func NewTable

func NewTable(streams userio.IOStreams, headers ...string) TableEnv

func (TableEnv) AppendEnv

func (t TableEnv) AppendEnv(env environment.Environment)

func (TableEnv) AppendRow

func (t TableEnv) AppendRow(name, id, platform string)

func (TableEnv) Render

func (t TableEnv) Render() string

Jump to

Keyboard shortcuts

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