canoe

package module
v0.0.0-...-b27c934 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 15 Imported by: 0

README

canoe

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deploy

func Deploy() error

Types

type Client

type Client struct {
	DockerLocal  *docker.Client
	DockerRemote *docker.Client
	SSH          *ssh.Client
	SFTP         *sftp.Client
}

func NewClient

func NewClient(cfg Config) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) CopyDockerImageToRemote

func (c *Client) CopyDockerImageToRemote(ctx context.Context, imageID string) error

func (*Client) GetLocatImageID

func (c *Client) GetLocatImageID(ctx context.Context, image string) (string, error)

func (*Client) GetRemoteContainerByPort

func (c *Client) GetRemoteContainerByPort(ctx context.Context, port int) (string, error)

func (*Client) StartRemoteContainer

func (c *Client) StartRemoteContainer(ctx context.Context, imageName, containerName string, privatePort, publishPort int) error

func (*Client) StopRemoteContainer

func (c *Client) StopRemoteContainer(ctx context.Context, containerID string) error

type Config

type Config struct {
	SSH SSHConfig
}

func LoadConfig

func LoadConfig(sshhost string) (Config, error)

func (Config) SSHURL

func (cfg Config) SSHURL() string

type SSHConfig

type SSHConfig struct {
	Host           string
	User           string
	Port           string
	PrivateKeyPath string
}

func LoadSSHConfig

func LoadSSHConfig(host string) (SSHConfig, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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