Documentation
¶
Index ¶
- Constants
- Variables
- func AbortAndDeploy(ctx context.Context, rig rig.Client, ...) (*connect.Response[capsule.DeployResponse], error)
- func Deploy(input DeployInput) (*capsule.Revision, error)
- func DeployAndWait(input DeployAndWaitInput) error
- func DeployDry(input DeployDryInput) error
- func DryRun(input DeployInput) (*capsule.Revision, *capsule.DeployOutcome, error)
- func GetCapsuleInstance(ctx context.Context, rig rig.Client, rCtx TargetContext, capsuleID string) (string, error)
- func GetCurrentContainerResources(ctx context.Context, client rig.Client, scope scope.Scope) (*capsule.ContainerSettings, uint32, error)
- func GetCurrentNetwork(ctx context.Context, client rig.Client, scope scope.Scope) (*capsule.Network, error)
- func GetCurrentRollout(ctx context.Context, client rig.Client, scope scope.Scope) (*capsule.Rollout, error)
- func GetCurrentRolloutOfCapsule(ctx context.Context, client rig.Client, scope scope.Scope, capsuleID string) (*capsule.Rollout, error)
- func PortForward(ctx context.Context, rCtx *cmdconfig.Context, capsuleID, instanceID string, ...) error
- func PortForwardOnListener(ctx context.Context, rCtx *cmdconfig.Context, capsuleID, instanceID string, ...) error
- func PrintLogs(stream *connect.ServerStreamForClient[capsule.LogsResponse]) error
- func PromptAbortAndDeploy(ctx context.Context, rig rig.Client, prompter common.Prompter, ...) (*connect.Response[capsule.DeployResponse], error)
- func PromptDryOutput(ctx context.Context, outcome DryOutput, scheme *runtime.Scheme) error
- func Rollback(input RollbackInput) (*capsule.Revision, error)
- func SelectCapsule(ctx context.Context, rc rig.Client, prompter common.Prompter, ...) (string, error)
- func Truncated(str string, max int) string
- func TruncatedFixed(str string, max int) string
- func WaitForRollout(input WaitForRolloutInput) error
- func WaitForRolloutIteration(input WaitForRolloutInput, state *WaitForRolloutState) (bool, error)
- type BaseInput
- type DeployAndWaitInput
- type DeployDryInput
- type DeployInput
- type DryOutput
- type GetRolloutInput
- type KubernetesDryObject
- type KubernetesObject
- type PlatformDryObject
- type PlatformObject
- type RollbackInput
- type TargetContext
- type WaitForRolloutInput
- type WaitForRolloutState
Constants ¶
View Source
const ( BasicGroupID = "basic" DeploymentGroupID = "deployment" TroubleshootingGroupID = "troubleshooting" )
Variables ¶
View Source
var CapsuleID string
Functions ¶
func AbortAndDeploy ¶ added in v1.2.6
func DeployAndWait ¶ added in v1.10.5
func DeployAndWait(input DeployAndWaitInput) error
func DeployDry ¶ added in v1.11.0
func DeployDry(input DeployDryInput) error
func DryRun ¶ added in v1.12.2
func DryRun(input DeployInput) (*capsule.Revision, *capsule.DeployOutcome, error)
func GetCapsuleInstance ¶ added in v1.10.3
func GetCurrentContainerResources ¶ added in v1.2.0
func GetCurrentNetwork ¶ added in v1.2.0
func GetCurrentRollout ¶ added in v1.2.0
func GetCurrentRolloutOfCapsule ¶ added in v1.6.0
func PortForward ¶ added in v1.10.3
func PortForwardOnListener ¶ added in v1.10.3
func PrintLogs ¶ added in v1.3.2
func PrintLogs(stream *connect.ServerStreamForClient[capsule.LogsResponse]) error
func PromptAbortAndDeploy ¶ added in v1.3.0
func PromptDryOutput ¶ added in v1.11.3
func SelectCapsule ¶ added in v1.7.2
func TruncatedFixed ¶ added in v1.2.0
func WaitForRollout ¶ added in v1.10.3
func WaitForRollout(input WaitForRolloutInput) error
func WaitForRolloutIteration ¶ added in v1.11.0
func WaitForRolloutIteration(input WaitForRolloutInput, state *WaitForRolloutState) (bool, error)
Types ¶
type BaseInput ¶ added in v1.11.0
type BaseInput struct {
// TODO Remove ctx and add as separate argument to functions
Ctx context.Context
Rig rig.Client
ProjectID string
EnvironmentID string
CapsuleID string
}
deployment structs
type DeployAndWaitInput ¶ added in v1.11.0
type DeployAndWaitInput struct {
DeployInput
Timeout time.Duration
RollbackID uint64
NoWait bool
}
type DeployDryInput ¶ added in v1.11.0
type DeployInput ¶ added in v1.11.0
type DryOutput ¶ added in v1.11.0
type DryOutput struct {
PlatformObjects []PlatformDryObject
KubernetesObjects []KubernetesDryObject
}
func ProcessDryRunOutput ¶ added in v1.11.3
func ProcessDryRunOutput( newOutcome *capsule.DeployOutcome, oldOutcome *capsule.DeployOutcome, ) (DryOutput, error)
type GetRolloutInput ¶ added in v1.11.0
type KubernetesDryObject ¶ added in v1.12.2
type KubernetesDryObject struct {
Old KubernetesObject
New KubernetesObject
}
type KubernetesObject ¶ added in v1.12.2
type PlatformDryObject ¶ added in v1.12.2
type PlatformDryObject struct {
Old PlatformObject
New PlatformObject
}
type PlatformObject ¶ added in v1.12.2
type RollbackInput ¶ added in v1.11.0
type TargetContext ¶ added in v1.11.0
type WaitForRolloutInput ¶ added in v1.11.0
type WaitForRolloutInput struct {
RollbackInput
Fingerprints *model.Fingerprints
Timeout time.Duration
PrintPrefix string
}
type WaitForRolloutState ¶ added in v1.11.0
type WaitForRolloutState struct {
HasPolledForRollout bool
CurrentRolloutID uint64
Deadline time.Time
LastConfigure []*api_rollout.StepInfo
LastResource []*api_rollout.StepInfo
LastRunning []*api_rollout.StepInfo
}
Click to show internal directories.
Click to hide internal directories.