subject

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 13 Imported by: 3 modules, 6 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 subject holds the code for handling tracable applications in the robot system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, grpcServer *grpc.Server, subjects Subjects) error

Serve wraps a subject service in a grpc server.

Types

type Handler

type Handler func(context.Context, *Subject) error

Handler is a function that handles a stream of Subjects.

type Subjects

type Subjects interface {
	// Search returns a iterator of matching subjects from the store.
	Search(context.Context, *search.Query, Handler) error
	// Add adds a new subject to the set.
	Add(ctx context.Context, id string, obbID string, hints *Hints) (*Subject, bool, error)
	// Update changes the values of a subject.
	Update(ctx context.Context, subj *Subject) (*Subject, error)
}

Subjects is the interface to a subject manager.

func NewLocal

func NewLocal(ctx context.Context, library record.Library, store *stash.Client) (Subjects, error)

NewLocal returns a new persistent store of Subjects.

func NewRemote

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

NewRemote returns a Subjects that talks to a remote grpc Subject service.

Jump to

Keyboard shortcuts

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