Documentation ¶
Overview ¶
Package k8sclient provides client for kubernetes.
Index ¶
- type Cluster
- type ClusterKind
- type ClusterState
- type ComputeResources
- type K8Client
- func (c *K8Client) Cleanup() error
- func (c *K8Client) CreateXtraDBCluster(ctx context.Context, params *XtraDBParams) error
- func (c *K8Client) DeleteXtraDBCluster(ctx context.Context, name string) error
- func (c *K8Client) ListXtraDBClusters(ctx context.Context) ([]XtraDBCluster, error)
- func (c *K8Client) UpdateXtraDBCluster(ctx context.Context, params *XtraDBParams) error
- type PXC
- type ProxySQL
- type XtraDBCluster
- type XtraDBParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
Name string
}
Cluster contains common information related to cluster.
type ClusterState ¶
type ClusterState int32
ClusterState represents XtraDB cluster CR state.
const ( // ClusterStateInvalid represents unknown state. ClusterStateInvalid ClusterState = 0 // ClusterStateChanging represents a cluster being changed (initializing). ClusterStateChanging ClusterState = 1 // ClusterStateReady represents a cluster without pending changes (ready). ClusterStateReady ClusterState = 2 // ClusterStateFailed represents a failed cluster (error). ClusterStateFailed ClusterState = 3 // ClusterStateDeleting represents a cluster which are in deleting state (deleting). ClusterStateDeleting ClusterState = 4 )
type ComputeResources ¶ added in v0.1.2
ComputeResources represents container computer resources requests or limits.
type K8Client ¶
type K8Client struct {
// contains filtered or unexported fields
}
K8Client is a client for Kubernetes.
func NewK8Client ¶
NewK8Client returns new K8Client object.
func (*K8Client) CreateXtraDBCluster ¶
func (c *K8Client) CreateXtraDBCluster(ctx context.Context, params *XtraDBParams) error
CreateXtraDBCluster creates Percona XtraDB cluster with provided parameters.
func (*K8Client) DeleteXtraDBCluster ¶
DeleteXtraDBCluster deletes Percona XtraDB cluster with provided name.
func (*K8Client) ListXtraDBClusters ¶
func (c *K8Client) ListXtraDBClusters(ctx context.Context) ([]XtraDBCluster, error)
ListXtraDBClusters returns list of Percona XtraDB clusters and their statuses.
func (*K8Client) UpdateXtraDBCluster ¶
func (c *K8Client) UpdateXtraDBCluster(ctx context.Context, params *XtraDBParams) error
UpdateXtraDBCluster changes size of provided Percona XtraDB cluster.
type PXC ¶ added in v0.1.2
type PXC struct {
ComputeResources *ComputeResources
}
PXC contains information related to PXC containers in Percona XtraDB cluster.
type ProxySQL ¶ added in v0.1.2
type ProxySQL struct {
ComputeResources *ComputeResources
}
ProxySQL contains information related to ProxySQL containers in Percona XtraDB cluster.
type XtraDBCluster ¶
type XtraDBCluster struct { Name string Size int32 State ClusterState PXC *PXC ProxySQL *ProxySQL }
XtraDBCluster contains information related to xtradb cluster.