Documentation ¶
Index ¶
- func CleanupComponent(ctx context.Context, delFileMaps map[string]set.StringSet) error
- func DeleteGlobalDirs(ctx context.Context, host string, options *spec.GlobalOptions) error
- func DeletePublicKey(ctx context.Context, host string) error
- func DestroyComponent(ctx context.Context, instances []spec.Instance, cls spec.Topology, ...) error
- func DestroyMonitored(ctx context.Context, inst spec.Instance, options *spec.TSMonitoredOptions, ...) error
- func Download(prefix, component, nodeOS, arch, version string) error
- func EnableComponent(ctx context.Context, instances []spec.Instance, noAgentHosts set.StringSet, ...) error
- func EnableMonitored(ctx context.Context, hosts []string, noAgentHosts set.StringSet, ...) error
- func FilterComponent(comps []spec.Component, components set.StringSet) (res []spec.Component)
- func FilterInstance(instances []spec.Instance, nodes set.StringSet) (res []spec.Instance)
- func Restart(ctx context.Context, cluster spec.Topology, options Options, ...) error
- func RestartMonitored(ctx context.Context, hosts []string, noAgentHosts set.StringSet, ...) error
- func Start(ctx context.Context, cluster spec.Topology, options Options, ...) error
- func StartComponent(ctx context.Context, instances []spec.Instance, options Options, ...) error
- func StartMonitored(ctx context.Context, hosts []string, noAgentHosts set.StringSet, ...) error
- func Stop(ctx context.Context, cluster spec.Topology, options Options) error
- func StopComponent(ctx context.Context, instances []spec.Instance, options Options, ...) error
- func StopMonitored(ctx context.Context, hosts []string, noAgentHosts set.StringSet, ...) error
- func Uninstall(ctx context.Context, cluster spec.Topology, options Options) error
- type DownloadOptions
- type Downloader
- type Executor
- type GeminiDownloader
- type GeminiExecutor
- type Options
- type RunAction
- type RunActions
- type RunInfo
- type StopAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupComponent ¶
CleanupComponent cleanup the instances
func DeleteGlobalDirs ¶
DeleteGlobalDirs deletes all global directories if they are empty
func DeletePublicKey ¶
DeletePublicKey deletes the SSH public key from host
func DestroyComponent ¶
func DestroyComponent(ctx context.Context, instances []spec.Instance, cls spec.Topology, options Options) error
DestroyComponent destroy the instances.
func DestroyMonitored ¶
func DestroyMonitored(ctx context.Context, inst spec.Instance, options *spec.TSMonitoredOptions, timeout uint64) error
DestroyMonitored destroy the monitored service.
func Download ¶
Download downloads the specific version of a component from the mirror repository, there is nothing to do if the specified version exists.
func EnableComponent ¶
func EnableComponent(ctx context.Context, instances []spec.Instance, noAgentHosts set.StringSet, options Options, isEnable bool) error
EnableComponent enable/disable the instances
func EnableMonitored ¶
func EnableMonitored(ctx context.Context, hosts []string, noAgentHosts set.StringSet, timeout uint64, isEnable bool) error
EnableMonitored enable/disable monitor service in a cluster
func FilterComponent ¶
FilterComponent filter components by set
func FilterInstance ¶
FilterInstance filter instances by set
func Restart ¶
func Restart( ctx context.Context, cluster spec.Topology, options Options, tlsCfg *tls.Config, ) error
Restart the cluster.
func RestartMonitored ¶
func RestartMonitored(ctx context.Context, hosts []string, noAgentHosts set.StringSet, timeout uint64) error
RestartMonitored stop BlackboxExporter and NodeExporter
func Start ¶
func Start( ctx context.Context, cluster spec.Topology, options Options, tlsCfg *tls.Config, ) error
Start the cluster.
func StartComponent ¶
func StartComponent(ctx context.Context, instances []spec.Instance, options Options, tlsCfg *tls.Config) error
StartComponent start the instances.
func StartMonitored ¶
func StartMonitored(ctx context.Context, hosts []string, noAgentHosts set.StringSet, timeout uint64) error
StartMonitored start BlackboxExporter and NodeExporter
func StopComponent ¶
func StopComponent(ctx context.Context, instances []spec.Instance, options Options, forceStop bool, ) error
StopComponent stop the instances.
Types ¶
type DownloadOptions ¶
type Downloader ¶
type Downloader interface { Run() error // contains filtered or unexported methods }
func NewGeminiDownloader ¶
func NewGeminiDownloader(ops DownloadOptions) Downloader
type Executor ¶
type GeminiDownloader ¶
type GeminiDownloader struct { Url string // contains filtered or unexported fields }
func (*GeminiDownloader) CleanFile ¶
func (d *GeminiDownloader) CleanFile(dir string)
func (*GeminiDownloader) Run ¶
func (d *GeminiDownloader) Run() error
type GeminiExecutor ¶
type GeminiExecutor struct {
// contains filtered or unexported fields
}
func (*GeminiExecutor) ExecCommand ¶
func (e *GeminiExecutor) ExecCommand(ip string, command string) (string, error)
func (*GeminiExecutor) ExecRunAction ¶
func (e *GeminiExecutor) ExecRunAction(action *RunAction, errChan chan error) string
func (*GeminiExecutor) ExecStopAction ¶
func (e *GeminiExecutor) ExecStopAction(action *StopAction) (string, error)
type Options ¶
type Options struct { Roles []string Nodes []string Force bool // Option for upgrade/tls subcommand SSHTimeout uint64 // timeout in seconds when connecting an SSH server OptTimeout uint64 // timeout in seconds for operations that support it, not to confuse with SSH timeout APITimeout uint64 // timeout in seconds for API operations that support it, like transferring store leader IgnoreConfigCheck bool // should we ignore the config check result after init config Concurrency int // max number of parallel tasks to run SSHProxyHost string // the ssh proxy host SSHProxyPort int // the ssh proxy port SSHProxyUser string // the ssh proxy user SSHProxyIdentity string // the ssh proxy identity file SSHProxyUsePassword bool // use password instead of identity file for ssh proxy connection SSHProxyTimeout uint64 // timeout in seconds when connecting the proxy host // What type of things should we cleanup in clean command CleanupData bool // should we cleanup data CleanupLog bool // should we clenaup log CleanupAuditLog bool // should we clenaup openGemini server auit log // Some data will be retained when destroying instances RetainDataRoles []string RetainDataNodes []string DisplayMode string // the output format }
Options represents the operation options
type RunActions ¶
type StopAction ¶
type StopAction struct { ProcessNames []string Remote *config.RemoteHost }