Documentation
¶
Index ¶
- Constants
- Variables
- func BuildQuickSyncPipeline(autoRollback bool) []sdk.QuickSyncStage
- func GetPredefinedStage(id string) (*model.PipelineStage, bool)
- type DeploymentService
- func (a *DeploymentService) BuildPipelineSyncStages(ctx context.Context, request *deployment.BuildPipelineSyncStagesRequest) (*deployment.BuildPipelineSyncStagesResponse, error)
- func (a *DeploymentService) BuildQuickSyncStages(ctx context.Context, request *deployment.BuildQuickSyncStagesRequest) (*deployment.BuildQuickSyncStagesResponse, error)
- func (a *DeploymentService) DetermineStrategy(ctx context.Context, request *deployment.DetermineStrategyRequest) (*deployment.DetermineStrategyResponse, error)
- func (a *DeploymentService) DetermineVersions(ctx context.Context, request *deployment.DetermineVersionsRequest) (*deployment.DetermineVersionsResponse, error)
- func (a *DeploymentService) ExecuteStage(ctx context.Context, request *deployment.ExecuteStageRequest) (response *deployment.ExecuteStageResponse, _ error)
- func (a *DeploymentService) FetchDefinedStages(context.Context, *deployment.FetchDefinedStagesRequest) (*deployment.FetchDefinedStagesResponse, error)
- func (a *DeploymentService) Register(server *grpc.Server)
- type Plugin
- func (p *Plugin) BuildPipelineSyncStages(ctx context.Context, _ *sdk.ConfigNone, ...) (*sdk.BuildPipelineSyncStagesResponse, error)
- func (p *Plugin) BuildQuickSyncStages(ctx context.Context, _ *sdk.ConfigNone, input *sdk.BuildQuickSyncStagesInput) (*sdk.BuildQuickSyncStagesResponse, error)
- func (p *Plugin) DetermineStrategy(context.Context, *sdk.ConfigNone, *sdk.Client, *sdk.DetermineStrategyInput) (*sdk.DetermineStrategyResponse, error)
- func (p *Plugin) DetermineVersions(ctx context.Context, _ *sdk.ConfigNone, _ *sdk.Client, ...) (*sdk.DetermineVersionsResponse, error)
- func (p *Plugin) ExecuteStage(ctx context.Context, _ *sdk.ConfigNone, ...) (*sdk.ExecuteStageResponse, error)
- func (p *Plugin) FetchDefinedStages() []string
- func (p *Plugin) Name() string
- func (p *Plugin) Version() string
- type Stage
Constants ¶
const ( PredefinedStageK8sSync = "K8sSync" PredefinedStageRollback = "K8sRollback" )
Variables ¶
Functions ¶
func BuildQuickSyncPipeline ¶
func BuildQuickSyncPipeline(autoRollback bool) []sdk.QuickSyncStage
func GetPredefinedStage ¶
func GetPredefinedStage(id string) (*model.PipelineStage, bool)
GetPredefinedStage finds and returns the predefined stage for the given id.
Types ¶
type DeploymentService ¶
type DeploymentService struct {
deployment.UnimplementedDeploymentServiceServer
// contains filtered or unexported fields
}
func NewDeploymentService ¶
func NewDeploymentService( config *config.PipedPlugin, logger *zap.Logger, toolClient toolClient, logPersister logPersister, ) *DeploymentService
NewDeploymentService creates a new planService.
func (*DeploymentService) BuildPipelineSyncStages ¶
func (a *DeploymentService) BuildPipelineSyncStages(ctx context.Context, request *deployment.BuildPipelineSyncStagesRequest) (*deployment.BuildPipelineSyncStagesResponse, error)
BuildPipelineSyncStages implements deployment.DeploymentServiceServer.
func (*DeploymentService) BuildQuickSyncStages ¶
func (a *DeploymentService) BuildQuickSyncStages(ctx context.Context, request *deployment.BuildQuickSyncStagesRequest) (*deployment.BuildQuickSyncStagesResponse, error)
BuildQuickSyncStages implements deployment.DeploymentServiceServer.
func (*DeploymentService) DetermineStrategy ¶
func (a *DeploymentService) DetermineStrategy(ctx context.Context, request *deployment.DetermineStrategyRequest) (*deployment.DetermineStrategyResponse, error)
DetermineStrategy implements deployment.DeploymentServiceServer.
func (*DeploymentService) DetermineVersions ¶
func (a *DeploymentService) DetermineVersions(ctx context.Context, request *deployment.DetermineVersionsRequest) (*deployment.DetermineVersionsResponse, error)
DetermineVersions implements deployment.DeploymentServiceServer.
func (*DeploymentService) ExecuteStage ¶
func (a *DeploymentService) ExecuteStage(ctx context.Context, request *deployment.ExecuteStageRequest) (response *deployment.ExecuteStageResponse, _ error)
ExecuteStage performs stage-defined tasks. It returns stage status after execution without error. Error only be raised if the given stage is not supported.
func (*DeploymentService) FetchDefinedStages ¶
func (a *DeploymentService) FetchDefinedStages(context.Context, *deployment.FetchDefinedStagesRequest) (*deployment.FetchDefinedStagesResponse, error)
FetchDefinedStages implements deployment.DeploymentServiceServer.
func (*DeploymentService) Register ¶
func (a *DeploymentService) Register(server *grpc.Server)
Register registers all handling of this service into the specified gRPC server.
type Plugin ¶ added in v0.51.0
type Plugin struct {
}
Plugin implements the sdk.DeploymentPlugin interface.
func (*Plugin) BuildPipelineSyncStages ¶ added in v0.51.0
func (p *Plugin) BuildPipelineSyncStages(ctx context.Context, _ *sdk.ConfigNone, input *sdk.BuildPipelineSyncStagesInput) (*sdk.BuildPipelineSyncStagesResponse, error)
FIXME
func (*Plugin) BuildQuickSyncStages ¶ added in v0.51.0
func (p *Plugin) BuildQuickSyncStages(ctx context.Context, _ *sdk.ConfigNone, input *sdk.BuildQuickSyncStagesInput) (*sdk.BuildQuickSyncStagesResponse, error)
func (*Plugin) DetermineStrategy ¶ added in v0.51.0
func (p *Plugin) DetermineStrategy(context.Context, *sdk.ConfigNone, *sdk.Client, *sdk.DetermineStrategyInput) (*sdk.DetermineStrategyResponse, error)
FIXME
func (*Plugin) DetermineVersions ¶ added in v0.51.0
func (p *Plugin) DetermineVersions(ctx context.Context, _ *sdk.ConfigNone, _ *sdk.Client, input *sdk.DetermineVersionsInput) (*sdk.DetermineVersionsResponse, error)
func (*Plugin) ExecuteStage ¶ added in v0.51.0
func (p *Plugin) ExecuteStage(ctx context.Context, _ *sdk.ConfigNone, dts []*sdk.DeployTarget[kubeconfig.KubernetesDeployTargetConfig], input *sdk.ExecuteStageInput) (*sdk.ExecuteStageResponse, error)
FIXME
func (*Plugin) FetchDefinedStages ¶ added in v0.51.0
type Stage ¶
type Stage string
const ( // StageK8sSync represents the state where // all resources should be synced with the Git state. StageK8sSync Stage = "K8S_SYNC" // StageK8sPrimaryRollout represents the state where // the PRIMARY variant resources has been updated to the new version/configuration. StageK8sPrimaryRollout Stage = "K8S_PRIMARY_ROLLOUT" // StageK8sCanaryRollout represents the state where // the CANARY variant resources has been rolled out with the new version/configuration. StageK8sCanaryRollout Stage = "K8S_CANARY_ROLLOUT" // StageK8sCanaryClean represents the state where // the CANARY variant resources has been cleaned. StageK8sCanaryClean Stage = "K8S_CANARY_CLEAN" // StageK8sBaselineRollout represents the state where // the BASELINE variant resources has been rolled out. StageK8sBaselineRollout Stage = "K8S_BASELINE_ROLLOUT" // StageK8sBaselineClean represents the state where // the BASELINE variant resources has been cleaned. StageK8sBaselineClean Stage = "K8S_BASELINE_CLEAN" // StageK8sTrafficRouting represents the state where the traffic to application // should be splitted as the specified percentage to PRIMARY, CANARY, BASELINE variants. StageK8sTrafficRouting Stage = "K8S_TRAFFIC_ROUTING" // StageK8sRollback represents the state where all deployed resources should be rollbacked. StageK8sRollback Stage = "K8S_ROLLBACK" )