cluster

package
v0.1.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectOptions

type ConnectOptions struct {
	Namespace string
	Name      string
	Protocol  ConnectProtocol
}

type ConnectProtocol

type ConnectProtocol int
const (
	MySQL ConnectProtocol = iota
	Postgres
)

type CreateClusterOptions

type CreateClusterOptions struct {
	GreptimeDBChartVersion string
	UseGreptimeCNArtifacts bool
	ValuesFile             string

	ImageRegistry               string `helm:"image.registry"`
	InitializerImageRegistry    string `helm:"initializer.registry"`
	DatanodeStorageClassName    string `helm:"datanode.storage.storageClassName"`
	DatanodeStorageSize         string `helm:"datanode.storage.storageSize"`
	DatanodeStorageRetainPolicy string `helm:"datanode.storage.storageRetainPolicy"`
	EtcdEndPoints               string `helm:"meta.etcdEndpoints"`
	ConfigValues                string `helm:"*"`
}

CreateClusterOptions is the options to create a GreptimeDB cluster.

type CreateEtcdOptions

type CreateEtcdOptions struct {
	EtcdChartVersion       string
	UseGreptimeCNArtifacts bool
	ValuesFile             string

	// The parameters reference: https://artifacthub.io/packages/helm/bitnami/etcd.
	EtcdClusterSize      string `helm:"replicaCount"`
	ImageRegistry        string `helm:"image.registry"`
	EtcdStorageClassName string `helm:"persistence.storageClass"`
	EtcdStorageSize      string `helm:"persistence.size"`
	ConfigValues         string `helm:"*"`
}

CreateEtcdOptions is the options to create an etcd cluster.

type CreateOperatorOptions

type CreateOperatorOptions struct {
	GreptimeDBOperatorChartVersion string
	UseGreptimeCNArtifacts         bool
	ValuesFile                     string

	ImageRegistry string `helm:"image.registry"`
	ConfigValues  string `helm:"*"`
}

CreateOperatorOptions is the options to create a GreptimeDB operator.

type CreateOptions

type CreateOptions struct {
	Namespace string
	Name      string

	Cluster  *CreateClusterOptions
	Operator *CreateOperatorOptions
	Etcd     *CreateEtcdOptions

	Spinner *status.Spinner
}

type DeleteOptions

type DeleteOptions struct {
	Namespace    string
	Name         string
	TearDownEtcd bool
}

type GetOptions

type GetOptions struct {
	Namespace string
	Name      string

	// Table view render.
	Table *tablewriter.Table
}

type ListOptions

type ListOptions struct {
	GetOptions
}

type Operations

type Operations interface {
	// Get gets the current cluster profile.
	Get(ctx context.Context, options *GetOptions) error

	// List lists all cluster profiles.
	List(ctx context.Context, options *ListOptions) error

	// Scale scales the current cluster according to NewReplicas in ScaleOptions,
	// and refill the OldReplicas in ScaleOptions.
	Scale(ctx context.Context, options *ScaleOptions) error

	// Create creates a new cluster.
	Create(ctx context.Context, options *CreateOptions) error

	// Delete deletes a specific cluster.
	Delete(ctx context.Context, options *DeleteOptions) error

	// Connect connects to a specific cluster.
	Connect(ctx context.Context, options *ConnectOptions) error
}

type ScaleOptions

type ScaleOptions struct {
	NewReplicas   int32
	OldReplicas   int32
	Namespace     string
	Name          string
	ComponentType greptimedbclusterv1alpha1.ComponentKind
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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