Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) Connect(ctx context.Context) entity.NodeCallbackResults
- func (c *Cluster) Run(ctx context.Context, callback entity.NodeCallback) entity.NodeCallbackResults
- func (c *Cluster) RunParallel(ctx context.Context, callback entity.NodeCallback) entity.NodeCallbackResults
- func (c *Cluster) Size() int
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func NewCluster( opts Options, cmdFactory cmdFactory, logger *zap.SugaredLogger, ) *Cluster
func (*Cluster) Connect ¶
func (c *Cluster) Connect(ctx context.Context) entity.NodeCallbackResults
Connect creates shell-command executors for each node. If the tool is running over SSH, the SSH connections are established here and the errors are reported.
func (*Cluster) Run ¶
func (c *Cluster) Run( ctx context.Context, callback entity.NodeCallback, ) entity.NodeCallbackResults
Run executes a given callback on each node consecutively. Stops the execution on error.
func (*Cluster) RunParallel ¶
func (c *Cluster) RunParallel( ctx context.Context, callback entity.NodeCallback, ) entity.NodeCallbackResults
RunParallel executes a given callback on each node in parallel. The execution does not stop even if there's an error on one of the nodes.
Click to show internal directories.
Click to hide internal directories.