ops

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollInterval = 10 * time.Second
	DefaultPollTimeout  = 10 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOps

type ClientOps struct {
	client.Client

	PollInterval *time.Duration
	PollTimeout  *time.Duration
}

func (*ClientOps) ExecWithOptions

func (cli *ClientOps) ExecWithOptions(options ExecOptions) (string, string, error)

ExecWithOptions executes a command in the specified container, returning stdout, stderr and error. `options` allowed for additional parameters to be passed.

func (*ClientOps) KillProcess

func (cli *ClientOps) KillProcess(ns string, pod string, container string, pname string) error

func (*ClientOps) Poll

func (cli *ClientOps) Poll(cond wait.ConditionFunc) error

func (*ClientOps) PollImmediate

func (cli *ClientOps) PollImmediate(cond wait.ConditionFunc) error

func (*ClientOps) PollPod

func (cli *ClientOps) PollPod(ns string, name string, cond func(po *corev1.Pod, err error) (bool, error)) error

func (*ClientOps) PollStatefulSet

func (cli *ClientOps) PollStatefulSet(ns string, name string, cond func(ss *appsv1.StatefulSet, err error) (bool, error)) error

func (*ClientOps) PollTiDBCluster

func (cli *ClientOps) PollTiDBCluster(ns string, name string, cond func(tc *v1alpha1.TidbCluster, err error) (bool, error)) error

func (*ClientOps) SetPoll

func (cli *ClientOps) SetPoll(interval time.Duration, timeout time.Duration)

type ExecOptions

type ExecOptions struct {
	Command []string

	Namespace     string
	PodName       string
	ContainerName string

	Stdin         io.Reader
	CaptureStdout bool
	CaptureStderr bool
	// If false, whitespace in std{err,out} will be removed.
	PreserveWhitespace bool
}

ExecOptions passed to ExecWithOptions

type TiKVOps

type TiKVOps struct {
	ClientOps
}

func (*TiKVOps) RecoverSSTFile

func (ops *TiKVOps) RecoverSSTFile(ns, podName string) error

func (*TiKVOps) TruncateSSTFile

func (ops *TiKVOps) TruncateSSTFile(opts TruncateOptions) error

type TruncateOptions

type TruncateOptions struct {
	Namespace string
	Cluster   string
	Store     string
}

Jump to

Keyboard shortcuts

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