binary

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Overview

Package binary implements the runtime.Runtime interface using the binaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCluster

func NewCluster(name, workdir string) (runtime.Runtime, error)

NewCluster creates a new Runtime for binary

Types

type Cluster

type Cluster struct {
	*runtime.Cluster
}

Cluster is an implementation of Runtime for binary

func (*Cluster) AddContext added in v0.2.0

func (c *Cluster) AddContext(ctx context.Context, kubeconfigPath string) error

AddContext add the context of cluster to kubeconfig

func (*Cluster) Available added in v0.2.0

func (c *Cluster) Available(ctx context.Context) error

Available checks whether the runtime is available.

func (*Cluster) CollectLogs added in v0.3.0

func (c *Cluster) CollectLogs(ctx context.Context, dir string) error

CollectLogs returns the logs of the specified component.

func (*Cluster) Down

func (c *Cluster) Down(ctx context.Context) error

Down stops the cluster

func (*Cluster) EtcdctlInCluster added in v0.1.0

func (c *Cluster) EtcdctlInCluster(ctx context.Context, args ...string) error

EtcdctlInCluster implements the ectdctl subcommand

func (*Cluster) InitCRs added in v0.5.0

func (c *Cluster) InitCRs(ctx context.Context) error

InitCRs initializes the CRs.

func (*Cluster) Install

func (c *Cluster) Install(ctx context.Context) error

Install installs the cluster

func (*Cluster) ListBinaries

func (c *Cluster) ListBinaries(ctx context.Context) ([]string, error)

ListBinaries list binaries in the cluster

func (*Cluster) ListImages

func (c *Cluster) ListImages(ctx context.Context) ([]string, error)

ListImages list images in the cluster

func (*Cluster) Logs

func (c *Cluster) Logs(ctx context.Context, name string, out io.Writer) error

Logs returns the logs of the specified component.

func (*Cluster) LogsFollow

func (c *Cluster) LogsFollow(ctx context.Context, name string, out io.Writer) error

LogsFollow follows the logs of the component

func (*Cluster) Ready added in v0.3.0

func (c *Cluster) Ready(ctx context.Context) (bool, error)

Ready returns true if the cluster is ready

func (*Cluster) RemoveContext added in v0.2.0

func (c *Cluster) RemoveContext(ctx context.Context, kubeconfigPath string) error

RemoveContext remove the context of cluster from kubeconfig

func (*Cluster) SnapshotRestore

func (c *Cluster) SnapshotRestore(ctx context.Context, path string) error

SnapshotRestore restore the snapshot of cluster

func (*Cluster) SnapshotRestoreWithYAML added in v0.2.0

func (c *Cluster) SnapshotRestoreWithYAML(ctx context.Context, path string, conf runtime.SnapshotRestoreWithYAMLConfig) error

SnapshotRestoreWithYAML restore the snapshot of cluster

func (*Cluster) SnapshotSave

func (c *Cluster) SnapshotSave(ctx context.Context, path string) error

SnapshotSave save the snapshot of cluster

func (*Cluster) SnapshotSaveWithYAML added in v0.2.0

func (c *Cluster) SnapshotSaveWithYAML(ctx context.Context, path string, conf runtime.SnapshotSaveWithYAMLConfig) error

SnapshotSaveWithYAML save the snapshot of cluster

func (*Cluster) Start

func (c *Cluster) Start(ctx context.Context) error

Start starts the cluster

func (*Cluster) StartComponent added in v0.1.0

func (c *Cluster) StartComponent(ctx context.Context, name string) error

StartComponent starts a component in the cluster

func (*Cluster) Stop

func (c *Cluster) Stop(ctx context.Context) error

Stop stops the cluster

func (*Cluster) StopComponent added in v0.1.0

func (c *Cluster) StopComponent(ctx context.Context, name string) error

StopComponent stops a component in the cluster

func (*Cluster) Uninstall added in v0.1.0

func (c *Cluster) Uninstall(ctx context.Context) error

Uninstall uninstalls the cluster.

func (*Cluster) Up

func (c *Cluster) Up(ctx context.Context) error

Up starts the cluster.

func (*Cluster) WaitReady added in v0.3.0

func (c *Cluster) WaitReady(ctx context.Context, timeout time.Duration) error

WaitReady waits for the cluster to be ready.

Jump to

Keyboard shortcuts

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