Documentation
¶
Index ¶
- type DeployOptions
- type DeployerInstance
- type ExecOptions
- type Manager
- func (m *Manager) CleanCluster(name string, gOpt operator.Options, cleanOpt operator.Options, ...) error
- func (m *Manager) Deploy(name string, clusterVersion string, topoFile string, opt DeployOptions, ...) error
- func (m *Manager) DestroyCluster(name string, gOpt operator.Options, destroyOpt operator.Options, ...) error
- func (m *Manager) DestroyTombstone(name string, gOpt operator.Options, skipConfirm bool) error
- func (m *Manager) Display(name string, opt operator.Options) error
- func (m *Manager) EditConfig(name string, skipConfirm bool) error
- func (m *Manager) EnableCluster(name string, options operator.Options, isEnable bool) error
- func (m *Manager) Exec(name string, opt ExecOptions, gOpt operator.Options) error
- func (m *Manager) ListCluster() error
- func (m *Manager) Patch(name string, packagePath string, opt operator.Options, overwrite bool) error
- func (m *Manager) Reload(name string, opt operator.Options, skipRestart bool) error
- func (m *Manager) Rename(name string, opt operator.Options, newName string) error
- func (m *Manager) RestartCluster(name string, options operator.Options) error
- func (m *Manager) ScaleIn(name string, skipConfirm bool, gOpt operator.Options, ...) error
- func (m *Manager) ScaleOut(name string, topoFile string, ...) error
- func (m *Manager) StartCluster(name string, options operator.Options, ...) error
- func (m *Manager) StopCluster(name string, options operator.Options) error
- func (m *Manager) Upgrade(name string, clusterVersion string, opt operator.Options, skipConfirm bool) error
- type ScaleOutOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeployOptions ¶
type DeployOptions struct {
User string // username to login to the SSH server
SkipCreateUser bool // don't create the user
IdentityFile string // path to the private key file
UsePassword bool // use password instead of identity file for ssh connection
IgnoreConfigCheck bool // ignore config check result
NoLabels bool // don't check labels for TiKV instance
}
DeployOptions contains the options for scale out. TODO: merge ScaleOutOptions, should check config too when scale out.
type DeployerInstance ¶
type DeployerInstance interface {
Deploy(b *task.Builder, srcPath string, deployDir string, version string, name string, clusterVersion string)
}
DeployerInstance is a instance can deploy to a target deploy directory.
type ExecOptions ¶
ExecOptions for exec shell commanm.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager to deploy a cluster.
func NewManager ¶
func NewManager(sysName string, specManager *spec.SpecManager, bindVersion spec.BindVersion) *Manager
NewManager create a Manager.
func (*Manager) CleanCluster ¶
func (m *Manager) CleanCluster(name string, gOpt operator.Options, cleanOpt operator.Options, skipConfirm bool) error
CleanCluster cleans the cluster without destroying it
func (*Manager) Deploy ¶
func (m *Manager) Deploy( name string, clusterVersion string, topoFile string, opt DeployOptions, afterDeploy func(b *task.Builder, newPart spec.Topology), skipConfirm bool, gOpt operator.Options, ) error
Deploy a cluster.
func (*Manager) DestroyCluster ¶
func (m *Manager) DestroyCluster(name string, gOpt operator.Options, destroyOpt operator.Options, skipConfirm bool) error
DestroyCluster destroy the cluster.
func (*Manager) DestroyTombstone ¶
DestroyTombstone destroy and remove instances that is in tombstone state
func (*Manager) EditConfig ¶
EditConfig lets the user edit the cluster's config.
func (*Manager) EnableCluster ¶
EnableCluster enable/disable the service in a cluster
func (*Manager) Patch ¶
func (m *Manager) Patch(name string, packagePath string, opt operator.Options, overwrite bool) error
Patch the cluster.
func (*Manager) RestartCluster ¶
RestartCluster restart the cluster.
func (*Manager) ScaleIn ¶
func (m *Manager) ScaleIn( name string, skipConfirm bool, gOpt operator.Options, scale func(builer *task.Builder, metadata spec.Metadata, tlsCfg *tls.Config), ) error
ScaleIn the cluster.
func (*Manager) ScaleOut ¶
func (m *Manager) ScaleOut( name string, topoFile string, afterDeploy func(b *task.Builder, newPart spec.Topology), final func(b *task.Builder, name string, meta spec.Metadata), opt ScaleOutOptions, skipConfirm bool, gOpt operator.Options, ) error
ScaleOut scale out the cluster.
func (*Manager) StartCluster ¶
func (m *Manager) StartCluster(name string, options operator.Options, fn ...func(b *task.Builder, metadata spec.Metadata)) error
StartCluster start the cluster with specified name.
func (*Manager) StopCluster ¶
StopCluster stop the cluster.
type ScaleOutOptions ¶
type ScaleOutOptions struct {
User string // username to login to the SSH server
SkipCreateUser bool // don't create user
IdentityFile string // path to the private key file
UsePassword bool // use password instead of identity file for ssh connection
NoLabels bool // don't check labels for TiKV instance
}
ScaleOutOptions contains the options for scale out.