client

package
v0.0.0-...-0b75b2d Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 19 Imported by: 8

Documentation

Index

Constants

View Source
const (
	UnixSocketScheme  = "unix"
	VSockSocketScheme = "vsock"
	HybridVSockScheme = "hvsock"
)

Variables

This section is empty.

Functions

func HybridVSockDialer

func HybridVSockDialer(sock string, timeout time.Duration) (net.Conn, error)

HybridVSockDialer dials to a hybrid virtio socket

Types

type AgentClient

type AgentClient struct {
	agentgrpc.AgentServiceClient
	agentgrpc.HealthClient
	// contains filtered or unexported fields
}

AgentClient is an agent gRPC client connection wrapper for agentgrpc.AgentServiceClient

func NewAgentClient

func NewAgentClient(ctx context.Context, sock string, enableYamux bool) (*AgentClient, error)

NewAgentClient creates a new agent gRPC client and handles both unix and vsock addresses.

Supported sock address formats are:

  • unix://<unix socket path>
  • vsock://<cid>:<port>
  • <unix socket path>
  • hvsock://<path>:<port>. Firecracker implements the virtio-vsock device model, and mediates communication between AF_UNIX sockets (on the host end) and AF_VSOCK sockets (on the guest end).

func (*AgentClient) Close

func (c *AgentClient) Close() error

Close an existing connection to the agent gRPC server.

Jump to

Keyboard shortcuts

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