router

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// Router is the wrapped open-source router
	*ossrouter.Router
	// Local is the local cluster operator service
	Local *service.Operator
}

Router extends the open-source operator router

func New

func New(ossRouter *ossrouter.Router, local *service.Operator) *Router

New returns a new enterprise operator router

func (*Router) AcceptRemoteCluster

AcceptRemoteCluster defines the handshake between a remote cluster and this Ops Center

func (*Router) CheckForUpdate

func (r *Router) CheckForUpdate(key ossops.SiteKey) (*loc.Locator, error)

CheckForUpdate checks with remote OpsCenter if there is a newer version of the installed application

func (*Router) CheckSiteLicense

func (r *Router) CheckSiteLicense(ctx context.Context, key ossops.SiteKey) error

CheckSiteLicense makes sure the license installed on cluster is correct

func (*Router) DeleteOIDCConnector

func (r *Router) DeleteOIDCConnector(ctx context.Context, key ossops.SiteKey, name string) error

DeleteOIDCConnector deletes an OIDC connector by name

func (*Router) DeleteRole

func (r *Router) DeleteRole(ctx context.Context, key ossops.SiteKey, name string) error

DeleteRole deletes a role by name

func (*Router) DeleteSAMLConnector

func (r *Router) DeleteSAMLConnector(ctx context.Context, key ossops.SiteKey, name string) error

DeleteSAMLConnector deletes a SAML connector by name

func (*Router) DeleteTrustedCluster

func (r *Router) DeleteTrustedCluster(ctx context.Context, req ops.DeleteTrustedClusterRequest) error

DeleteTrustedCluster deletes a trusted cluster by name

func (*Router) DisablePeriodicUpdates

func (r *Router) DisablePeriodicUpdates(ctx context.Context, key ossops.SiteKey) error

DisablePeriodicUpdates turns periodic updates for the cluster off and stops the update fetch loop if it's running

func (*Router) DownloadUpdate

func (r *Router) DownloadUpdate(ctx context.Context, req ops.DownloadUpdateRequest) error

DownloadUpdate downloads the provided application version from remote Ops Center

func (*Router) EnablePeriodicUpdates

func (r *Router) EnablePeriodicUpdates(ctx context.Context, req ops.EnablePeriodicUpdatesRequest) error

EnablePeriodicUpdates turns periodic updates for the cluster on or updates the interval

func (*Router) GetClusterEndpoints

func (r *Router) GetClusterEndpoints(key ossops.SiteKey) (storage.Endpoints, error)

GetClusterEndpoints returns the cluster management endpoints such as control panel advertise address and agents advertise address

func (*Router) GetLicenseCA

func (r *Router) GetLicenseCA() ([]byte, error)

GetLicenseCA returns CA certificate Ops Center uses to sign licenses

func (*Router) GetOIDCConnector

func (r *Router) GetOIDCConnector(key ossops.SiteKey, name string, withSecrets bool) (teleservices.OIDCConnector, error)

GetOIDCConnector returns an OIDC connector by name

Returned connector exclude client secret unless withSecrets is true.

func (*Router) GetOIDCConnectors

func (r *Router) GetOIDCConnectors(key ossops.SiteKey, withSecrets bool) ([]teleservices.OIDCConnector, error)

GetOIDCConnectors returns all OIDC connectors

Returned connectors exclude client secret unless withSecrets is true.

func (*Router) GetRole

func (r *Router) GetRole(key ossops.SiteKey, name string) (teleservices.Role, error)

GetRole returns a role by name

func (*Router) GetRoles

func (r *Router) GetRoles(key ossops.SiteKey) ([]teleservices.Role, error)

GetRoles returns all roles

func (*Router) GetSAMLConnector

func (r *Router) GetSAMLConnector(key ossops.SiteKey, name string, withSecrets bool) (teleservices.SAMLConnector, error)

GetSAMLConnector returns a SAML connector by name

Returned connector excludes private signing key unless withSecrets is true.

func (*Router) GetSAMLConnectors

func (r *Router) GetSAMLConnectors(key ossops.SiteKey, withSecrets bool) ([]teleservices.SAMLConnector, error)

GetSAMLConnectors returns all SAML connectors

Returned connectors exclude private signing keys unless withSecrets is true.

func (*Router) GetTrustedCluster

func (r *Router) GetTrustedCluster(key ossops.SiteKey, name string) (storage.TrustedCluster, error)

GetTrustedCluster returns trusted cluster by name

func (*Router) GetTrustedClusters

func (r *Router) GetTrustedClusters(key ossops.SiteKey) ([]storage.TrustedCluster, error)

GetTrustedClusters returns a list of configured trusted clusters

func (*Router) NewLicense

func (r *Router) NewLicense(ctx context.Context, req ops.NewLicenseRequest) (string, error)

NewLicense generates a new license signed with this Ops Center CA

func (*Router) PeriodicUpdatesStatus

func (r *Router) PeriodicUpdatesStatus(key ossops.SiteKey) (*ops.PeriodicUpdatesStatusResponse, error)

PeriodicUpdatesStatus returns the status of periodic updates for the cluster

func (*Router) RegisterAgent

func (r *Router) RegisterAgent(req ops.RegisterAgentRequest) (*ops.RegisterAgentResponse, error)

RegisterAgent registers an install agent

func (*Router) RemoveRemoteCluster

func (r *Router) RemoveRemoteCluster(req ops.RemoveRemoteClusterRequest) error

RemoveRemoteCluster removes the cluster entry specified in the request

func (*Router) RequestClusterCopy

func (r *Router) RequestClusterCopy(req ops.ClusterCopyRequest) error

RequestClusterCopy replicates the cluster specified in the provided request and its data from the remote Ops Center

func (*Router) StartPeriodicUpdates

func (r *Router) StartPeriodicUpdates(key ossops.SiteKey) error

StartPeriodicUpdates starts periodic updates check

func (*Router) StopPeriodicUpdates

func (r *Router) StopPeriodicUpdates(key ossops.SiteKey) error

StopPeriodicUpdates stops periodic updates check without disabling it

func (*Router) UpdateClusterEndpoints

func (r *Router) UpdateClusterEndpoints(ctx context.Context, key ossops.SiteKey, endpoints storage.Endpoints) error

UpdateClusterEndpoints updates the cluster management endpoints

func (*Router) UpdateLicense

func (r *Router) UpdateLicense(ctx context.Context, req ops.UpdateLicenseRequest) error

UpdateLicense updates license installed on cluster and runs a respective app hook

func (*Router) UpsertOIDCConnector

func (r *Router) UpsertOIDCConnector(ctx context.Context, key ossops.SiteKey, connector teleservices.OIDCConnector) error

UpsertOIDCConnector creates or updates an OIDC connector

func (*Router) UpsertRole

func (r *Router) UpsertRole(ctx context.Context, key ossops.SiteKey, role teleservices.Role) error

UpsertRole creates a new role

func (*Router) UpsertSAMLConnector

func (r *Router) UpsertSAMLConnector(ctx context.Context, key ossops.SiteKey, connector teleservices.SAMLConnector) error

UpsertSAMLConnector creates or updates a SAML connector

func (*Router) UpsertTrustedCluster

func (r *Router) UpsertTrustedCluster(ctx context.Context, key ossops.SiteKey, cluster storage.TrustedCluster) error

UpsertTrustedCluster creates or updates a trusted cluster

Jump to

Keyboard shortcuts

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