context

package
v0.0.0-...-421f950 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: Apache-2.0 Imports: 35 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
}

func NewCommanderContext

func NewCommanderContext(ctx context.Context, kubeClient *client.KubernetesClient, cache dstate.Cache, params *commander.CommanderModeParams, changeParams terraform.ChangeActionSettings) *Context

func NewContext

func NewContext(ctx context.Context, kubeClient *client.KubernetesClient, cache dstate.Cache, changeParams terraform.ChangeActionSettings) *Context

func (*Context) ChangesSettings

func (c *Context) ChangesSettings() terraform.ChangeActionSettings

func (*Context) CommanderMode

func (c *Context) CommanderMode() bool

func (*Context) CompleteExecutionPhase

func (c *Context) CompleteExecutionPhase(data any) error

func (*Context) ConvergeState

func (c *Context) ConvergeState() (*State, error)

func (*Context) Ctx

func (c *Context) Ctx() context.Context

func (*Context) KubeClient

func (c *Context) KubeClient() *client.KubernetesClient

func (*Context) MetaConfig

func (c *Context) MetaConfig() (*config.MetaConfig, error)

func (*Context) SetConvergeState

func (c *Context) SetConvergeState(state *State) error

func (*Context) StarExecutionPhase

func (c *Context) StarExecutionPhase(phase phases.OperationPhase, isCritical bool) (bool, error)

func (*Context) StateCache

func (c *Context) StateCache() dstate.Cache

func (*Context) Terraform

func (c *Context) Terraform() *terraform.TerraformContext

func (*Context) WithPhaseContext

func (c *Context) WithPhaseContext(phaseContext phases.DefaultPhasedExecutionContext) *Context

func (*Context) WithTerraformContext

func (c *Context) WithTerraformContext(ctx *terraform.TerraformContext) *Context

func (*Context) WithTimeout

func (c *Context) WithTimeout(timeout time.Duration) (context.Context, context.CancelFunc)

type KubeClientSwitcher

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

func NewKubeClientSwitcher

func NewKubeClientSwitcher(ctx *Context, lockRunner *lock.InLockRunner) *KubeClientSwitcher

func (*KubeClientSwitcher) CleanupNodeUser

func (s *KubeClientSwitcher) CleanupNodeUser() error

func (*KubeClientSwitcher) SwitchToNodeUser

func (s *KubeClientSwitcher) SwitchToNodeUser(nodesState map[string][]byte) error

type NodeUserCredentials

type NodeUserCredentials struct {
	Name string `json:"name"`
	// PEM encoded private key
	PrivateKey string `json:"privateKey"`
	// Password in plain text
	Password string `json:"password"`
}

type State

type State struct {
	Phase               phases.OperationPhase `json:"phase"`
	NodeUserCredentials *NodeUserCredentials  `json:"nodeUserCredentials"`
}

Jump to

Keyboard shortcuts

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