server

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Overview

Package server contains the API server implementation.

Package server contains the API server implementation.

Package server contains the API server implementation.

Package server contains the API server implementation.

Package server contains the API server implementation.

Package server contains the API server implementation.

Package server contains the API server implementation.

Package server contains the API server implementation.

Package server ...

Package server contains the API engine features implementation.

Index

Constants

View Source
const (
	CSPSelf           = "'self'"
	CSPNone           = "'none'"
	PermissionsPolicy = "" /* 486-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EverestServer

type EverestServer struct {
	// contains filtered or unexported fields
}

EverestServer represents the server struct.

func NewEverestServer

func NewEverestServer(ctx context.Context, c *config.EverestConfig, l *zap.SugaredLogger) (*EverestServer, error)

NewEverestServer creates and configures everest API.

func (*EverestServer) ApproveUpgradePlan

func (e *EverestServer) ApproveUpgradePlan(ctx echo.Context, namespace string) error

ApproveUpgradePlan starts the upgrade of operators in the provided namespace.

func (*EverestServer) CreateBackupStorage

func (e *EverestServer) CreateBackupStorage(c echo.Context, namespace string) error

CreateBackupStorage creates a new backup storage object.

func (*EverestServer) CreateDatabaseCluster

func (e *EverestServer) CreateDatabaseCluster(c echo.Context, namespace string) error

CreateDatabaseCluster creates a new db cluster inside the given k8s cluster.

func (*EverestServer) CreateDatabaseClusterBackup

func (e *EverestServer) CreateDatabaseClusterBackup(ctx echo.Context, namespace string) error

CreateDatabaseClusterBackup creates a database cluster backup on the specified kubernetes cluster.

func (*EverestServer) CreateDatabaseClusterRestore

func (e *EverestServer) CreateDatabaseClusterRestore(ctx echo.Context, namespace string) error

CreateDatabaseClusterRestore Create a database cluster restore on the specified kubernetes cluster.

func (*EverestServer) CreateDatabaseClusterSecret added in v1.8.0

func (e *EverestServer) CreateDatabaseClusterSecret(
	c echo.Context,
	namespace,
	dbName string,
	params api.CreateDatabaseClusterSecretParams,
) error

CreateDatabaseClusterSecret creates a secret for the specified database cluster.

func (*EverestServer) CreateLoadBalancerConfig added in v1.9.0

func (e *EverestServer) CreateLoadBalancerConfig(c echo.Context) error

CreateLoadBalancerConfig creates a new load balancer config.

func (*EverestServer) CreateMonitoringInstance

func (e *EverestServer) CreateMonitoringInstance(ctx echo.Context, namespace string) error

CreateMonitoringInstance creates a new monitoring instance.

func (*EverestServer) CreatePodSchedulingPolicy added in v1.7.0

func (e *EverestServer) CreatePodSchedulingPolicy(c echo.Context) error

CreatePodSchedulingPolicy creates a new pod scheduling policy.

func (*EverestServer) CreateSession

func (e *EverestServer) CreateSession(ctx echo.Context) error

CreateSession creates a new session.

func (*EverestServer) CreateSplitHorizonDNSConfig added in v1.10.0

func (e *EverestServer) CreateSplitHorizonDNSConfig(ctx echo.Context, namespace string) error

CreateSplitHorizonDNSConfig handles the creation of a SplitHorizonDNSConfig resource.

func (*EverestServer) DeleteBackupStorage

func (e *EverestServer) DeleteBackupStorage(c echo.Context, namespace, name string) error

DeleteBackupStorage deletes the specified backup storage.

func (*EverestServer) DeleteDatabaseCluster

func (e *EverestServer) DeleteDatabaseCluster(
	c echo.Context,
	namespace, name string,
	params api.DeleteDatabaseClusterParams,
) error

DeleteDatabaseCluster deletes a database cluster on the specified kubernetes cluster.

func (*EverestServer) DeleteDatabaseClusterBackup

func (e *EverestServer) DeleteDatabaseClusterBackup(
	ctx echo.Context,
	namespace, name string,
	params api.DeleteDatabaseClusterBackupParams,
) error

DeleteDatabaseClusterBackup deletes the specified cluster backup on the specified kubernetes cluster.

func (*EverestServer) DeleteDatabaseClusterRestore

func (e *EverestServer) DeleteDatabaseClusterRestore(ctx echo.Context, namespace, name string) error

DeleteDatabaseClusterRestore Delete the specified cluster restore on the specified kubernetes cluster.

func (*EverestServer) DeleteLoadBalancerConfig added in v1.9.0

func (e *EverestServer) DeleteLoadBalancerConfig(c echo.Context, configName string) error

DeleteLoadBalancerConfig deletes a load balancer confi.

func (*EverestServer) DeleteMonitoringInstance

func (e *EverestServer) DeleteMonitoringInstance(ctx echo.Context, namespace, name string) error

DeleteMonitoringInstance deletes a monitoring instance.

func (*EverestServer) DeletePodSchedulingPolicy added in v1.7.0

func (e *EverestServer) DeletePodSchedulingPolicy(c echo.Context, policyName string) error

DeletePodSchedulingPolicy deletes a pod scheduling policy.

func (*EverestServer) DeleteSession added in v1.7.0

func (e *EverestServer) DeleteSession(ctx echo.Context) error

DeleteSession invalidates the user token by adding it to the blocklist

func (*EverestServer) DeleteSplitHorizonDNSConfig added in v1.10.0

func (e *EverestServer) DeleteSplitHorizonDNSConfig(ctx echo.Context, namespace, name string) error

DeleteSplitHorizonDNSConfig handles deleting a specific SplitHorizonDNSConfig resource by name.

func (*EverestServer) GetBackupStorage

func (e *EverestServer) GetBackupStorage(c echo.Context, namespace, name string) error

GetBackupStorage retrieves the specified backup storage.

func (*EverestServer) GetDatabaseCluster

func (e *EverestServer) GetDatabaseCluster(c echo.Context, namespace, name string) error

GetDatabaseCluster retrieves the specified database cluster on the specified kubernetes cluster.

func (*EverestServer) GetDatabaseClusterBackup

func (e *EverestServer) GetDatabaseClusterBackup(ctx echo.Context, namespace, name string) error

GetDatabaseClusterBackup returns the specified cluster backup on the specified kubernetes cluster.

func (*EverestServer) GetDatabaseClusterComponents

func (e *EverestServer) GetDatabaseClusterComponents(c echo.Context, namespace, name string) error

GetDatabaseClusterComponents returns database cluster components.

func (*EverestServer) GetDatabaseClusterCredentials

func (e *EverestServer) GetDatabaseClusterCredentials(c echo.Context, namespace, name string) error

GetDatabaseClusterCredentials returns credentials for the specified database cluster.

func (*EverestServer) GetDatabaseClusterPitr

func (e *EverestServer) GetDatabaseClusterPitr(c echo.Context, namespace, name string) error

GetDatabaseClusterPitr returns the point-in-time recovery related information for the specified database cluster.

func (*EverestServer) GetDatabaseClusterRestore

func (e *EverestServer) GetDatabaseClusterRestore(ctx echo.Context, namespace, name string) error

GetDatabaseClusterRestore Returns the specified cluster restore on the specified kubernetes cluster.

func (*EverestServer) GetDatabaseEngine

func (e *EverestServer) GetDatabaseEngine(ctx echo.Context, namespace, name string) error

GetDatabaseEngine Get the specified database engine on the specified namespace.

func (*EverestServer) GetKubernetesClusterInfo

func (e *EverestServer) GetKubernetesClusterInfo(ctx echo.Context) error

GetKubernetesClusterInfo returns the cluster type and storage classes of a kubernetes cluster.

func (*EverestServer) GetKubernetesClusterResources

func (e *EverestServer) GetKubernetesClusterResources(ctx echo.Context) error

GetKubernetesClusterResources returns all and available resources of a Kubernetes cluster.

func (*EverestServer) GetLoadBalancerConfig added in v1.9.0

func (e *EverestServer) GetLoadBalancerConfig(c echo.Context, configName string) error

GetLoadBalancerConfig retrieves a load balancer config by name.

func (*EverestServer) GetMonitoringInstance

func (e *EverestServer) GetMonitoringInstance(ctx echo.Context, namespace, name string) error

GetMonitoringInstance retrieves a monitoring instance.

func (*EverestServer) GetPodSchedulingPolicy added in v1.7.0

func (e *EverestServer) GetPodSchedulingPolicy(c echo.Context, policyName string) error

GetPodSchedulingPolicy retrieves a pod scheduling policy by name.

func (*EverestServer) GetSettings

func (e *EverestServer) GetSettings(ctx echo.Context) error

GetSettings returns the Everest global settings.

func (*EverestServer) GetSplitHorizonDNSConfig added in v1.10.0

func (e *EverestServer) GetSplitHorizonDNSConfig(ctx echo.Context, namespace string, name string) error

GetSplitHorizonDNSConfig handles retrieving a specific SplitHorizonDNSConfig resource by name.

func (*EverestServer) GetUpgradePlan

func (e *EverestServer) GetUpgradePlan(
	ctx echo.Context,
	namespace string,
) error

GetUpgradePlan gets the upgrade plan for the given namespace.

func (*EverestServer) GetUserPermissions

func (e *EverestServer) GetUserPermissions(c echo.Context) error

GetUserPermissions returns the permissions for the currently logged in user.

func (*EverestServer) ListBackupStorages

func (e *EverestServer) ListBackupStorages(c echo.Context, namespace string) error

ListBackupStorages lists backup storages.

func (*EverestServer) ListDataImportJobs added in v1.8.0

func (e *EverestServer) ListDataImportJobs(c echo.Context, namespace, dbName string) error

ListDataImportJobs lists all DataImportJobs for the specified database clusters.

func (*EverestServer) ListDataImporters added in v1.8.0

func (e *EverestServer) ListDataImporters(c echo.Context, params api.ListDataImportersParams) error

ListDataImporters lists all data importers available in the Everest server.

func (*EverestServer) ListDatabaseClusterBackups

func (e *EverestServer) ListDatabaseClusterBackups(c echo.Context, namespace, name string) error

ListDatabaseClusterBackups returns list of the created database cluster backups on the specified kubernetes cluster.

func (*EverestServer) ListDatabaseClusterRestores

func (e *EverestServer) ListDatabaseClusterRestores(ctx echo.Context, namespace, name string) error

ListDatabaseClusterRestores List of the created database cluster restores on the specified kubernetes cluster.

func (*EverestServer) ListDatabaseClusters

func (e *EverestServer) ListDatabaseClusters(ctx echo.Context, namespace string) error

ListDatabaseClusters lists the created database clusters on the specified kubernetes cluster.

func (*EverestServer) ListDatabaseEngines

func (e *EverestServer) ListDatabaseEngines(ctx echo.Context, namespace string) error

ListDatabaseEngines List of the available database engines on the specified namespace.

func (*EverestServer) ListLoadBalancerConfig added in v1.9.0

func (e *EverestServer) ListLoadBalancerConfig(ctx echo.Context) error

ListLoadBalancerConfig lists all load balancer configs.

func (*EverestServer) ListMonitoringInstances

func (e *EverestServer) ListMonitoringInstances(ctx echo.Context, namespace string) error

ListMonitoringInstances lists all monitoring instances.

func (*EverestServer) ListNamespaces

func (e *EverestServer) ListNamespaces(ctx echo.Context) error

ListNamespaces returns the current version information.

func (*EverestServer) ListPodSchedulingPolicy added in v1.7.0

func (e *EverestServer) ListPodSchedulingPolicy(ctx echo.Context, params api.ListPodSchedulingPolicyParams) error

ListPodSchedulingPolicy lists all pod scheduling policies.

func (*EverestServer) ListSplitHorizonDNSConfigs added in v1.10.0

func (e *EverestServer) ListSplitHorizonDNSConfigs(ctx echo.Context, namespace string) error

ListSplitHorizonDNSConfigs handles listing SplitHorizonDNSConfig resources in a given namespace.

func (*EverestServer) RunTelemetryJob

func (e *EverestServer) RunTelemetryJob(ctx context.Context, c *config.EverestConfig)

RunTelemetryJob runs background job for collecting telemetry.

func (*EverestServer) Shutdown

func (e *EverestServer) Shutdown(ctx context.Context) error

Shutdown gracefully stops the Everest server.

func (*EverestServer) Start

func (e *EverestServer) Start(ctx context.Context) error

Start starts everest server.

func (*EverestServer) UpdateBackupStorage

func (e *EverestServer) UpdateBackupStorage(c echo.Context, namespace, name string) error

UpdateBackupStorage updates of the specified backup storage.

func (*EverestServer) UpdateDatabaseCluster

func (e *EverestServer) UpdateDatabaseCluster(ctx echo.Context, namespace, name string) error

UpdateDatabaseCluster replaces the specified database cluster on the specified kubernetes cluster.

func (*EverestServer) UpdateDatabaseClusterRestore

func (e *EverestServer) UpdateDatabaseClusterRestore(ctx echo.Context, namespace, name string) error

UpdateDatabaseClusterRestore Replace the specified cluster restore on the specified kubernetes cluster.

func (*EverestServer) UpdateDatabaseEngine

func (e *EverestServer) UpdateDatabaseEngine(ctx echo.Context, namespace, name string) error

UpdateDatabaseEngine Update the specified database engine on the specified namespace.

func (*EverestServer) UpdateLoadBalancerConfig added in v1.9.0

func (e *EverestServer) UpdateLoadBalancerConfig(c echo.Context, configName string) error

UpdateLoadBalancerConfig updates an existing load balancer config.

func (*EverestServer) UpdateMonitoringInstance

func (e *EverestServer) UpdateMonitoringInstance(ctx echo.Context, namespace, name string) error

UpdateMonitoringInstance updates a monitoring instance based on the provided fields.

func (*EverestServer) UpdatePodSchedulingPolicy added in v1.7.0

func (e *EverestServer) UpdatePodSchedulingPolicy(c echo.Context, policyName string) error

UpdatePodSchedulingPolicy updates an existing pod scheduling policy.

func (*EverestServer) UpdateSplitHorizonDNSConfig added in v1.10.0

func (e *EverestServer) UpdateSplitHorizonDNSConfig(ctx echo.Context, namespace, name string) error

UpdateSplitHorizonDNSConfig handles updating a specific SplitHorizonDNSConfig resource.

func (*EverestServer) VersionInfo

func (e *EverestServer) VersionInfo(ctx echo.Context) error

VersionInfo returns the current version information.

type Metric

type Metric struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Metric represents key-value metrics.

type RateLimiterMemoryStore

type RateLimiterMemoryStore struct {
	// contains filtered or unexported fields
}

RateLimiterMemoryStore is the built-in store implementation for RateLimiter.

func NewRateLimiterMemoryStoreWithConfig

func NewRateLimiterMemoryStoreWithConfig(config RateLimiterMemoryStoreConfig) *RateLimiterMemoryStore

NewRateLimiterMemoryStoreWithConfig creates an in-memory storage which can be used in echomiddleware.RateLimiterWithConfig.

func (*RateLimiterMemoryStore) Allow

func (store *RateLimiterMemoryStore) Allow(identifier string) (bool, error)

Allow implements RateLimiterStore.Allow checks if the request doesn't violate the configured limits per second and the individual timeout in case of failures.

func (*RateLimiterMemoryStore) CleanupVisitor

func (store *RateLimiterMemoryStore) CleanupVisitor(identifier string)

CleanupVisitor removes the data about previous failures. To be used when a successful opetation was performed.

func (*RateLimiterMemoryStore) IncreaseTimeout

func (store *RateLimiterMemoryStore) IncreaseTimeout(identifier string)

IncreaseTimeout increases timeout for the given visitor.

type RateLimiterMemoryStoreConfig

type RateLimiterMemoryStoreConfig struct {
	Rate      rate.Limit    // Rate of requests allowed to pass as req/s. For more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit.
	Burst     int           // Burst is maximum number of requests to pass at the same moment. It additionally allows a number of requests to pass when rate limit is reached.
	ExpiresIn time.Duration // ExpiresIn is the duration after that a rate limiter is cleaned up
}

RateLimiterMemoryStoreConfig represents configuration for RateLimiterMemoryStore.

type Report

type Report struct {
	ID            string    `json:"id"`
	CreateTime    time.Time `json:"createTime"`
	InstanceID    string    `json:"instanceId"`
	ProductFamily string    `json:"productFamily"`
	Metrics       []Metric  `json:"metrics"`
}

Report is a struct for a single telemetry report.

type Telemetry

type Telemetry struct {
	Reports []Report `json:"reports"`
}

Telemetry is the struct for telemetry reports.

type Template added in v1.6.0

type Template struct {
	// contains filtered or unexported fields
}

func (*Template) Render added in v1.6.0

func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error

type Visitor

type Visitor struct {
	*rate.Limiter
	// contains filtered or unexported fields
}

Visitor signifies a unique user's limiter details.

Directories

Path Synopsis
Package handlers contains the interface and types for the Everest API handlers.
Package handlers contains the interface and types for the Everest API handlers.
k8s
Package k8s contains the Kubernetes handler.
Package k8s contains the Kubernetes handler.
rbac
Package rbac provides the RBAC handler.
Package rbac provides the RBAC handler.
validation
Package validation provides the validation handler.
Package validation provides the validation handler.

Jump to

Keyboard shortcuts

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