helper

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CustomSSHPort = 2222
View Source
const StatePath = "state.json"

Variables

This section is empty.

Functions

func GenerateSSHKeyPair

func GenerateSSHKeyPair() (string, string, error)

func ResourceName

func ResourceName(jobID string) string

Types

type SSHClient

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

func NewSSHClient

func NewSSHClient(privateKeyStr, serverIP string, port uint16) (*SSHClient, error)

func (*SSHClient) Close

func (c *SSHClient) Close() error

func (*SSHClient) RunCommand

func (c *SSHClient) RunCommand(ctx context.Context, command string) error

type State

type State struct {
	SSHPrivateKey string
	ServerAddress string
}

func ReadStateFromFile

func ReadStateFromFile(path string) (*State, error)

func (*State) WriteToFile

func (s *State) WriteToFile(path string) error

Jump to

Keyboard shortcuts

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