Documentation ¶
Index ¶
- type ClientPool
- type ClientPoolConfig
- type Router
- func (r *Router) ActivateSite(req ops.ActivateSiteRequest) error
- func (r *Router) CheckSiteStatus(ctx context.Context, key ops.SiteKey) error
- func (r *Router) CompleteFinalInstallStep(req ops.CompleteFinalInstallStepRequest) error
- func (r *Router) ConfigureNode(req ops.ConfigureNodeRequest) error
- func (r *Router) ConfigurePackages(req ops.ConfigurePackagesRequest) error
- func (r *Router) CreateAPIKey(ctx context.Context, req ops.NewAPIKeyRequest) (*storage.APIKey, error)
- func (r *Router) CreateAccount(req ops.NewAccountRequest) (*ops.Account, error)
- func (r *Router) CreateClusterGarbageCollectOperation(ctx context.Context, req ops.CreateClusterGarbageCollectOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateClusterReconfigureOperation(ctx context.Context, req ops.CreateClusterReconfigureOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateInstallToken(req ops.NewInstallTokenRequest) (*storage.InstallToken, error)
- func (r *Router) CreateLogEntry(key ops.SiteOperationKey, entry ops.LogEntry) error
- func (r *Router) CreateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
- func (r *Router) CreateOperationPlan(key ops.SiteOperationKey, plan storage.OperationPlan) error
- func (r *Router) CreateOperationPlanChange(key ops.SiteOperationKey, change storage.PlanChange) error
- func (r *Router) CreateProgressEntry(key ops.SiteOperationKey, entry ops.ProgressEntry) error
- func (r *Router) CreateProvisioningToken(token storage.ProvisioningToken) error
- func (r *Router) CreateSite(req ops.NewSiteRequest) (*ops.Site, error)
- func (r *Router) CreateSiteAppUpdateOperation(ctx context.Context, req ops.CreateSiteAppUpdateOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateSiteExpandOperation(ctx context.Context, req ops.CreateSiteExpandOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateSiteInstallOperation(ctx context.Context, req ops.CreateSiteInstallOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateSiteShrinkOperation(ctx context.Context, req ops.CreateSiteShrinkOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateSiteUninstallOperation(ctx context.Context, req ops.CreateSiteUninstallOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateUpdateConfigOperation(ctx context.Context, req ops.CreateUpdateConfigOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateUpdateEnvarsOperation(ctx context.Context, req ops.CreateUpdateEnvarsOperationRequest) (*ops.SiteOperationKey, error)
- func (r *Router) CreateUser(req ops.NewUserRequest) error
- func (r *Router) CreateUserInvite(ctx context.Context, req ops.CreateUserInviteRequest) (*storage.UserToken, error)
- func (r *Router) CreateUserReset(ctx context.Context, req ops.CreateUserResetRequest) (*storage.UserToken, error)
- func (r *Router) DeactivateSite(req ops.DeactivateSiteRequest) error
- func (r *Router) DeleteAPIKey(ctx context.Context, userEmail, token string) error
- func (r *Router) DeleteAlert(ctx context.Context, key ops.SiteKey, name string) error
- func (r *Router) DeleteAlertTarget(ctx context.Context, key ops.SiteKey) error
- func (r *Router) DeleteClusterCertificate(ctx context.Context, key ops.SiteKey) error
- func (r *Router) DeleteGithubConnector(ctx context.Context, key ops.SiteKey, name string) error
- func (r *Router) DeleteLocalUser(name string) error
- func (r *Router) DeleteLogForwarder(ctx context.Context, key ops.SiteKey, forwarderName string) error
- func (r *Router) DeleteSMTPConfig(ctx context.Context, key ops.SiteKey) error
- func (r *Router) DeleteSite(siteKey ops.SiteKey) error
- func (r *Router) DeleteSiteOperation(key ops.SiteOperationKey) error
- func (r *Router) DeleteUser(ctx context.Context, key ops.SiteKey, name string) error
- func (r *Router) DeleteUserInvite(ctx context.Context, req ops.DeleteUserInviteRequest) error
- func (r *Router) EmitAuditEvent(ctx context.Context, req ops.AuditEventRequest) error
- func (r *Router) GetAPIKeys(userEmail string) ([]storage.APIKey, error)
- func (r *Router) GetAccount(accountID string) (*ops.Account, error)
- func (r *Router) GetAccounts() ([]ops.Account, error)
- func (r *Router) GetAlertTargets(key ops.SiteKey) ([]storage.AlertTarget, error)
- func (r *Router) GetAlerts(key ops.SiteKey) ([]storage.Alert, error)
- func (r *Router) GetAppInstaller(req ops.AppInstallerRequest) (io.ReadCloser, error)
- func (r *Router) GetApplicationEndpoints(key ops.SiteKey) ([]ops.Endpoint, error)
- func (r *Router) GetAuthGateway(key ops.SiteKey) (storage.AuthGateway, error)
- func (r *Router) GetClusterAgent(req ops.ClusterAgentRequest) (*storage.LoginEntry, error)
- func (r *Router) GetClusterAuthPreference(key ops.SiteKey) (teleservices.AuthPreference, error)
- func (r *Router) GetClusterCertificate(key ops.SiteKey, withSecrets bool) (*ops.ClusterCertificate, error)
- func (r *Router) GetClusterConfiguration(key ops.SiteKey) (clusterconfig.Interface, error)
- func (r *Router) GetClusterEnvironmentVariables(key ops.SiteKey) (storage.EnvironmentVariables, error)
- func (r *Router) GetClusterMetrics(ctx context.Context, req ops.ClusterMetricsRequest) (*ops.ClusterMetricsResponse, error)
- func (r *Router) GetClusterNodes(key ops.SiteKey) ([]ops.Node, error)
- func (r *Router) GetCurrentUser() (storage.User, error)
- func (r *Router) GetCurrentUserInfo() (*ops.UserInfo, error)
- func (r *Router) GetExpandToken(key ops.SiteKey) (*storage.ProvisioningToken, error)
- func (r *Router) GetGithubConnector(key ops.SiteKey, name string, withSecrets bool) (teleservices.GithubConnector, error)
- func (r *Router) GetGithubConnectors(key ops.SiteKey, withSecrets bool) ([]teleservices.GithubConnector, error)
- func (r *Router) GetLocalOperator() ops.Operator
- func (r *Router) GetLocalSite(ctx context.Context) (*ops.Site, error)
- func (r *Router) GetLocalUser(key ops.SiteKey) (storage.User, error)
- func (r *Router) GetLogForwarders(key ops.SiteKey) ([]storage.LogForwarder, error)
- func (r *Router) GetOperationPlan(key ops.SiteOperationKey) (*storage.OperationPlan, error)
- func (r *Router) GetPersistentStorage(ctx context.Context, key ops.SiteKey) (storage.PersistentStorage, error)
- func (r *Router) GetSMTPConfig(key ops.SiteKey) (storage.SMTPConfig, error)
- func (r *Router) GetSite(siteKey ops.SiteKey) (*ops.Site, error)
- func (r *Router) GetSiteByDomain(domainName string) (*ops.Site, error)
- func (r *Router) GetSiteExpandOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
- func (r *Router) GetSiteInstallOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
- func (r *Router) GetSiteInstructions(tokenID string, serverProfile string, params url.Values) (string, error)
- func (r *Router) GetSiteOperation(key ops.SiteOperationKey) (*ops.SiteOperation, error)
- func (r *Router) GetSiteOperationLogs(key ops.SiteOperationKey) (io.ReadCloser, error)
- func (r *Router) GetSiteOperationProgress(key ops.SiteOperationKey) (*ops.ProgressEntry, error)
- func (r *Router) GetSiteOperations(key ops.SiteKey, f ops.OperationsFilter) (ops.SiteOperations, error)
- func (r *Router) GetSiteReport(ctx context.Context, req ops.GetClusterReportRequest) (io.ReadCloser, error)
- func (r *Router) GetSites(accountID string) ([]ops.Site, error)
- func (r *Router) GetTrustedClusterToken(key ops.SiteKey) (storage.Token, error)
- func (r *Router) GetUser(key ops.SiteKey, name string) (teleservices.User, error)
- func (r *Router) GetUserInvites(ctx context.Context, key ops.SiteKey) ([]storage.UserInvite, error)
- func (r *Router) GetUsers(key ops.SiteKey) ([]teleservices.User, error)
- func (r *Router) GetVersion(ctx context.Context) (*proto.Version, error)
- func (r *Router) ListReleases(req ops.ListReleasesRequest) ([]storage.Release, error)
- func (r *Router) PickClient(siteName string) (ops.Operator, error)
- func (r *Router) PickOperationClient(siteName string) (ops.Operator, error)
- func (r *Router) RemoteClient(siteName string) (ops.Operator, error)
- func (r *Router) ResetUserPassword(req ops.ResetUserPasswordRequest) (string, error)
- func (r *Router) ResumeShrink(key ops.SiteKey) (*ops.SiteOperationKey, error)
- func (r *Router) RotatePlanetConfig(req ops.RotatePlanetConfigRequest) (*ops.RotatePackageResponse, error)
- func (r *Router) RotateSecrets(req ops.RotateSecretsRequest) (*ops.RotatePackageResponse, error)
- func (r *Router) RotateTeleportConfig(req ops.RotateTeleportConfigRequest) (*ops.RotatePackageResponse, *ops.RotatePackageResponse, error)
- func (r *Router) SetOperationState(ctx context.Context, key ops.SiteOperationKey, ...) error
- func (r *Router) SignSSHKey(req ops.SSHSignRequest) (*ops.SSHSignResponse, error)
- func (r *Router) SignTLSKey(req ops.TLSSignRequest) (*ops.TLSSignResponse, error)
- func (r *Router) SiteExpandOperationStart(key ops.SiteOperationKey) error
- func (r *Router) SiteInstallOperationStart(key ops.SiteOperationKey) error
- func (r *Router) StepDown(key ops.SiteKey) error
- func (r *Router) StreamOperationLogs(key ops.SiteOperationKey, reader io.Reader) error
- func (r *Router) UpdateAlert(ctx context.Context, key ops.SiteKey, alert storage.Alert) error
- func (r *Router) UpdateAlertTarget(ctx context.Context, key ops.SiteKey, target storage.AlertTarget) error
- func (r *Router) UpdateClusterCertificate(ctx context.Context, req ops.UpdateCertificateRequest) (*ops.ClusterCertificate, error)
- func (r *Router) UpdateClusterConfiguration(req ops.UpdateClusterConfigRequest) error
- func (r *Router) UpdateClusterEnvironmentVariables(req ops.UpdateClusterEnvironRequest) error
- func (r *Router) UpdateExpandOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error
- func (r *Router) UpdateInstallOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) (err error)
- func (r *Router) UpdateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
- func (r *Router) UpdatePersistentStorage(ctx context.Context, req ops.UpdatePersistentStorageRequest) error
- func (r *Router) UpdateSMTPConfig(ctx context.Context, key ops.SiteKey, config storage.SMTPConfig) error
- func (r *Router) UpdateUser(ctx context.Context, req ops.UpdateUserRequest) error
- func (r *Router) UpsertAuthGateway(ctx context.Context, key ops.SiteKey, gw storage.AuthGateway) error
- func (r *Router) UpsertClusterAuthPreference(ctx context.Context, key ops.SiteKey, auth teleservices.AuthPreference) error
- func (r *Router) UpsertGithubConnector(ctx context.Context, key ops.SiteKey, connector teleservices.GithubConnector) error
- func (r *Router) UpsertUser(ctx context.Context, key ops.SiteKey, user teleservices.User) error
- func (r *Router) ValidateDomainName(domainName string) error
- func (r *Router) ValidateRemoteAccess(req ops.ValidateRemoteAccessRequest) (*ops.ValidateRemoteAccessResponse, error)
- func (r *Router) ValidateServers(ctx context.Context, req ops.ValidateServersRequest) (*ops.ValidateServersResponse, error)
- func (r *Router) WizardClient(clusterName string) (ops.Operator, error)
- type RouterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientPool ¶
type ClientPool struct { ClientPoolConfig sync.Mutex // contains filtered or unexported fields }
ClientPool helps to manage connections and clients to remote ops centers
func NewClientPool ¶
func NewClientPool(config ClientPoolConfig) *ClientPool
func (*ClientPool) GetService ¶
func (p *ClientPool) GetService(link storage.OpsCenterLink) (ops.Operator, error)
type ClientPoolConfig ¶
type Router ¶
type Router struct {
RouterConfig
}
Router routes requests either to a local ops center or remote link based on the site status it is used in ops center mode to make sure we are using local gravity site state when possible
func NewRouter ¶
func NewRouter(conf RouterConfig) (*Router, error)
NewRouter returns new router instance
func (*Router) ActivateSite ¶
func (r *Router) ActivateSite(req ops.ActivateSiteRequest) error
func (*Router) CheckSiteStatus ¶
CheckSiteStatus runs app status hook and updates site status appropriately
func (*Router) CompleteFinalInstallStep ¶
func (r *Router) CompleteFinalInstallStep(req ops.CompleteFinalInstallStepRequest) error
func (*Router) ConfigureNode ¶
func (r *Router) ConfigureNode(req ops.ConfigureNodeRequest) error
ConfigureNode prepares the node for the upgrade, for example updates necessary directories permissions and creates missing ones
func (*Router) ConfigurePackages ¶
func (r *Router) ConfigurePackages(req ops.ConfigurePackagesRequest) error
ConfigurePackages packages configures packages for the specified install operation
func (*Router) CreateAPIKey ¶
func (*Router) CreateAccount ¶
func (*Router) CreateClusterGarbageCollectOperation ¶
func (r *Router) CreateClusterGarbageCollectOperation(ctx context.Context, req ops.CreateClusterGarbageCollectOperationRequest) (*ops.SiteOperationKey, error)
CreateClusterGarbageCollectOperation creates a new garbage collection operation in the cluster
func (*Router) CreateClusterReconfigureOperation ¶
func (r *Router) CreateClusterReconfigureOperation(ctx context.Context, req ops.CreateClusterReconfigureOperationRequest) (*ops.SiteOperationKey, error)
CreateClusterReconfigureOperation creates a new cluster reconfiguration operation.
func (*Router) CreateInstallToken ¶
func (r *Router) CreateInstallToken(req ops.NewInstallTokenRequest) (*storage.InstallToken, error)
func (*Router) CreateLogEntry ¶
func (*Router) CreateLogForwarder ¶
func (r *Router) CreateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
CreateLogForwarder creates a new log forwarder
func (*Router) CreateOperationPlan ¶
func (r *Router) CreateOperationPlan(key ops.SiteOperationKey, plan storage.OperationPlan) error
CreateOperationPlan saves the provided operation plan
func (*Router) CreateOperationPlanChange ¶
func (r *Router) CreateOperationPlanChange(key ops.SiteOperationKey, change storage.PlanChange) error
CreateOperationPlanChange creates a new changelog entry for a plan
func (*Router) CreateProgressEntry ¶
func (r *Router) CreateProgressEntry(key ops.SiteOperationKey, entry ops.ProgressEntry) error
func (*Router) CreateProvisioningToken ¶
func (r *Router) CreateProvisioningToken(token storage.ProvisioningToken) error
func (*Router) CreateSite ¶
func (*Router) CreateSiteAppUpdateOperation ¶
func (r *Router) CreateSiteAppUpdateOperation(ctx context.Context, req ops.CreateSiteAppUpdateOperationRequest) (*ops.SiteOperationKey, error)
func (*Router) CreateSiteExpandOperation ¶
func (r *Router) CreateSiteExpandOperation(ctx context.Context, req ops.CreateSiteExpandOperationRequest) (*ops.SiteOperationKey, error)
func (*Router) CreateSiteInstallOperation ¶
func (r *Router) CreateSiteInstallOperation(ctx context.Context, req ops.CreateSiteInstallOperationRequest) (*ops.SiteOperationKey, error)
func (*Router) CreateSiteShrinkOperation ¶
func (r *Router) CreateSiteShrinkOperation(ctx context.Context, req ops.CreateSiteShrinkOperationRequest) (*ops.SiteOperationKey, error)
func (*Router) CreateSiteUninstallOperation ¶
func (r *Router) CreateSiteUninstallOperation(ctx context.Context, req ops.CreateSiteUninstallOperationRequest) (*ops.SiteOperationKey, error)
func (*Router) CreateUpdateConfigOperation ¶
func (r *Router) CreateUpdateConfigOperation(ctx context.Context, req ops.CreateUpdateConfigOperationRequest) (*ops.SiteOperationKey, error)
CreateUpdateConfigOperation creates a new operation to update cluster configuration
func (*Router) CreateUpdateEnvarsOperation ¶
func (r *Router) CreateUpdateEnvarsOperation(ctx context.Context, req ops.CreateUpdateEnvarsOperationRequest) (*ops.SiteOperationKey, error)
CreateUpdateEnvarsOperation creates a new operation to update cluster runtime environment variables
func (*Router) CreateUser ¶
func (r *Router) CreateUser(req ops.NewUserRequest) error
func (*Router) CreateUserInvite ¶
func (r *Router) CreateUserInvite(ctx context.Context, req ops.CreateUserInviteRequest) (*storage.UserToken, error)
CreateUserInvite creates a new invite token for a user.
func (*Router) CreateUserReset ¶
func (r *Router) CreateUserReset(ctx context.Context, req ops.CreateUserResetRequest) (*storage.UserToken, error)
CreateUserReset creates a new reset token for a user.
func (*Router) DeactivateSite ¶
func (r *Router) DeactivateSite(req ops.DeactivateSiteRequest) error
func (*Router) DeleteAPIKey ¶
func (*Router) DeleteAlert ¶
DeleteAlert deletes the monitoring alert specified with name
func (*Router) DeleteAlertTarget ¶
DeleteAlertTarget deletes the cluster monitoring alert target
func (*Router) DeleteClusterCertificate ¶
DeleteClusterCertificate deletes the cluster certificate
func (*Router) DeleteGithubConnector ¶
DeleteGithubConnector deletes a Github connector by name
func (*Router) DeleteLocalUser ¶
func (*Router) DeleteLogForwarder ¶
func (r *Router) DeleteLogForwarder(ctx context.Context, key ops.SiteKey, forwarderName string) error
DeleteLogForwarder deletes a log forwarder
func (*Router) DeleteSMTPConfig ¶
DeleteSMTPConfig deletes the cluster SMTP configuration
func (*Router) DeleteSiteOperation ¶
func (r *Router) DeleteSiteOperation(key ops.SiteOperationKey) error
func (*Router) DeleteUser ¶
DeleteUser deletes a user by name
func (*Router) DeleteUserInvite ¶
DeleteUserInvite deletes the specified user invite.
func (*Router) EmitAuditEvent ¶
EmitAuditEvent saves the provided event in the audit log.
func (*Router) GetAlertTargets ¶
GetAlertTargets returns a list of monitoring alert targets
func (*Router) GetAppInstaller ¶
func (r *Router) GetAppInstaller(req ops.AppInstallerRequest) (io.ReadCloser, error)
func (*Router) GetApplicationEndpoints ¶
func (*Router) GetAuthGateway ¶
GetAuthGateway returns auth gateway configuration.
func (*Router) GetClusterAgent ¶
func (r *Router) GetClusterAgent(req ops.ClusterAgentRequest) (*storage.LoginEntry, error)
func (*Router) GetClusterAuthPreference ¶
func (r *Router) GetClusterAuthPreference(key ops.SiteKey) (teleservices.AuthPreference, error)
GetClusterAuthPreference returns cluster authentication preference
func (*Router) GetClusterCertificate ¶
func (r *Router) GetClusterCertificate(key ops.SiteKey, withSecrets bool) (*ops.ClusterCertificate, error)
GetClusterCertificate returns the cluster certificate
func (*Router) GetClusterConfiguration ¶
GetClusterConfiguration retrieves the cluster configuration
func (*Router) GetClusterEnvironmentVariables ¶
func (r *Router) GetClusterEnvironmentVariables(key ops.SiteKey) (storage.EnvironmentVariables, error)
GetClusterEnvironmentVariables retrieves the cluster runtime environment variables
func (*Router) GetClusterMetrics ¶
func (r *Router) GetClusterMetrics(ctx context.Context, req ops.ClusterMetricsRequest) (*ops.ClusterMetricsResponse, error)
GetClusterMetrics returns basic CPU/RAM metrics for the specified cluster.
func (*Router) GetClusterNodes ¶
GetClusterNodes returns a real-time information about cluster nodes
func (*Router) GetExpandToken ¶
func (*Router) GetGithubConnector ¶
func (r *Router) GetGithubConnector(key ops.SiteKey, name string, withSecrets bool) (teleservices.GithubConnector, error)
GetGithubConnector returns a Github connector by name
Returned connector exclude client secret unless withSecrets is true.
func (*Router) GetGithubConnectors ¶
func (r *Router) GetGithubConnectors(key ops.SiteKey, withSecrets bool) ([]teleservices.GithubConnector, error)
GetGithubConnectors returns all Github connectors
Returned connectors exclude client secret unless withSecrets is true.
func (*Router) GetLocalOperator ¶
func (*Router) GetLogForwarders ¶
GetLogForwarders returns a list of configured log forwarders
func (*Router) GetOperationPlan ¶
func (r *Router) GetOperationPlan(key ops.SiteOperationKey) (*storage.OperationPlan, error)
GetOperationPlan returns plan for the specified operation
func (*Router) GetPersistentStorage ¶
func (r *Router) GetPersistentStorage(ctx context.Context, key ops.SiteKey) (storage.PersistentStorage, error)
GetPersistentStorage retrieves cluster persistent storage configuration.
func (*Router) GetSMTPConfig ¶
GetSMTPConfig returns the cluster SMTP configuration
func (*Router) GetSiteByDomain ¶
func (*Router) GetSiteExpandOperationAgentReport ¶
func (r *Router) GetSiteExpandOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
func (*Router) GetSiteInstallOperationAgentReport ¶
func (r *Router) GetSiteInstallOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
func (*Router) GetSiteInstructions ¶
func (*Router) GetSiteOperation ¶
func (r *Router) GetSiteOperation(key ops.SiteOperationKey) (*ops.SiteOperation, error)
func (*Router) GetSiteOperationLogs ¶
func (r *Router) GetSiteOperationLogs(key ops.SiteOperationKey) (io.ReadCloser, error)
func (*Router) GetSiteOperationProgress ¶
func (r *Router) GetSiteOperationProgress(key ops.SiteOperationKey) (*ops.ProgressEntry, error)
func (*Router) GetSiteOperations ¶
func (r *Router) GetSiteOperations(key ops.SiteKey, f ops.OperationsFilter) (ops.SiteOperations, error)
func (*Router) GetSiteReport ¶
func (r *Router) GetSiteReport(ctx context.Context, req ops.GetClusterReportRequest) (io.ReadCloser, error)
func (*Router) GetTrustedClusterToken ¶
func (*Router) GetUserInvites ¶
GetUserInvites returns all active user invites.
func (*Router) GetVersion ¶
GetVersion returns the gravity binary version information.
func (*Router) ListReleases ¶
ListReleases returns all currently installed application releases in a cluster.
func (*Router) PickClient ¶
PickClient picks active client based on its state - if the site is installed, it picks remote tunnel HTTP client, otherwise it picks local ops center service
func (*Router) PickOperationClient ¶
PickOperationClient selects an appropriate operator service to perform a site operation
func (*Router) ResetUserPassword ¶
func (r *Router) ResetUserPassword(req ops.ResetUserPasswordRequest) (string, error)
func (*Router) ResumeShrink ¶
func (*Router) RotatePlanetConfig ¶
func (r *Router) RotatePlanetConfig(req ops.RotatePlanetConfigRequest) (*ops.RotatePackageResponse, error)
RotatePlanetConfig rotates planet configuration package for the server specified in the request
func (*Router) RotateSecrets ¶
func (r *Router) RotateSecrets(req ops.RotateSecretsRequest) (*ops.RotatePackageResponse, error)
RotateSecrets rotates secrets package for the server specified in the request
func (*Router) RotateTeleportConfig ¶
func (r *Router) RotateTeleportConfig(req ops.RotateTeleportConfigRequest) (*ops.RotatePackageResponse, *ops.RotatePackageResponse, error)
RotateTeleportConfig generates teleport configuration for the server specified in the provided request
func (*Router) SetOperationState ¶
func (r *Router) SetOperationState(ctx context.Context, key ops.SiteOperationKey, req ops.SetOperationStateRequest) error
func (*Router) SignSSHKey ¶
func (r *Router) SignSSHKey(req ops.SSHSignRequest) (*ops.SSHSignResponse, error)
SignSSHKey signs SSH Public Key with SSH user certificate authority of this site
func (*Router) SignTLSKey ¶
func (r *Router) SignTLSKey(req ops.TLSSignRequest) (*ops.TLSSignResponse, error)
SignTLSKey signs X509 Public Key with X509 certificate authority of this site
func (*Router) SiteExpandOperationStart ¶
func (r *Router) SiteExpandOperationStart(key ops.SiteOperationKey) error
func (*Router) SiteInstallOperationStart ¶
func (r *Router) SiteInstallOperationStart(key ops.SiteOperationKey) error
func (*Router) StepDown ¶
StepDown asks the process to pause its leader election heartbeat so it can give up its leadership
func (*Router) StreamOperationLogs ¶
StreamOperationLogs appends the logs from the provided reader to the specified operation (user-facing) log file
func (*Router) UpdateAlert ¶
UpdateAlert updates the specified monitoring alert
func (*Router) UpdateAlertTarget ¶
func (r *Router) UpdateAlertTarget(ctx context.Context, key ops.SiteKey, target storage.AlertTarget) error
UpdateAlertTarget updates the cluster monitoring alert target
func (*Router) UpdateClusterCertificate ¶
func (r *Router) UpdateClusterCertificate(ctx context.Context, req ops.UpdateCertificateRequest) (*ops.ClusterCertificate, error)
UpdateClusterCertificate updates the cluster certificate
func (*Router) UpdateClusterConfiguration ¶
func (r *Router) UpdateClusterConfiguration(req ops.UpdateClusterConfigRequest) error
UpdateClusterConfiguration updates the cluster configuration from the specified request
func (*Router) UpdateClusterEnvironmentVariables ¶
func (r *Router) UpdateClusterEnvironmentVariables(req ops.UpdateClusterEnvironRequest) error
UpdateClusterEnvironmentVariables updates the cluster runtime environment variables from the specified request
func (*Router) UpdateExpandOperationState ¶
func (r *Router) UpdateExpandOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error
func (*Router) UpdateInstallOperationState ¶
func (r *Router) UpdateInstallOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) (err error)
func (*Router) UpdateLogForwarder ¶
func (r *Router) UpdateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
UpdateLogForwarder updates an existing log forwarder
func (*Router) UpdatePersistentStorage ¶
func (r *Router) UpdatePersistentStorage(ctx context.Context, req ops.UpdatePersistentStorageRequest) error
UpdatePersistentStorage updates persistent storage configuration.
func (*Router) UpdateSMTPConfig ¶
func (r *Router) UpdateSMTPConfig(ctx context.Context, key ops.SiteKey, config storage.SMTPConfig) error
UpdateSMTPConfig updates the cluster SMTP configuration
func (*Router) UpdateUser ¶
UpdateUser updates the specified user information.
func (*Router) UpsertAuthGateway ¶
func (r *Router) UpsertAuthGateway(ctx context.Context, key ops.SiteKey, gw storage.AuthGateway) error
UpsertAuthGateway updates auth gateway configuration.
func (*Router) UpsertClusterAuthPreference ¶
func (r *Router) UpsertClusterAuthPreference(ctx context.Context, key ops.SiteKey, auth teleservices.AuthPreference) error
UpsertClusterAuthPreference updates cluster authentication preference
func (*Router) UpsertGithubConnector ¶
func (r *Router) UpsertGithubConnector(ctx context.Context, key ops.SiteKey, connector teleservices.GithubConnector) error
UpsertGithubConnector creates or updates a Github connector
func (*Router) UpsertUser ¶
UpsertUser creates or updates a user
func (*Router) ValidateDomainName ¶
func (*Router) ValidateRemoteAccess ¶
func (r *Router) ValidateRemoteAccess(req ops.ValidateRemoteAccessRequest) (*ops.ValidateRemoteAccessResponse, error)
func (*Router) ValidateServers ¶
func (r *Router) ValidateServers(ctx context.Context, req ops.ValidateServersRequest) (*ops.ValidateServersResponse, error)
ValidateServers runs pre-installation checks
type RouterConfig ¶
type RouterConfig struct { // Backend is a storage backend Backend storage.Backend // Local is local ops service Local *opsservice.Operator // Wizard is true if this is an install wizard process Wizard bool // Clients provides access to clients for remote clusters such as operator or apps Clients *clients.ClusterClients }
RouterConfig specifies config parameters for Router