Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateSnapshot(ctx context.Context, node *entity.Node, tag, path string, keyspaces []string) error
- func (c *Client) ExportSchema(ctx context.Context, node *entity.Node, path string) (string, error)
- func (c *Client) Healthcheck(ctx context.Context, node *entity.Node) error
- func (c *Client) ListSnapshots(ctx context.Context, node *entity.Node) (entity.Snapshots, error)
- func (c *Client) RemoveSnapshot(ctx context.Context, node *entity.Node, tag string) error
- func (c *Client) Repair(ctx context.Context, node *entity.Node) (entity.RepairResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides abstractions over "nodetool" and "cqlsh" commands on a scylladb node.
func NewClient ¶
func NewClient( credentials entity.Credentials, logger *zap.SugaredLogger, ) (client *Client)
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(ctx context.Context, node *entity.Node, tag, path string, keyspaces []string) error
CreateSnapshot creates a snapshot with `nodetool snapshot` and moves it into given path.
func (*Client) ExportSchema ¶
ExportSchema writes a database schema to a file
func (*Client) Healthcheck ¶
Healthcheck ensures a database node is operable. FIXME: as a side effect, this also sets node status and cluster name, which are used later elsewhere. So we can't really use a node before healthchecking it.
func (*Client) ListSnapshots ¶
ListSnapshots returns all snapshots on a given node
func (*Client) RemoveSnapshot ¶
RemoveSnapshot removes a snapshot by tag
Click to show internal directories.
Click to hide internal directories.