generic

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: AGPL-3.0 Imports: 8 Imported by: 14

Documentation

Overview

Package generic contains a gRPC based generic client.

Package generic defines an abstract generic device and DoCommand() method

Package generic contains a gRPC based generic service serviceServer.

Index

Constants

View Source
const SubtypeName = "generic"

SubtypeName is a constant that identifies the component resource API string "Generic".

Variables

View Source
var API = resource.APINamespaceRDK.WithComponentType(SubtypeName)

API is a variable that identifies the component resource API.

Functions

func FromRobot

func FromRobot(r robot.Robot, name string) (resource.Resource, error)

FromRobot is a helper for getting the named Generic from the given Robot.

func Named

func Named(name string) resource.Name

Named is a helper for getting the named Generic's typed resource name.

func NamesFromRobot

func NamesFromRobot(r robot.Robot) []string

NamesFromRobot is a helper for getting all generic names from the given Robot.

func NewClientFromConn

func NewClientFromConn(
	ctx context.Context,
	conn rpc.ClientConn,
	remoteName string,
	name resource.Name,
	logger logging.Logger,
) (resource.Resource, error)

NewClientFromConn constructs a new Client from connection passed in.

func NewRPCServiceServer added in v0.2.36

func NewRPCServiceServer(coll resource.APIResourceCollection[resource.Resource]) interface{}

NewRPCServiceServer constructs an generic gRPC service serviceServer.

Types

This section is empty.

Directories

Path Synopsis
Package fake implements a fake generic component.
Package fake implements a fake generic component.
Package register registers the generic component
Package register registers the generic component

Jump to

Keyboard shortcuts

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