ops

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2019 PingCAP, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 PingCAP, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 PingCAP, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, See the License for the specific language governing permissions and limitations under the License.

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) 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