trace

package
v1.7.0-dev-20191021 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 25 Imported by: 3 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package trace holds the code for taking a capture in the robot system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, store *stash.Client, manager Manager, tempDir file.Path) error

Run starts new trace client if any hardware is available.

func Serve

func Serve(ctx context.Context, grpcServer *grpc.Server, manager Manager) error

Serve wraps a manager in a grpc server.

Types

type ActionHandler

type ActionHandler func(context.Context, *Action) error

ActionHandler is a function that handles a stream of Actions.

type Manager

type Manager interface {
	// Search invokes handler with each output that matches the query.
	Search(ctx context.Context, query *search.Query, handler ActionHandler) error
	// Register a handler that will accept incoming tasks.
	Register(ctx context.Context, host *device.Instance, target *device.Instance, handler TaskHandler) error
	// Do asks the manager to send a task to a device.
	Do(ctx context.Context, device string, input *Input) (string, error)
	// Update adjusts the state of an action.
	Update(ctx context.Context, action string, status job.Status, output *Output) error
}

Manager is the interface to a trace manager.

func NewLocal

func NewLocal(ctx context.Context, library record.Library, jobManager job.Manager) (Manager, error)

NewLocal builds a new local manager.

func NewRemote

func NewRemote(ctx context.Context, conn *grpc.ClientConn) Manager

NewRemote returns a Worker that talks to a remote grpc trace service.

type TaskHandler

type TaskHandler func(context.Context, *Task) error

TaskHandler is a function that handles a stream of Tasks.

Jump to

Keyboard shortcuts

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