agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAndStartDevEnvDefaultStreamHandler

func BuildAndStartDevEnvDefaultStreamHandler(stream BuildAndStartDevEnvStream) error

func InitInstanceDefaultStreamHandler

func InitInstanceDefaultStreamHandler(stream InitInstanceStream) error

Types

type BuildAndStartDevEnvStream

type BuildAndStartDevEnvStream interface {
	Recv() (*proto.BuildAndStartDevEnvReply, error)
}

type Client

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

func NewClient

func NewClient(config ClientConfig) Client

func (Client) BuildAndStartDevEnv

func (c Client) BuildAndStartDevEnv(
	startDevEnvRequest *proto.BuildAndStartDevEnvRequest,
	streamHandler func(stream BuildAndStartDevEnvStream) error,
) error

func (Client) Execute

func (c Client) Execute(fnToExec func(agentGRPCClient proto.AgentClient) error) error

func (Client) InitInstance

func (c Client) InitInstance(
	initInstanceRequest *proto.InitInstanceRequest,
	streamHandler func(stream InitInstanceStream) error,
) error

type ClientBuilder

type ClientBuilder interface {
	Build(config ClientConfig) ClientInterface
}

type ClientConfig

type ClientConfig struct {
	ServerRootUser           string
	ServerSSHPrivateKeyBytes []byte
	ServerAddr               string
	LocalAddr                string
	RemoteAddrProtocol       string
	RemoteAddr               string
}

func NewDefaultClientConfig

func NewDefaultClientConfig(
	sshPrivateKeyBytes []byte,
	instancePublicIPAddress string,
) ClientConfig

type ClientInterface

type ClientInterface interface {
	InitInstance(
		initInstanceRequest *proto.InitInstanceRequest,
		streamHandler func(stream InitInstanceStream) error,
	) error

	BuildAndStartDevEnv(
		startDevEnvRequest *proto.BuildAndStartDevEnvRequest,
		streamHandler func(stream BuildAndStartDevEnvStream) error,
	) error
}

type DefaultClientBuilder

type DefaultClientBuilder struct{}

func NewDefaultClientBuilder

func NewDefaultClientBuilder() DefaultClientBuilder

func (DefaultClientBuilder) Build

type InitInstanceStream

type InitInstanceStream interface {
	Recv() (*proto.InitInstanceReply, error)
}

Jump to

Keyboard shortcuts

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