sshexec

package
v2.0.3-dev+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VGDISPLAY_SIZE_KB                  = 11
	VGDISPLAY_PHYSICAL_EXTENT_SIZE     = 12
	VGDISPLAY_TOTAL_NUMBER_EXTENTS     = 13
	VGDISPLAY_ALLOCATED_NUMBER_EXTENTS = 14
	VGDISPLAY_FREE_NUMBER_EXTENTS      = 15
)

Variables

View Source
var (
	ErrSshPrivateKey = errors.New("Unable to read private key file")
)

Functions

This section is empty.

Types

type RemoteCommandTransport

type RemoteCommandTransport interface {
	RemoteCommandExecute(host string, commands []string, timeoutMinutes int) ([]string, error)
}

type SshConfig

type SshConfig struct {
	PrivateKeyFile string `json:"keyfile"`
	User           string `json:"user"`
	Port           string `json:"port"`
	Fstab          string `json:"fstab"`

	// Experimental Settings
	RebalanceOnExpansion bool `json:"rebalance_on_expansion"`
}

type SshExecutor

type SshExecutor struct {
	// "Public"
	Throttlemap    map[string]chan bool
	Lock           sync.Mutex
	RemoteExecutor RemoteCommandTransport
	Fstab          string
	// contains filtered or unexported fields
}

func NewSshExecutor

func NewSshExecutor(config *SshConfig) (*SshExecutor, error)

func (*SshExecutor) AccessConnection

func (s *SshExecutor) AccessConnection(host string)

func (*SshExecutor) BrickCreate

func (s *SshExecutor) BrickCreate(host string,
	brick *executors.BrickRequest) (*executors.BrickInfo, error)

func (*SshExecutor) BrickDestroy

func (s *SshExecutor) BrickDestroy(host string,
	brick *executors.BrickRequest) error

func (*SshExecutor) BrickDestroyCheck

func (s *SshExecutor) BrickDestroyCheck(host string,
	brick *executors.BrickRequest) error

func (*SshExecutor) DeviceSetup

func (s *SshExecutor) DeviceSetup(host, device, vgid string) (d *executors.DeviceInfo, e error)

func (*SshExecutor) DeviceTeardown

func (s *SshExecutor) DeviceTeardown(host, device, vgid string) error

func (*SshExecutor) FreeConnection

func (s *SshExecutor) FreeConnection(host string)

func (*SshExecutor) PeerDetach

func (s *SshExecutor) PeerDetach(host, detachnode string) error

func (*SshExecutor) PeerProbe

func (s *SshExecutor) PeerProbe(host, newnode string) error

func (*SshExecutor) RemoteCommandExecute

func (s *SshExecutor) RemoteCommandExecute(host string,
	commands []string,
	timeoutMinutes int) ([]string, error)

func (*SshExecutor) SetLogLevel

func (s *SshExecutor) SetLogLevel(level string)

func (*SshExecutor) VolumeCreate

func (s *SshExecutor) VolumeCreate(host string,
	volume *executors.VolumeRequest) (*executors.VolumeInfo, error)

func (*SshExecutor) VolumeDestroy

func (s *SshExecutor) VolumeDestroy(host string, volume string) error

func (*SshExecutor) VolumeDestroyCheck

func (s *SshExecutor) VolumeDestroyCheck(host, volume string) error

func (*SshExecutor) VolumeExpand

func (s *SshExecutor) VolumeExpand(host string,
	volume *executors.VolumeRequest) (*executors.VolumeInfo, error)

type Ssher

type Ssher interface {
	ConnectAndExec(host string, commands []string, timeoutMinutes int, useSudo bool) ([]string, error)
}

Jump to

Keyboard shortcuts

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