resource

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgKubectlConnection = "kubectl connection error\n"
)

Functions

This section is empty.

Types

type Deployment

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

func NewDeployment

func NewDeployment(name string, ns string, deadline time.Duration) *Deployment

func (*Deployment) CheckStatus

func (d *Deployment) CheckStatus(ctx context.Context, cfg kubectl.Config)

func (*Deployment) Deadline

func (d *Deployment) Deadline() time.Duration

func (*Deployment) HasEncounteredUnrecoverableError

func (d *Deployment) HasEncounteredUnrecoverableError() bool

HasEncounteredUnrecoverableError goes through all pod statuses and return true if any cannot be recovered

func (*Deployment) ID

func (d *Deployment) ID() string

func (*Deployment) IsStatusCheckCompleteOrCancelled

func (d *Deployment) IsStatusCheckCompleteOrCancelled() bool

func (*Deployment) MarkComplete

func (d *Deployment) MarkComplete()

func (*Deployment) Name

func (d *Deployment) Name() string

func (*Deployment) ReportSinceLastUpdated

func (d *Deployment) ReportSinceLastUpdated(isMuted bool) string

ReportSinceLastUpdated returns a string representing deployment status along with tab header e.g.

  • testNs:deployment/leeroy-app: waiting for rollout to complete. (1/2) pending
  • testNs:pod/leeroy-app-xvbg : error pulling container image

func (*Deployment) Status

func (d *Deployment) Status() Status

func (*Deployment) StatusCode

func (d *Deployment) StatusCode() proto.StatusCode

StatusCode() returns the deployment status code if the status check is cancelled or if no pod data exists for this deployment. If pods are fetched, this function returns the error code a pod container encountered.

func (*Deployment) StatusMessage

func (d *Deployment) StatusMessage() string

func (*Deployment) String

func (d *Deployment) String() string

func (*Deployment) UpdateStatus

func (d *Deployment) UpdateStatus(ae proto.ActionableErr)

func (*Deployment) WithPodStatuses

func (d *Deployment) WithPodStatuses(scs []proto.StatusCode) *Deployment

func (*Deployment) WithValidator

func (d *Deployment) WithValidator(pd diag.Diagnose) *Deployment

type Group

type Group map[string]*Deployment

func (Group) Add

func (r Group) Add(d *Deployment)

func (Group) Contains

func (r Group) Contains(d *Deployment) bool

func (Group) Reset

func (r Group) Reset()

type Status

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

func (Status) ActionableError

func (rs Status) ActionableError() proto.ActionableErr

func (Status) Equal

func (rs Status) Equal(other Status) bool

func (Status) Error

func (rs Status) Error() error

func (Status) String

func (rs Status) String() string

Jump to

Keyboard shortcuts

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