Documentation ¶
Index ¶
- type API
- func (a *API) AddApplication(ctx context.Context, req *apiservice.AddApplicationRequest) (*apiservice.AddApplicationResponse, error)
- func (a *API) DeleteApplication(ctx context.Context, req *apiservice.DeleteApplicationRequest) (*apiservice.DeleteApplicationResponse, error)
- func (a *API) DisableApplication(ctx context.Context, req *apiservice.DisableApplicationRequest) (*apiservice.DisableApplicationResponse, error)
- func (a *API) DisablePiped(ctx context.Context, req *apiservice.DisablePipedRequest) (*apiservice.DisablePipedResponse, error)
- func (a *API) EnablePiped(ctx context.Context, req *apiservice.EnablePipedRequest) (*apiservice.EnablePipedResponse, error)
- func (a *API) Encrypt(ctx context.Context, req *apiservice.EncryptRequest) (*apiservice.EncryptResponse, error)
- func (a *API) GetApplication(ctx context.Context, req *apiservice.GetApplicationRequest) (*apiservice.GetApplicationResponse, error)
- func (a *API) GetCommand(ctx context.Context, req *apiservice.GetCommandRequest) (*apiservice.GetCommandResponse, error)
- func (a *API) GetDeployment(ctx context.Context, req *apiservice.GetDeploymentRequest) (*apiservice.GetDeploymentResponse, error)
- func (a *API) GetPlanPreviewResults(ctx context.Context, req *apiservice.GetPlanPreviewResultsRequest) (*apiservice.GetPlanPreviewResultsResponse, error)
- func (a *API) ListApplications(ctx context.Context, req *apiservice.ListApplicationsRequest) (*apiservice.ListApplicationsResponse, error)
- func (a *API) Register(server *grpc.Server)
- func (a *API) RegisterEvent(ctx context.Context, req *apiservice.RegisterEventRequest) (*apiservice.RegisterEventResponse, error)
- func (a *API) RenameApplicationConfigFile(ctx context.Context, req *apiservice.RenameApplicationConfigFileRequest) (*apiservice.RenameApplicationConfigFileResponse, error)
- func (a *API) RequestPlanPreview(ctx context.Context, req *apiservice.RequestPlanPreviewRequest) (*apiservice.RequestPlanPreviewResponse, error)
- func (a *API) SyncApplication(ctx context.Context, req *apiservice.SyncApplicationRequest) (*apiservice.SyncApplicationResponse, error)
- type PipedAPI
- func (a *PipedAPI) CreateDeployment(ctx context.Context, req *pipedservice.CreateDeploymentRequest) (*pipedservice.CreateDeploymentResponse, error)
- func (a *PipedAPI) CreateDeploymentChain(ctx context.Context, req *pipedservice.CreateDeploymentChainRequest) (*pipedservice.CreateDeploymentChainResponse, error)
- func (a *PipedAPI) GetApplicationMostRecentDeployment(ctx context.Context, ...) (*pipedservice.GetApplicationMostRecentDeploymentResponse, error)
- func (a *PipedAPI) GetDeployment(ctx context.Context, req *pipedservice.GetDeploymentRequest) (*pipedservice.GetDeploymentResponse, error)
- func (a *PipedAPI) GetDesiredVersion(ctx context.Context, _ *pipedservice.GetDesiredVersionRequest) (*pipedservice.GetDesiredVersionResponse, error)
- func (a *PipedAPI) GetLatestAnalysisResult(ctx context.Context, req *pipedservice.GetLatestAnalysisResultRequest) (*pipedservice.GetLatestAnalysisResultResponse, error)
- func (a *PipedAPI) GetLatestEvent(ctx context.Context, req *pipedservice.GetLatestEventRequest) (*pipedservice.GetLatestEventResponse, error)
- func (a *PipedAPI) InChainDeploymentPlannable(ctx context.Context, req *pipedservice.InChainDeploymentPlannableRequest) (*pipedservice.InChainDeploymentPlannableResponse, error)
- func (a *PipedAPI) ListApplications(ctx context.Context, req *pipedservice.ListApplicationsRequest) (*pipedservice.ListApplicationsResponse, error)
- func (a *PipedAPI) ListEvents(ctx context.Context, req *pipedservice.ListEventsRequest) (*pipedservice.ListEventsResponse, error)
- func (a *PipedAPI) ListNotCompletedDeployments(ctx context.Context, req *pipedservice.ListNotCompletedDeploymentsRequest) (*pipedservice.ListNotCompletedDeploymentsResponse, error)
- func (a *PipedAPI) ListUnhandledCommands(ctx context.Context, req *pipedservice.ListUnhandledCommandsRequest) (*pipedservice.ListUnhandledCommandsResponse, error)
- func (a *PipedAPI) PutLatestAnalysisResult(ctx context.Context, req *pipedservice.PutLatestAnalysisResultRequest) (*pipedservice.PutLatestAnalysisResultResponse, error)
- func (a *PipedAPI) Register(server *grpc.Server)
- func (a *PipedAPI) ReportApplicationDeployingStatus(ctx context.Context, req *pipedservice.ReportApplicationDeployingStatusRequest) (*pipedservice.ReportApplicationDeployingStatusResponse, error)
- func (a *PipedAPI) ReportApplicationLiveState(ctx context.Context, req *pipedservice.ReportApplicationLiveStateRequest) (*pipedservice.ReportApplicationLiveStateResponse, error)
- func (a *PipedAPI) ReportApplicationLiveStateEvents(ctx context.Context, req *pipedservice.ReportApplicationLiveStateEventsRequest) (*pipedservice.ReportApplicationLiveStateEventsResponse, error)
- func (a *PipedAPI) ReportApplicationMostRecentDeployment(ctx context.Context, ...) (*pipedservice.ReportApplicationMostRecentDeploymentResponse, error)
- func (a *PipedAPI) ReportApplicationSyncState(ctx context.Context, req *pipedservice.ReportApplicationSyncStateRequest) (*pipedservice.ReportApplicationSyncStateResponse, error)
- func (a *PipedAPI) ReportCommandHandled(ctx context.Context, req *pipedservice.ReportCommandHandledRequest) (*pipedservice.ReportCommandHandledResponse, error)
- func (a *PipedAPI) ReportDeploymentCompleted(ctx context.Context, req *pipedservice.ReportDeploymentCompletedRequest) (*pipedservice.ReportDeploymentCompletedResponse, error)
- func (a *PipedAPI) ReportDeploymentPlanned(ctx context.Context, req *pipedservice.ReportDeploymentPlannedRequest) (*pipedservice.ReportDeploymentPlannedResponse, error)
- func (a *PipedAPI) ReportDeploymentStatusChanged(ctx context.Context, req *pipedservice.ReportDeploymentStatusChangedRequest) (*pipedservice.ReportDeploymentStatusChangedResponse, error)
- func (a *PipedAPI) ReportEventStatuses(ctx context.Context, req *pipedservice.ReportEventStatusesRequest) (*pipedservice.ReportEventStatusesResponse, error)
- func (a *PipedAPI) ReportEventsHandled(ctx context.Context, req *pipedservice.ReportEventsHandledRequest) (*pipedservice.ReportEventsHandledResponse, error)
- func (a *PipedAPI) ReportPipedMeta(ctx context.Context, req *pipedservice.ReportPipedMetaRequest) (*pipedservice.ReportPipedMetaResponse, error)
- func (a *PipedAPI) ReportStageLogs(ctx context.Context, req *pipedservice.ReportStageLogsRequest) (*pipedservice.ReportStageLogsResponse, error)
- func (a *PipedAPI) ReportStageLogsFromLastCheckpoint(ctx context.Context, ...) (*pipedservice.ReportStageLogsFromLastCheckpointResponse, error)
- func (a *PipedAPI) ReportStageStatusChanged(ctx context.Context, req *pipedservice.ReportStageStatusChangedRequest) (*pipedservice.ReportStageStatusChangedResponse, error)
- func (a *PipedAPI) ReportStat(ctx context.Context, req *pipedservice.ReportStatRequest) (*pipedservice.ReportStatResponse, error)
- func (a *PipedAPI) ReportUnregisteredApplicationConfigurations(ctx context.Context, ...) (*pipedservice.ReportUnregisteredApplicationConfigurationsResponse, error)
- func (a *PipedAPI) SaveDeploymentMetadata(ctx context.Context, req *pipedservice.SaveDeploymentMetadataRequest) (*pipedservice.SaveDeploymentMetadataResponse, error)
- func (a *PipedAPI) SaveStageMetadata(ctx context.Context, req *pipedservice.SaveStageMetadataRequest) (*pipedservice.SaveStageMetadataResponse, error)
- func (a *PipedAPI) UpdateApplicationConfigurations(ctx context.Context, req *pipedservice.UpdateApplicationConfigurationsRequest) (*pipedservice.UpdateApplicationConfigurationsResponse, error)
- type WebAPI
- func (a *WebAPI) AddApplication(ctx context.Context, req *webservice.AddApplicationRequest) (*webservice.AddApplicationResponse, error)
- func (a *WebAPI) AddProjectRBACRole(ctx context.Context, req *webservice.AddProjectRBACRoleRequest) (*webservice.AddProjectRBACRoleResponse, error)
- func (a *WebAPI) AddProjectUserGroup(ctx context.Context, req *webservice.AddProjectUserGroupRequest) (*webservice.AddProjectUserGroupResponse, error)
- func (a *WebAPI) ApproveStage(ctx context.Context, req *webservice.ApproveStageRequest) (*webservice.ApproveStageResponse, error)
- func (a *WebAPI) CancelDeployment(ctx context.Context, req *webservice.CancelDeploymentRequest) (*webservice.CancelDeploymentResponse, error)
- func (a *WebAPI) DeleteApplication(ctx context.Context, req *webservice.DeleteApplicationRequest) (*webservice.DeleteApplicationResponse, error)
- func (a *WebAPI) DeleteOldPipedKeys(ctx context.Context, req *webservice.DeleteOldPipedKeysRequest) (*webservice.DeleteOldPipedKeysResponse, error)
- func (a *WebAPI) DeleteProjectRBACRole(ctx context.Context, req *webservice.DeleteProjectRBACRoleRequest) (*webservice.DeleteProjectRBACRoleResponse, error)
- func (a *WebAPI) DeleteProjectUserGroup(ctx context.Context, req *webservice.DeleteProjectUserGroupRequest) (*webservice.DeleteProjectUserGroupResponse, error)
- func (a *WebAPI) DisableAPIKey(ctx context.Context, req *webservice.DisableAPIKeyRequest) (*webservice.DisableAPIKeyResponse, error)
- func (a *WebAPI) DisableApplication(ctx context.Context, req *webservice.DisableApplicationRequest) (*webservice.DisableApplicationResponse, error)
- func (a *WebAPI) DisablePiped(ctx context.Context, req *webservice.DisablePipedRequest) (*webservice.DisablePipedResponse, error)
- func (a *WebAPI) DisableStaticAdmin(ctx context.Context, req *webservice.DisableStaticAdminRequest) (*webservice.DisableStaticAdminResponse, error)
- func (a *WebAPI) EnableApplication(ctx context.Context, req *webservice.EnableApplicationRequest) (*webservice.EnableApplicationResponse, error)
- func (a *WebAPI) EnablePiped(ctx context.Context, req *webservice.EnablePipedRequest) (*webservice.EnablePipedResponse, error)
- func (a *WebAPI) EnableStaticAdmin(ctx context.Context, req *webservice.EnableStaticAdminRequest) (*webservice.EnableStaticAdminResponse, error)
- func (a *WebAPI) GenerateAPIKey(ctx context.Context, req *webservice.GenerateAPIKeyRequest) (*webservice.GenerateAPIKeyResponse, error)
- func (a *WebAPI) GenerateApplicationSealedSecret(ctx context.Context, req *webservice.GenerateApplicationSealedSecretRequest) (*webservice.GenerateApplicationSealedSecretResponse, error)
- func (a *WebAPI) GetApplication(ctx context.Context, req *webservice.GetApplicationRequest) (*webservice.GetApplicationResponse, error)
- func (a *WebAPI) GetApplicationLiveState(ctx context.Context, req *webservice.GetApplicationLiveStateRequest) (*webservice.GetApplicationLiveStateResponse, error)
- func (a *WebAPI) GetCommand(ctx context.Context, req *webservice.GetCommandRequest) (*webservice.GetCommandResponse, error)
- func (a *WebAPI) GetDeployment(ctx context.Context, req *webservice.GetDeploymentRequest) (*webservice.GetDeploymentResponse, error)
- func (a *WebAPI) GetDeploymentChain(ctx context.Context, req *webservice.GetDeploymentChainRequest) (*webservice.GetDeploymentChainResponse, error)
- func (a *WebAPI) GetInsightApplicationCount(ctx context.Context, req *webservice.GetInsightApplicationCountRequest) (*webservice.GetInsightApplicationCountResponse, error)
- func (a *WebAPI) GetInsightData(ctx context.Context, req *webservice.GetInsightDataRequest) (*webservice.GetInsightDataResponse, error)
- func (a *WebAPI) GetMe(ctx context.Context, req *webservice.GetMeRequest) (*webservice.GetMeResponse, error)
- func (a *WebAPI) GetPiped(ctx context.Context, req *webservice.GetPipedRequest) (*webservice.GetPipedResponse, error)
- func (a *WebAPI) GetProject(ctx context.Context, req *webservice.GetProjectRequest) (*webservice.GetProjectResponse, error)
- func (a *WebAPI) GetStageLog(ctx context.Context, req *webservice.GetStageLogRequest) (*webservice.GetStageLogResponse, error)
- func (a *WebAPI) ListAPIKeys(ctx context.Context, req *webservice.ListAPIKeysRequest) (*webservice.ListAPIKeysResponse, error)
- func (a *WebAPI) ListApplications(ctx context.Context, req *webservice.ListApplicationsRequest) (*webservice.ListApplicationsResponse, error)
- func (a *WebAPI) ListDeploymentChains(ctx context.Context, req *webservice.ListDeploymentChainsRequest) (*webservice.ListDeploymentChainsResponse, error)
- func (a *WebAPI) ListDeployments(ctx context.Context, req *webservice.ListDeploymentsRequest) (*webservice.ListDeploymentsResponse, error)
- func (a *WebAPI) ListEvents(ctx context.Context, req *webservice.ListEventsRequest) (*webservice.ListEventsResponse, error)
- func (a *WebAPI) ListPipeds(ctx context.Context, req *webservice.ListPipedsRequest) (*webservice.ListPipedsResponse, error)
- func (a *WebAPI) ListReleasedVersions(ctx context.Context, req *webservice.ListReleasedVersionsRequest) (*webservice.ListReleasedVersionsResponse, error)
- func (a *WebAPI) ListUnregisteredApplications(ctx context.Context, _ *webservice.ListUnregisteredApplicationsRequest) (*webservice.ListUnregisteredApplicationsResponse, error)
- func (a *WebAPI) RecreatePipedKey(ctx context.Context, req *webservice.RecreatePipedKeyRequest) (*webservice.RecreatePipedKeyResponse, error)
- func (a *WebAPI) Register(server *grpc.Server)
- func (a *WebAPI) RegisterPiped(ctx context.Context, req *webservice.RegisterPipedRequest) (*webservice.RegisterPipedResponse, error)
- func (a *WebAPI) RestartPiped(ctx context.Context, req *webservice.RestartPipedRequest) (*webservice.RestartPipedResponse, error)
- func (a *WebAPI) SkipStage(ctx context.Context, req *webservice.SkipStageRequest) (*webservice.SkipStageResponse, error)
- func (a *WebAPI) SyncApplication(ctx context.Context, req *webservice.SyncApplicationRequest) (*webservice.SyncApplicationResponse, error)
- func (a *WebAPI) UpdateApplication(ctx context.Context, req *webservice.UpdateApplicationRequest) (*webservice.UpdateApplicationResponse, error)
- func (a *WebAPI) UpdatePiped(ctx context.Context, req *webservice.UpdatePipedRequest) (*webservice.UpdatePipedResponse, error)
- func (a *WebAPI) UpdatePipedDesiredVersion(ctx context.Context, req *webservice.UpdatePipedDesiredVersionRequest) (*webservice.UpdatePipedDesiredVersionResponse, error)
- func (a *WebAPI) UpdateProjectRBACConfig(ctx context.Context, req *webservice.UpdateProjectRBACConfigRequest) (*webservice.UpdateProjectRBACConfigResponse, error)
- func (a *WebAPI) UpdateProjectRBACRole(ctx context.Context, req *webservice.UpdateProjectRBACRoleRequest) (*webservice.UpdateProjectRBACRoleResponse, error)
- func (a *WebAPI) UpdateProjectSSOConfig(ctx context.Context, req *webservice.UpdateProjectSSOConfigRequest) (*webservice.UpdateProjectSSOConfigResponse, error)
- func (a *WebAPI) UpdateProjectStaticAdmin(ctx context.Context, req *webservice.UpdateProjectStaticAdminRequest) (*webservice.UpdateProjectStaticAdminResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { apiservice.UnimplementedAPIServiceServer // contains filtered or unexported fields }
API implements the behaviors for the gRPC definitions of API.
func NewAPI ¶
func NewAPI( ctx context.Context, ds datastore.DataStore, sc cache.Cache, cog commandOutputGetter, psc cache.Cache, webBaseURL string, logger *zap.Logger, ) *API
NewAPI creates a new API instance.
func (*API) AddApplication ¶
func (a *API) AddApplication(ctx context.Context, req *apiservice.AddApplicationRequest) (*apiservice.AddApplicationResponse, error)
func (*API) DeleteApplication ¶ added in v0.39.0
func (a *API) DeleteApplication(ctx context.Context, req *apiservice.DeleteApplicationRequest) (*apiservice.DeleteApplicationResponse, error)
func (*API) DisableApplication ¶ added in v0.41.3
func (a *API) DisableApplication(ctx context.Context, req *apiservice.DisableApplicationRequest) (*apiservice.DisableApplicationResponse, error)
func (*API) DisablePiped ¶
func (a *API) DisablePiped(ctx context.Context, req *apiservice.DisablePipedRequest) (*apiservice.DisablePipedResponse, error)
func (*API) EnablePiped ¶
func (a *API) EnablePiped(ctx context.Context, req *apiservice.EnablePipedRequest) (*apiservice.EnablePipedResponse, error)
func (*API) Encrypt ¶
func (a *API) Encrypt(ctx context.Context, req *apiservice.EncryptRequest) (*apiservice.EncryptResponse, error)
func (*API) GetApplication ¶
func (a *API) GetApplication(ctx context.Context, req *apiservice.GetApplicationRequest) (*apiservice.GetApplicationResponse, error)
func (*API) GetCommand ¶
func (a *API) GetCommand(ctx context.Context, req *apiservice.GetCommandRequest) (*apiservice.GetCommandResponse, error)
func (*API) GetDeployment ¶
func (a *API) GetDeployment(ctx context.Context, req *apiservice.GetDeploymentRequest) (*apiservice.GetDeploymentResponse, error)
func (*API) GetPlanPreviewResults ¶
func (a *API) GetPlanPreviewResults(ctx context.Context, req *apiservice.GetPlanPreviewResultsRequest) (*apiservice.GetPlanPreviewResultsResponse, error)
func (*API) ListApplications ¶
func (a *API) ListApplications(ctx context.Context, req *apiservice.ListApplicationsRequest) (*apiservice.ListApplicationsResponse, error)
ListApplications returns the application list of the project where the caller belongs to. Currently, the maximum number of returned applications per request is set to 10. The response contains a "cursor" value, which should be passed in the next request in order to get the next 10 applications. If the cursor is not provided in the request, only 10 latest applications will be returned.
func (*API) Register ¶
Register registers all handling of this service into the specified gRPC server.
func (*API) RegisterEvent ¶
func (a *API) RegisterEvent(ctx context.Context, req *apiservice.RegisterEventRequest) (*apiservice.RegisterEventResponse, error)
func (*API) RenameApplicationConfigFile ¶ added in v0.24.1
func (a *API) RenameApplicationConfigFile(ctx context.Context, req *apiservice.RenameApplicationConfigFileRequest) (*apiservice.RenameApplicationConfigFileResponse, error)
func (*API) RequestPlanPreview ¶
func (a *API) RequestPlanPreview(ctx context.Context, req *apiservice.RequestPlanPreviewRequest) (*apiservice.RequestPlanPreviewResponse, error)
func (*API) SyncApplication ¶
func (a *API) SyncApplication(ctx context.Context, req *apiservice.SyncApplicationRequest) (*apiservice.SyncApplicationResponse, error)
type PipedAPI ¶
type PipedAPI struct { pipedservice.UnimplementedPipedServiceServer // contains filtered or unexported fields }
PipedAPI implements the behaviors for the gRPC definitions of PipedAPI.
func NewPipedAPI ¶
func NewPipedAPI(ctx context.Context, ds datastore.DataStore, sc cache.Cache, sls stagelogstore.Store, alss applicationlivestatestore.Store, las analysisresultstore.Store, hc cache.Cache, cop commandOutputPutter, uas unregisteredappstore.Store, webBaseURL string, logger *zap.Logger) *PipedAPI
NewPipedAPI creates a new PipedAPI instance.
func (*PipedAPI) CreateDeployment ¶
func (a *PipedAPI) CreateDeployment(ctx context.Context, req *pipedservice.CreateDeploymentRequest) (*pipedservice.CreateDeploymentResponse, error)
CreateDeployment creates/triggers a new deployment for an application that is managed by this piped. This will be used by DeploymentTrigger component.
func (*PipedAPI) CreateDeploymentChain ¶
func (a *PipedAPI) CreateDeploymentChain(ctx context.Context, req *pipedservice.CreateDeploymentChainRequest) (*pipedservice.CreateDeploymentChainResponse, error)
CreateDeploymentChain creates a new deployment chain object and all required commands to trigger deployment for applications in the chain.
func (*PipedAPI) GetApplicationMostRecentDeployment ¶
func (a *PipedAPI) GetApplicationMostRecentDeployment(ctx context.Context, req *pipedservice.GetApplicationMostRecentDeploymentRequest) (*pipedservice.GetApplicationMostRecentDeploymentResponse, error)
GetApplicationMostRecentDeployment returns the most recent deployment of the given application.
func (*PipedAPI) GetDeployment ¶
func (a *PipedAPI) GetDeployment(ctx context.Context, req *pipedservice.GetDeploymentRequest) (*pipedservice.GetDeploymentResponse, error)
func (*PipedAPI) GetDesiredVersion ¶
func (a *PipedAPI) GetDesiredVersion(ctx context.Context, _ *pipedservice.GetDesiredVersionRequest) (*pipedservice.GetDesiredVersionResponse, error)
func (*PipedAPI) GetLatestAnalysisResult ¶
func (a *PipedAPI) GetLatestAnalysisResult(ctx context.Context, req *pipedservice.GetLatestAnalysisResultRequest) (*pipedservice.GetLatestAnalysisResultResponse, error)
func (*PipedAPI) GetLatestEvent ¶
func (a *PipedAPI) GetLatestEvent(ctx context.Context, req *pipedservice.GetLatestEventRequest) (*pipedservice.GetLatestEventResponse, error)
GetLatestEvent returns the latest event that meets the given conditions.
func (*PipedAPI) InChainDeploymentPlannable ¶
func (a *PipedAPI) InChainDeploymentPlannable(ctx context.Context, req *pipedservice.InChainDeploymentPlannableRequest) (*pipedservice.InChainDeploymentPlannableResponse, error)
InChainDeploymentPlannable hecks the completion and status of the previous block in the deployment chain. An in chain deployment is treated as plannable in case: - It's the first deployment of its deployment chain. - All deployments of its previous block in chain are at DEPLOYMENT_SUCCESS state. In case the previous block is finished with unsuccessfully status, cancelled flag will be returned so that the in charge piped will be aware and stop that deployment.
func (*PipedAPI) ListApplications ¶
func (a *PipedAPI) ListApplications(ctx context.Context, req *pipedservice.ListApplicationsRequest) (*pipedservice.ListApplicationsResponse, error)
ListApplications returns a list of registered applications that should be managed by the requested piped. Disabled applications should not be included in the response. Piped uses this RPC to fetch and sync the application configuration into its local database.
func (*PipedAPI) ListEvents ¶
func (a *PipedAPI) ListEvents(ctx context.Context, req *pipedservice.ListEventsRequest) (*pipedservice.ListEventsResponse, error)
ListEvents returns a list of Events inside the given range.
func (*PipedAPI) ListNotCompletedDeployments ¶
func (a *PipedAPI) ListNotCompletedDeployments(ctx context.Context, req *pipedservice.ListNotCompletedDeploymentsRequest) (*pipedservice.ListNotCompletedDeploymentsResponse, error)
ListNotCompletedDeployments returns a list of not completed deployments which are managed by this piped. DeploymentController component uses this RPC to spawns/syncs its local deployment executors.
func (*PipedAPI) ListUnhandledCommands ¶
func (a *PipedAPI) ListUnhandledCommands(ctx context.Context, req *pipedservice.ListUnhandledCommandsRequest) (*pipedservice.ListUnhandledCommandsResponse, error)
ListUnhandledCommands is periodically called by piped to obtain the commands that should be handled. Whenever an user makes an interaction from WebUI (cancel/approve/retry/sync) a new command with a unique identifier will be generated an saved into the datastore. Piped uses this RPC to list all still-not-handled commands to handle them, then report back the result to server. On other side, the web will periodically check the command status and feedback the result to user. In the future, we may need a solution to remove all old-handled commands from datastore for space.
func (*PipedAPI) PutLatestAnalysisResult ¶
func (a *PipedAPI) PutLatestAnalysisResult(ctx context.Context, req *pipedservice.PutLatestAnalysisResultRequest) (*pipedservice.PutLatestAnalysisResultResponse, error)
func (*PipedAPI) Register ¶
Register registers all handling of this service into the specified gRPC server.
func (*PipedAPI) ReportApplicationDeployingStatus ¶
func (a *PipedAPI) ReportApplicationDeployingStatus(ctx context.Context, req *pipedservice.ReportApplicationDeployingStatusRequest) (*pipedservice.ReportApplicationDeployingStatusResponse, error)
ReportApplicationDeployingStatus is used to report whether the specified application is deploying or not.
func (*PipedAPI) ReportApplicationLiveState ¶
func (a *PipedAPI) ReportApplicationLiveState(ctx context.Context, req *pipedservice.ReportApplicationLiveStateRequest) (*pipedservice.ReportApplicationLiveStateResponse, error)
ReportApplicationLiveState is periodically sent to correct full state of an application. For kubernetes application, this contains a full tree of its kubernetes resources. The tree data should be written into filestore immediately and then the state in cache should be refreshsed too.
func (*PipedAPI) ReportApplicationLiveStateEvents ¶
func (a *PipedAPI) ReportApplicationLiveStateEvents(ctx context.Context, req *pipedservice.ReportApplicationLiveStateEventsRequest) (*pipedservice.ReportApplicationLiveStateEventsResponse, error)
ReportApplicationLiveStateEvents is sent by piped to submit one or multiple events about the changes of application state. Control plane uses the received events to update the state of application-resource-tree. We want to start by a simple solution at this initial stage of development, so the API server just handles as below: - loads the related application-resource-tree from filestore - checks and builds new state for the application-resource-tree - updates new state into fielstore and cache (cache data is for reading while handling web requests) In the future, we may want to redesign the behavior of this RPC by using pubsub/queue pattern. After receiving the events, all of them will be publish into a queue immediately, and then another Handler service will pick them inorder to apply to build new state. By that way we can control the traffic to the datastore in a better way.
func (*PipedAPI) ReportApplicationMostRecentDeployment ¶
func (a *PipedAPI) ReportApplicationMostRecentDeployment(ctx context.Context, req *pipedservice.ReportApplicationMostRecentDeploymentRequest) (*pipedservice.ReportApplicationMostRecentDeploymentResponse, error)
ReportApplicationMostRecentDeployment is used to update the basic information about the most recent deployment of a specific application.
func (*PipedAPI) ReportApplicationSyncState ¶
func (a *PipedAPI) ReportApplicationSyncState(ctx context.Context, req *pipedservice.ReportApplicationSyncStateRequest) (*pipedservice.ReportApplicationSyncStateResponse, error)
ReportApplicationSyncState is used to update the sync status of an application.
func (*PipedAPI) ReportCommandHandled ¶
func (a *PipedAPI) ReportCommandHandled(ctx context.Context, req *pipedservice.ReportCommandHandledRequest) (*pipedservice.ReportCommandHandledResponse, error)
ReportCommandHandled is called by piped to mark a specific command as handled. The request payload will contain the handle status as well as any additional result data. The handle result should be updated to both datastore and cache (for reading from web).
func (*PipedAPI) ReportDeploymentCompleted ¶
func (a *PipedAPI) ReportDeploymentCompleted(ctx context.Context, req *pipedservice.ReportDeploymentCompletedRequest) (*pipedservice.ReportDeploymentCompletedResponse, error)
ReportDeploymentCompleted used by piped to update the status of a specific deployment to SUCCESS | FAILURE | CANCELLED.
func (*PipedAPI) ReportDeploymentPlanned ¶
func (a *PipedAPI) ReportDeploymentPlanned(ctx context.Context, req *pipedservice.ReportDeploymentPlannedRequest) (*pipedservice.ReportDeploymentPlannedResponse, error)
ReportDeploymentPlanned used by piped to update the status of a specific deployment to PLANNED.
func (*PipedAPI) ReportDeploymentStatusChanged ¶
func (a *PipedAPI) ReportDeploymentStatusChanged(ctx context.Context, req *pipedservice.ReportDeploymentStatusChangedRequest) (*pipedservice.ReportDeploymentStatusChangedResponse, error)
ReportDeploymentStatusChanged is used to update the status of a specific deployment to RUNNING or ROLLING_BACK.
func (*PipedAPI) ReportEventStatuses ¶ added in v0.24.1
func (a *PipedAPI) ReportEventStatuses(ctx context.Context, req *pipedservice.ReportEventStatusesRequest) (*pipedservice.ReportEventStatusesResponse, error)
func (*PipedAPI) ReportEventsHandled ¶
func (a *PipedAPI) ReportEventsHandled(ctx context.Context, req *pipedservice.ReportEventsHandledRequest) (*pipedservice.ReportEventsHandledResponse, error)
Deprecated. This is only for the old Piped agents.
func (*PipedAPI) ReportPipedMeta ¶
func (a *PipedAPI) ReportPipedMeta(ctx context.Context, req *pipedservice.ReportPipedMetaRequest) (*pipedservice.ReportPipedMetaResponse, error)
ReportPipedMeta is sent by piped while starting up to report its metadata such as configured cloud providers.
func (*PipedAPI) ReportStageLogs ¶
func (a *PipedAPI) ReportStageLogs(ctx context.Context, req *pipedservice.ReportStageLogsRequest) (*pipedservice.ReportStageLogsResponse, error)
ReportStageLogs is sent by piped to save the log of a pipeline stage.
func (*PipedAPI) ReportStageLogsFromLastCheckpoint ¶
func (a *PipedAPI) ReportStageLogsFromLastCheckpoint(ctx context.Context, req *pipedservice.ReportStageLogsFromLastCheckpointRequest) (*pipedservice.ReportStageLogsFromLastCheckpointResponse, error)
ReportStageLogsFromLastCheckpoint is used to save the full logs from the most recently saved point.
func (*PipedAPI) ReportStageStatusChanged ¶
func (a *PipedAPI) ReportStageStatusChanged(ctx context.Context, req *pipedservice.ReportStageStatusChangedRequest) (*pipedservice.ReportStageStatusChangedResponse, error)
ReportStageStatusChanged used by piped to update the status of a specific stage of a deployment.
func (*PipedAPI) ReportStat ¶
func (a *PipedAPI) ReportStat(ctx context.Context, req *pipedservice.ReportStatRequest) (*pipedservice.ReportStatResponse, error)
ReportStat is periodically sent to report its realtime status/stats to control-plane. The received stats will be pushed to the metrics collector.
func (*PipedAPI) ReportUnregisteredApplicationConfigurations ¶
func (a *PipedAPI) ReportUnregisteredApplicationConfigurations(ctx context.Context, req *pipedservice.ReportUnregisteredApplicationConfigurationsRequest) (*pipedservice.ReportUnregisteredApplicationConfigurationsResponse, error)
func (*PipedAPI) SaveDeploymentMetadata ¶
func (a *PipedAPI) SaveDeploymentMetadata(ctx context.Context, req *pipedservice.SaveDeploymentMetadataRequest) (*pipedservice.SaveDeploymentMetadataResponse, error)
SaveDeploymentMetadata used by piped to persist the metadata of a specific deployment.
func (*PipedAPI) SaveStageMetadata ¶
func (a *PipedAPI) SaveStageMetadata(ctx context.Context, req *pipedservice.SaveStageMetadataRequest) (*pipedservice.SaveStageMetadataResponse, error)
SaveStageMetadata used by piped to persist the metadata of a specific stage of a deployment.
func (*PipedAPI) UpdateApplicationConfigurations ¶
func (a *PipedAPI) UpdateApplicationConfigurations(ctx context.Context, req *pipedservice.UpdateApplicationConfigurationsRequest) (*pipedservice.UpdateApplicationConfigurationsResponse, error)
type WebAPI ¶
type WebAPI struct { webservice.UnimplementedWebServiceServer // contains filtered or unexported fields }
WebAPI implements the behaviors for the gRPC definitions of WebAPI.
func NewWebAPI ¶
func NewWebAPI( ctx context.Context, ds datastore.DataStore, sc cache.Cache, sls stagelogstore.Store, alss applicationlivestatestore.Store, uas unregisteredappstore.Store, ip insight.Provider, psc cache.Cache, projs map[string]config.ControlPlaneProject, encrypter encrypter, logger *zap.Logger, ) *WebAPI
NewWebAPI creates a new WebAPI instance.
func (*WebAPI) AddApplication ¶
func (a *WebAPI) AddApplication(ctx context.Context, req *webservice.AddApplicationRequest) (*webservice.AddApplicationResponse, error)
func (*WebAPI) AddProjectRBACRole ¶ added in v0.28.0
func (a *WebAPI) AddProjectRBACRole(ctx context.Context, req *webservice.AddProjectRBACRoleRequest) (*webservice.AddProjectRBACRoleResponse, error)
func (*WebAPI) AddProjectUserGroup ¶ added in v0.28.0
func (a *WebAPI) AddProjectUserGroup(ctx context.Context, req *webservice.AddProjectUserGroupRequest) (*webservice.AddProjectUserGroupResponse, error)
func (*WebAPI) ApproveStage ¶
func (a *WebAPI) ApproveStage(ctx context.Context, req *webservice.ApproveStageRequest) (*webservice.ApproveStageResponse, error)
func (*WebAPI) CancelDeployment ¶
func (a *WebAPI) CancelDeployment(ctx context.Context, req *webservice.CancelDeploymentRequest) (*webservice.CancelDeploymentResponse, error)
func (*WebAPI) DeleteApplication ¶
func (a *WebAPI) DeleteApplication(ctx context.Context, req *webservice.DeleteApplicationRequest) (*webservice.DeleteApplicationResponse, error)
func (*WebAPI) DeleteOldPipedKeys ¶
func (a *WebAPI) DeleteOldPipedKeys(ctx context.Context, req *webservice.DeleteOldPipedKeysRequest) (*webservice.DeleteOldPipedKeysResponse, error)
func (*WebAPI) DeleteProjectRBACRole ¶ added in v0.28.0
func (a *WebAPI) DeleteProjectRBACRole(ctx context.Context, req *webservice.DeleteProjectRBACRoleRequest) (*webservice.DeleteProjectRBACRoleResponse, error)
func (*WebAPI) DeleteProjectUserGroup ¶ added in v0.28.0
func (a *WebAPI) DeleteProjectUserGroup(ctx context.Context, req *webservice.DeleteProjectUserGroupRequest) (*webservice.DeleteProjectUserGroupResponse, error)
func (*WebAPI) DisableAPIKey ¶
func (a *WebAPI) DisableAPIKey(ctx context.Context, req *webservice.DisableAPIKeyRequest) (*webservice.DisableAPIKeyResponse, error)
func (*WebAPI) DisableApplication ¶
func (a *WebAPI) DisableApplication(ctx context.Context, req *webservice.DisableApplicationRequest) (*webservice.DisableApplicationResponse, error)
func (*WebAPI) DisablePiped ¶
func (a *WebAPI) DisablePiped(ctx context.Context, req *webservice.DisablePipedRequest) (*webservice.DisablePipedResponse, error)
func (*WebAPI) DisableStaticAdmin ¶
func (a *WebAPI) DisableStaticAdmin(ctx context.Context, req *webservice.DisableStaticAdminRequest) (*webservice.DisableStaticAdminResponse, error)
DisableStaticAdmin disables static admin login.
func (*WebAPI) EnableApplication ¶
func (a *WebAPI) EnableApplication(ctx context.Context, req *webservice.EnableApplicationRequest) (*webservice.EnableApplicationResponse, error)
func (*WebAPI) EnablePiped ¶
func (a *WebAPI) EnablePiped(ctx context.Context, req *webservice.EnablePipedRequest) (*webservice.EnablePipedResponse, error)
func (*WebAPI) EnableStaticAdmin ¶
func (a *WebAPI) EnableStaticAdmin(ctx context.Context, req *webservice.EnableStaticAdminRequest) (*webservice.EnableStaticAdminResponse, error)
EnableStaticAdmin enables static admin login.
func (*WebAPI) GenerateAPIKey ¶
func (a *WebAPI) GenerateAPIKey(ctx context.Context, req *webservice.GenerateAPIKeyRequest) (*webservice.GenerateAPIKeyResponse, error)
func (*WebAPI) GenerateApplicationSealedSecret ¶
func (a *WebAPI) GenerateApplicationSealedSecret(ctx context.Context, req *webservice.GenerateApplicationSealedSecretRequest) (*webservice.GenerateApplicationSealedSecretResponse, error)
func (*WebAPI) GetApplication ¶
func (a *WebAPI) GetApplication(ctx context.Context, req *webservice.GetApplicationRequest) (*webservice.GetApplicationResponse, error)
func (*WebAPI) GetApplicationLiveState ¶
func (a *WebAPI) GetApplicationLiveState(ctx context.Context, req *webservice.GetApplicationLiveStateRequest) (*webservice.GetApplicationLiveStateResponse, error)
func (*WebAPI) GetCommand ¶
func (a *WebAPI) GetCommand(ctx context.Context, req *webservice.GetCommandRequest) (*webservice.GetCommandResponse, error)
func (*WebAPI) GetDeployment ¶
func (a *WebAPI) GetDeployment(ctx context.Context, req *webservice.GetDeploymentRequest) (*webservice.GetDeploymentResponse, error)
func (*WebAPI) GetDeploymentChain ¶
func (a *WebAPI) GetDeploymentChain(ctx context.Context, req *webservice.GetDeploymentChainRequest) (*webservice.GetDeploymentChainResponse, error)
func (*WebAPI) GetInsightApplicationCount ¶
func (a *WebAPI) GetInsightApplicationCount(ctx context.Context, req *webservice.GetInsightApplicationCountRequest) (*webservice.GetInsightApplicationCountResponse, error)
func (*WebAPI) GetInsightData ¶
func (a *WebAPI) GetInsightData(ctx context.Context, req *webservice.GetInsightDataRequest) (*webservice.GetInsightDataResponse, error)
GetInsightData returns the accumulated insight data.
func (*WebAPI) GetMe ¶
func (a *WebAPI) GetMe(ctx context.Context, req *webservice.GetMeRequest) (*webservice.GetMeResponse, error)
GetMe gets information about the current user.
func (*WebAPI) GetPiped ¶
func (a *WebAPI) GetPiped(ctx context.Context, req *webservice.GetPipedRequest) (*webservice.GetPipedResponse, error)
func (*WebAPI) GetProject ¶
func (a *WebAPI) GetProject(ctx context.Context, req *webservice.GetProjectRequest) (*webservice.GetProjectResponse, error)
GetProject gets the specified porject without sensitive data.
func (*WebAPI) GetStageLog ¶
func (a *WebAPI) GetStageLog(ctx context.Context, req *webservice.GetStageLogRequest) (*webservice.GetStageLogResponse, error)
func (*WebAPI) ListAPIKeys ¶
func (a *WebAPI) ListAPIKeys(ctx context.Context, req *webservice.ListAPIKeysRequest) (*webservice.ListAPIKeysResponse, error)
func (*WebAPI) ListApplications ¶
func (a *WebAPI) ListApplications(ctx context.Context, req *webservice.ListApplicationsRequest) (*webservice.ListApplicationsResponse, error)
func (*WebAPI) ListDeploymentChains ¶
func (a *WebAPI) ListDeploymentChains(ctx context.Context, req *webservice.ListDeploymentChainsRequest) (*webservice.ListDeploymentChainsResponse, error)
func (*WebAPI) ListDeployments ¶
func (a *WebAPI) ListDeployments(ctx context.Context, req *webservice.ListDeploymentsRequest) (*webservice.ListDeploymentsResponse, error)
func (*WebAPI) ListEvents ¶ added in v0.24.1
func (a *WebAPI) ListEvents(ctx context.Context, req *webservice.ListEventsRequest) (*webservice.ListEventsResponse, error)
func (*WebAPI) ListPipeds ¶
func (a *WebAPI) ListPipeds(ctx context.Context, req *webservice.ListPipedsRequest) (*webservice.ListPipedsResponse, error)
func (*WebAPI) ListReleasedVersions ¶ added in v0.33.0
func (a *WebAPI) ListReleasedVersions(ctx context.Context, req *webservice.ListReleasedVersionsRequest) (*webservice.ListReleasedVersionsResponse, error)
func (*WebAPI) ListUnregisteredApplications ¶
func (a *WebAPI) ListUnregisteredApplications(ctx context.Context, _ *webservice.ListUnregisteredApplicationsRequest) (*webservice.ListUnregisteredApplicationsResponse, error)
func (*WebAPI) RecreatePipedKey ¶
func (a *WebAPI) RecreatePipedKey(ctx context.Context, req *webservice.RecreatePipedKeyRequest) (*webservice.RecreatePipedKeyResponse, error)
func (*WebAPI) Register ¶
Register registers all handling of this service into the specified gRPC server.
func (*WebAPI) RegisterPiped ¶
func (a *WebAPI) RegisterPiped(ctx context.Context, req *webservice.RegisterPipedRequest) (*webservice.RegisterPipedResponse, error)
func (*WebAPI) RestartPiped ¶ added in v0.33.0
func (a *WebAPI) RestartPiped(ctx context.Context, req *webservice.RestartPipedRequest) (*webservice.RestartPipedResponse, error)
func (*WebAPI) SkipStage ¶ added in v0.27.4
func (a *WebAPI) SkipStage(ctx context.Context, req *webservice.SkipStageRequest) (*webservice.SkipStageResponse, error)
func (*WebAPI) SyncApplication ¶
func (a *WebAPI) SyncApplication(ctx context.Context, req *webservice.SyncApplicationRequest) (*webservice.SyncApplicationResponse, error)
func (*WebAPI) UpdateApplication ¶
func (a *WebAPI) UpdateApplication(ctx context.Context, req *webservice.UpdateApplicationRequest) (*webservice.UpdateApplicationResponse, error)
func (*WebAPI) UpdatePiped ¶
func (a *WebAPI) UpdatePiped(ctx context.Context, req *webservice.UpdatePipedRequest) (*webservice.UpdatePipedResponse, error)
func (*WebAPI) UpdatePipedDesiredVersion ¶
func (a *WebAPI) UpdatePipedDesiredVersion(ctx context.Context, req *webservice.UpdatePipedDesiredVersionRequest) (*webservice.UpdatePipedDesiredVersionResponse, error)
func (*WebAPI) UpdateProjectRBACConfig ¶
func (a *WebAPI) UpdateProjectRBACConfig(ctx context.Context, req *webservice.UpdateProjectRBACConfigRequest) (*webservice.UpdateProjectRBACConfigResponse, error)
UpdateProjectRBACConfig updates the sso settings.
func (*WebAPI) UpdateProjectRBACRole ¶ added in v0.28.0
func (a *WebAPI) UpdateProjectRBACRole(ctx context.Context, req *webservice.UpdateProjectRBACRoleRequest) (*webservice.UpdateProjectRBACRoleResponse, error)
func (*WebAPI) UpdateProjectSSOConfig ¶
func (a *WebAPI) UpdateProjectSSOConfig(ctx context.Context, req *webservice.UpdateProjectSSOConfigRequest) (*webservice.UpdateProjectSSOConfigResponse, error)
UpdateProjectSSOConfig updates the sso settings.
func (*WebAPI) UpdateProjectStaticAdmin ¶
func (a *WebAPI) UpdateProjectStaticAdmin(ctx context.Context, req *webservice.UpdateProjectStaticAdminRequest) (*webservice.UpdateProjectStaticAdminResponse, error)
UpdateProjectStaticAdmin updates the static admin user settings.