Documentation ¶
Overview ¶
Package dbaas contains all APIs related to DBaaS.
Package dbaas contains all logic related to dbaas services.
Index ¶
- func NewComponentsService(db *reform.DB, dbaasClient dbaasClient, versionServiceClient versionService) dbaasv1beta1.ComponentsServer
- func NewKubernetesServer(db *reform.DB, dbaasClient dbaasClient) dbaasv1beta1.KubernetesServer
- func NewLogsService(db *reform.DB, client dbaasClient) dbaasv1beta1.LogsAPIServer
- func NewPSMDBClusterService(db *reform.DB, dbaasClient dbaasClient, grafanaClient grafanaClient) dbaasv1beta1.PSMDBClusterServer
- func NewXtraDBClusterService(db *reform.DB, client dbaasClient, grafanaClient grafanaClient) dbaasv1beta1.XtraDBClusterServer
- type LogsService
- type PSMDBClusterService
- func (s PSMDBClusterService) CreatePSMDBCluster(ctx context.Context, req *dbaasv1beta1.CreatePSMDBClusterRequest) (*dbaasv1beta1.CreatePSMDBClusterResponse, error)
- func (s PSMDBClusterService) DeletePSMDBCluster(ctx context.Context, req *dbaasv1beta1.DeletePSMDBClusterRequest) (*dbaasv1beta1.DeletePSMDBClusterResponse, error)
- func (s *PSMDBClusterService) Enabled() bool
- func (s PSMDBClusterService) GetPSMDBClusterCredentials(ctx context.Context, req *dbaasv1beta1.GetPSMDBClusterCredentialsRequest) (*dbaasv1beta1.GetPSMDBClusterCredentialsResponse, error)
- func (s PSMDBClusterService) GetPSMDBClusterResources(ctx context.Context, req *dbaasv1beta1.GetPSMDBClusterResourcesRequest) (*dbaasv1beta1.GetPSMDBClusterResourcesResponse, error)
- func (s PSMDBClusterService) ListPSMDBClusters(ctx context.Context, req *dbaasv1beta1.ListPSMDBClustersRequest) (*dbaasv1beta1.ListPSMDBClustersResponse, error)
- func (s PSMDBClusterService) RestartPSMDBCluster(ctx context.Context, req *dbaasv1beta1.RestartPSMDBClusterRequest) (*dbaasv1beta1.RestartPSMDBClusterResponse, error)
- func (s PSMDBClusterService) UpdatePSMDBCluster(ctx context.Context, req *dbaasv1beta1.UpdatePSMDBClusterRequest) (*dbaasv1beta1.UpdatePSMDBClusterResponse, error)
- type VersionServiceClient
- type VersionServiceResponse
- type XtraDBClusterService
- func (s XtraDBClusterService) CreateXtraDBCluster(ctx context.Context, req *dbaasv1beta1.CreateXtraDBClusterRequest) (*dbaasv1beta1.CreateXtraDBClusterResponse, error)
- func (s XtraDBClusterService) DeleteXtraDBCluster(ctx context.Context, req *dbaasv1beta1.DeleteXtraDBClusterRequest) (*dbaasv1beta1.DeleteXtraDBClusterResponse, error)
- func (s XtraDBClusterService) GetXtraDBClusterCredentials(ctx context.Context, req *dbaasv1beta1.GetXtraDBClusterCredentialsRequest) (*dbaasv1beta1.GetXtraDBClusterCredentialsResponse, error)
- func (s XtraDBClusterService) GetXtraDBClusterResources(ctx context.Context, req *dbaasv1beta1.GetXtraDBClusterResourcesRequest) (*dbaasv1beta1.GetXtraDBClusterResourcesResponse, error)
- func (s XtraDBClusterService) ListXtraDBClusters(ctx context.Context, req *dbaasv1beta1.ListXtraDBClustersRequest) (*dbaasv1beta1.ListXtraDBClustersResponse, error)
- func (s XtraDBClusterService) RestartXtraDBCluster(ctx context.Context, req *dbaasv1beta1.RestartXtraDBClusterRequest) (*dbaasv1beta1.RestartXtraDBClusterResponse, error)
- func (s XtraDBClusterService) UpdateXtraDBCluster(ctx context.Context, req *dbaasv1beta1.UpdateXtraDBClusterRequest) (*dbaasv1beta1.UpdateXtraDBClusterResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewComponentsService ¶
func NewComponentsService(db *reform.DB, dbaasClient dbaasClient, versionServiceClient versionService) dbaasv1beta1.ComponentsServer
NewComponentsService creates Components Service.
func NewKubernetesServer ¶
func NewKubernetesServer(db *reform.DB, dbaasClient dbaasClient) dbaasv1beta1.KubernetesServer
NewKubernetesServer creates Kubernetes Server.
func NewLogsService ¶
func NewLogsService(db *reform.DB, client dbaasClient) dbaasv1beta1.LogsAPIServer
NewLogsService creates new LogsService.
func NewPSMDBClusterService ¶
func NewPSMDBClusterService(db *reform.DB, dbaasClient dbaasClient, grafanaClient grafanaClient) dbaasv1beta1.PSMDBClusterServer
NewPSMDBClusterService creates PSMDB Service.
func NewXtraDBClusterService ¶
func NewXtraDBClusterService(db *reform.DB, client dbaasClient, grafanaClient grafanaClient) dbaasv1beta1.XtraDBClusterServer
NewXtraDBClusterService creates XtraDB Service.
Types ¶
type LogsService ¶
type LogsService struct {
// contains filtered or unexported fields
}
LogsService implements dbaasv1beta1.LogsAPIServer methods.
func (*LogsService) Enabled ¶
func (s *LogsService) Enabled() bool
Enabled returns if service is enabled and can be used.
func (LogsService) GetLogs ¶
func (s LogsService) GetLogs(ctx context.Context, in *dbaasv1beta1.GetLogsRequest) (*dbaasv1beta1.GetLogsResponse, error)
GetLogs returns container's logs of a database cluster and its pods events.
type PSMDBClusterService ¶
type PSMDBClusterService struct {
// contains filtered or unexported fields
}
PSMDBClusterService implements PSMDBClusterServer methods.
func (PSMDBClusterService) CreatePSMDBCluster ¶
func (s PSMDBClusterService) CreatePSMDBCluster(ctx context.Context, req *dbaasv1beta1.CreatePSMDBClusterRequest) (*dbaasv1beta1.CreatePSMDBClusterResponse, error)
CreatePSMDBCluster creates PSMDB cluster with given parameters.
func (PSMDBClusterService) DeletePSMDBCluster ¶
func (s PSMDBClusterService) DeletePSMDBCluster(ctx context.Context, req *dbaasv1beta1.DeletePSMDBClusterRequest) (*dbaasv1beta1.DeletePSMDBClusterResponse, error)
DeletePSMDBCluster deletes PSMDB cluster by given name.
func (*PSMDBClusterService) Enabled ¶
func (s *PSMDBClusterService) Enabled() bool
Enabled returns if service is enabled and can be used.
func (PSMDBClusterService) GetPSMDBClusterCredentials ¶
func (s PSMDBClusterService) GetPSMDBClusterCredentials(ctx context.Context, req *dbaasv1beta1.GetPSMDBClusterCredentialsRequest) (*dbaasv1beta1.GetPSMDBClusterCredentialsResponse, error)
GetPSMDBClusterCredentials returns a PSMDB cluster credentials by cluster name.
func (PSMDBClusterService) GetPSMDBClusterResources ¶
func (s PSMDBClusterService) GetPSMDBClusterResources(ctx context.Context, req *dbaasv1beta1.GetPSMDBClusterResourcesRequest) (*dbaasv1beta1.GetPSMDBClusterResourcesResponse, error)
GetPSMDBClusterResources returns expected resources to be consumed by the cluster.
func (PSMDBClusterService) ListPSMDBClusters ¶
func (s PSMDBClusterService) ListPSMDBClusters(ctx context.Context, req *dbaasv1beta1.ListPSMDBClustersRequest) (*dbaasv1beta1.ListPSMDBClustersResponse, error)
ListPSMDBClusters returns a list of all PSMDB clusters.
func (PSMDBClusterService) RestartPSMDBCluster ¶
func (s PSMDBClusterService) RestartPSMDBCluster(ctx context.Context, req *dbaasv1beta1.RestartPSMDBClusterRequest) (*dbaasv1beta1.RestartPSMDBClusterResponse, error)
RestartPSMDBCluster restarts PSMDB cluster by given name.
func (PSMDBClusterService) UpdatePSMDBCluster ¶
func (s PSMDBClusterService) UpdatePSMDBCluster(ctx context.Context, req *dbaasv1beta1.UpdatePSMDBClusterRequest) (*dbaasv1beta1.UpdatePSMDBClusterResponse, error)
UpdatePSMDBCluster updates PSMDB cluster.
type VersionServiceClient ¶
type VersionServiceClient struct {
// contains filtered or unexported fields
}
VersionServiceClient represents a client for Version Service API.
func NewVersionServiceClient ¶
func NewVersionServiceClient(url string) *VersionServiceClient
NewVersionServiceClient creates a new client for given version service URL.
func (*VersionServiceClient) Collect ¶
func (c *VersionServiceClient) Collect(ch chan<- prom.Metric)
Collect implements prometheus.Collector.
func (*VersionServiceClient) Describe ¶
func (c *VersionServiceClient) Describe(ch chan<- *prom.Desc)
Describe implements prometheus.Collector.
func (*VersionServiceClient) Matrix ¶
func (c *VersionServiceClient) Matrix(ctx context.Context, params componentsParams) (*VersionServiceResponse, error)
Matrix calls version service with given params and returns components matrix.
type VersionServiceResponse ¶
type VersionServiceResponse struct { Versions []struct { Product string `json:"product"` Operator string `json:"operator"` Matrix matrix `json:"matrix"` } `json:"versions"` }
VersionServiceResponse represents response from version service API.
type XtraDBClusterService ¶
type XtraDBClusterService struct {
// contains filtered or unexported fields
}
XtraDBClusterService implements XtraDBClusterServer methods.
func (XtraDBClusterService) CreateXtraDBCluster ¶
func (s XtraDBClusterService) CreateXtraDBCluster(ctx context.Context, req *dbaasv1beta1.CreateXtraDBClusterRequest) (*dbaasv1beta1.CreateXtraDBClusterResponse, error)
CreateXtraDBCluster creates XtraDB cluster with given parameters.
func (XtraDBClusterService) DeleteXtraDBCluster ¶
func (s XtraDBClusterService) DeleteXtraDBCluster(ctx context.Context, req *dbaasv1beta1.DeleteXtraDBClusterRequest) (*dbaasv1beta1.DeleteXtraDBClusterResponse, error)
DeleteXtraDBCluster deletes XtraDB cluster by given name.
func (XtraDBClusterService) GetXtraDBClusterCredentials ¶
func (s XtraDBClusterService) GetXtraDBClusterCredentials(ctx context.Context, req *dbaasv1beta1.GetXtraDBClusterCredentialsRequest) (*dbaasv1beta1.GetXtraDBClusterCredentialsResponse, error)
GetXtraDBClusterCredentials returns a XtraDB cluster credentials.
func (XtraDBClusterService) GetXtraDBClusterResources ¶
func (s XtraDBClusterService) GetXtraDBClusterResources(ctx context.Context, req *dbaasv1beta1.GetXtraDBClusterResourcesRequest) (*dbaasv1beta1.GetXtraDBClusterResourcesResponse, error)
GetXtraDBClusterResources returns expected resources to be consumed by the cluster.
func (XtraDBClusterService) ListXtraDBClusters ¶
func (s XtraDBClusterService) ListXtraDBClusters(ctx context.Context, req *dbaasv1beta1.ListXtraDBClustersRequest) (*dbaasv1beta1.ListXtraDBClustersResponse, error)
ListXtraDBClusters returns a list of all XtraDB clusters.
func (XtraDBClusterService) RestartXtraDBCluster ¶
func (s XtraDBClusterService) RestartXtraDBCluster(ctx context.Context, req *dbaasv1beta1.RestartXtraDBClusterRequest) (*dbaasv1beta1.RestartXtraDBClusterResponse, error)
RestartXtraDBCluster restarts XtraDB cluster by given name.
func (XtraDBClusterService) UpdateXtraDBCluster ¶
func (s XtraDBClusterService) UpdateXtraDBCluster(ctx context.Context, req *dbaasv1beta1.UpdateXtraDBClusterRequest) (*dbaasv1beta1.UpdateXtraDBClusterResponse, error)
UpdateXtraDBCluster updates XtraDB cluster.