auto

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0 Imports: 14 Imported by: 2

Documentation

Overview

Package auto provides methods for creating a simulation target based on auto discovery of drivers via gRPC

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auto

type Auto struct {
	Target *target.Target
	Conns  []*grpc.ClientConn
	// contains filtered or unexported fields
}

An Auto contains the state of autodiscovery of device plugins

func New

func New(opt Opt) (ret *Auto, err error)

New makes target by inspecting a set of gRPC network services for a list of drivers.

func (*Auto) Close

func (a *Auto) Close() error

Close releases any resources like network connections associated with auto-discovery state.

func (*Auto) Execute

func (a *Auto) Execute(ctx context.Context, inst ast.Inst) error

Execute runs an instruction based on current target

func (*Auto) Pretty

func (a *Auto) Pretty(inst ast.Inst) string

Pretty returns a human description of instruction

type Endpoint

type Endpoint struct {
	URI string
	Arg interface{}
}

An Endpoint is a network address of a device plugin (driver)

type Opt

type Opt struct {
	Endpoints []Endpoint
	MaybeArgs []interface{}
}

An Opt are options for connecting to a set of device plugins (drivers)

Jump to

Keyboard shortcuts

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