api

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyInitialized = status.Error(codes.FailedPrecondition, "already initialized")
	ErrNotInitialized     = status.Error(codes.FailedPrecondition, "not initialized")
)

Functions

func DefaultConn

func DefaultConn() (*grpc.ClientConn, error)

func NewClientConn

func NewClientConn(target string, dialer Dialer) (*grpc.ClientConn, error)

func Serve

func Serve(ctx context.Context, hv hypervisor.Hypervisor) error

Types

type Client

type Client interface {
	Init(ctx context.Context, config []byte) error
	Shutdown(ctx context.Context) error
	Create(ctx context.Context, name string, slot *int32) (vm hypervisor.VirtualMachine, stompedVmId *string, err error)
	Delete(ctx context.Context, id string) error
	List(ctx context.Context) ([]hypervisor.VirtualMachine, error)
	Close() error
}

func New

func New(c *grpc.ClientConn) Client

type Dialer

type Dialer func(ctx context.Context, network, address string) (net.Conn, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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