kubernetes

package
v1.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context .

func NewContext

func NewContext(namespace, context, kubeConfig string) (*Context, error)

NewContext .

func (*Context) Namespace

func (c *Context) Namespace() *Namespace

Namespace .

func (*Context) Resource

func (c *Context) Resource() *Resource

Resource .

func (*Context) Service added in v1.0.8

func (c *Context) Service() *Service

Service .

type ErrCommandExecute

type ErrCommandExecute struct {
	ExitCode int
	Output   string
}

ErrCommandExecute .

func (ErrCommandExecute) Error

func (err ErrCommandExecute) Error() string

type ErrCommandExitCode

type ErrCommandExitCode struct {
	ExitCode int
}

ErrCommandExitCode .

func (ErrCommandExitCode) Error

func (err ErrCommandExitCode) Error() string

type ErrInvalidResponse

type ErrInvalidResponse struct {
	Underlying error
	Response   string
}

ErrInvalidResponse .

func (ErrInvalidResponse) Error

func (err ErrInvalidResponse) Error() string

type ErrMissingCommand

type ErrMissingCommand struct {
	Command string
}

ErrMissingCommand .

func (ErrMissingCommand) Error

func (err ErrMissingCommand) Error() string

type ErrNotExist

type ErrNotExist struct {
	Name string
	Kind string
}

ErrNotExist .

func (ErrNotExist) Error

func (err ErrNotExist) Error() string

type ErrTimeout

type ErrTimeout struct {
}

ErrTimeout .

func (ErrTimeout) Error

func (err ErrTimeout) Error() string

type ErrUnknownStatus

type ErrUnknownStatus struct {
	Name string
	Kind string
	// contains filtered or unexported fields
}

ErrUnknownStatus .

func (ErrUnknownStatus) Error

func (err ErrUnknownStatus) Error() string

type ErrUnsupportedKind

type ErrUnsupportedKind struct {
	Kind string
}

ErrUnsupportedKind .

func (ErrUnsupportedKind) Error

func (err ErrUnsupportedKind) Error() string

type Namespace

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

Namespace operations

func (*Namespace) Create

func (n *Namespace) Create() (exists bool, err error)

Create namespace in context

func (*Namespace) Delete

func (n *Namespace) Delete() (exists bool, err error)

Delete .

func (*Namespace) Exists

func (n *Namespace) Exists() (bool, error)

Exists .

type Resource

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

Resource operations

func (*Resource) Create

func (r *Resource) Create(name, kind, rawContent string) (exists bool, err error)

Create resource

func (*Resource) Delete

func (r *Resource) Delete(name, kind string) (exists bool, err error)

Delete .

func (*Resource) Exists

func (r *Resource) Exists(name, kind string) (exists bool, err error)

Exists check

func (*Resource) GetStatus

func (r *Resource) GetStatus(name, kind string) (RsStatus, error)

GetStatus .

func (*Resource) Logs

func (r *Resource) Logs(name, containerName string, stdout io.Writer, stderr io.Writer) error

Logs .

func (*Resource) Update

func (r *Resource) Update(name, kind, rawContent string) (updateStatus UpdateStatus, err error)

Update .

func (*Resource) Upgrade

func (r *Resource) Upgrade(name, kind, rawContent string) (updateStatus UpdateStatus, err error)

Upgrade .

func (*Resource) Wait

func (r *Resource) Wait(name, kind string) (success bool, err error)

Wait .

type RsStatus

type RsStatus int

RsStatus .

const (
	RsStatusUnknown RsStatus = iota
	RsStatusNotExist
	RsStatusPending
	RsStatusActive
	RsStatusTerminating
	RsStatusSucceeded
	RsStatusFailed
)

Status code

func (RsStatus) String

func (status RsStatus) String() string

type Service added in v1.0.8

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

Service operations

func (*Service) ListPods added in v1.0.8

func (s *Service) ListPods(name string) ([]string, error)

type UpdateStatus

type UpdateStatus int

UpdateStatus .

const (
	UpdateStatusNotExist UpdateStatus = iota
	UpdateStatusExisted
	UpdateStatusSkipped
)

UpdateStatus values

Jump to

Keyboard shortcuts

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