scylla

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

func (c *Client) ExportSchema(ctx context.Context, node *entity.Node, path string) (string, error)

ExportSchema writes a database schema to a file

func (*Client) Healthcheck

func (c *Client) Healthcheck(ctx context.Context, node *entity.Node) error

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

func (c *Client) ListSnapshots(ctx context.Context, node *entity.Node) (entity.Snapshots, error)

ListSnapshots returns all snapshots on a given node

func (*Client) RemoveSnapshot

func (c *Client) RemoveSnapshot(ctx context.Context, node *entity.Node, tag string) error

RemoveSnapshot removes a snapshot by tag

func (*Client) Repair

func (c *Client) Repair(ctx context.Context, node *entity.Node) (entity.RepairResult, error)

Repair executes `nodetool repair --partitioner-range` see https://docs.scylladb.com/operating-scylla/nodetool-commands/repair/

Jump to

Keyboard shortcuts

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