nodetool

package
v0.70.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nodetool

type Nodetool struct {
	// contains filtered or unexported fields
}

Nodetool provides an interface to nodetool functions running on Cassandra pods within a Kubernetes cluster.

func New

func New(kubeClientset *kubernetes.Clientset, restConfig *rest.Config) *Nodetool

New creates a new Nodetool using the supplied client and REST configuration to connect to Kubernetes.

func (*Nodetool) CreateSnapshot

func (n *Nodetool) CreateSnapshot(snapshotTimestamp time.Time, keyspaces []string, pod *v1.Pod, snapshotCreationTimeout time.Duration) error

CreateSnapshot creates a Snapshot on a given Pod, covering a supplied set of keyspaces and with a name derived from a timestamp.

func (*Nodetool) DeleteSnapshot

func (n *Nodetool) DeleteSnapshot(pod *v1.Pod, snapshot *Snapshot, timeout time.Duration) error

DeleteSnapshot deletes the given Snapshot from the given Pod.

func (*Nodetool) GetSnapshots

func (n *Nodetool) GetSnapshots(pod *v1.Pod, timeout time.Duration, filter SnapshotFilter) ([]Snapshot, error)

GetSnapshots returns the Snapshots found on a given Pod, filtered through the supplied SnapshotFilter.

type Snapshot

type Snapshot struct {
	Name         string
	Keyspace     string
	ColumnFamily string
}

Snapshot describes properties which identify a keyspace snapshot.

type SnapshotFilter

type SnapshotFilter func([]Snapshot) []Snapshot

SnapshotFilter is an interface describing a function which allows Snapshots to be filtered based on particular properties.

Jump to

Keyboard shortcuts

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