Documentation
¶
Overview ¶
Package button defines a button on your machine.
Package button contains a gRPC based button client.
Package button contains a gRPC based button service server.
Index ¶
Constants ¶
const SubtypeName = "button"
SubtypeName is a constant that identifies the component resource API string.
Variables ¶
var API = resource.APINamespaceRDK.WithComponentType(SubtypeName)
API is a variable that identifies the component resource API.
Functions ¶
func Named ¶
func Named(name string) resource.Name
Named is a helper for getting the named grippers's typed resource name.
func NamesFromRobot ¶
func NamesFromRobot(r robot.Robot) []string
NamesFromRobot is a helper for getting all gripper names from the given Robot.
func NewRPCServiceServer ¶
func NewRPCServiceServer(coll resource.APIResourceCollection[Button]) interface{}
NewRPCServiceServer constructs an gripper gRPC service server. It is intentionally untyped to prevent use outside of tests.
Types ¶
type Button ¶
type Button interface {
resource.Resource
// Push pushes the button.
Push(ctx context.Context, extra map[string]interface{}) error
}
A Button represents a physical button.
func FromDependencies ¶
func FromDependencies(deps resource.Dependencies, name string) (Button, error)
FromDependencies is a helper for getting the named button component from a collection of dependencies.
func FromRobot ¶
func FromRobot(r robot.Robot, name string) (Button, error)
FromRobot is a helper for getting the named Button from the given Robot.
func NewClientFromConn ¶
func NewClientFromConn(
ctx context.Context,
conn rpc.ClientConn,
remoteName string,
name resource.Name,
logger logging.Logger,
) (Button, error)
NewClientFromConn constructs a new Client from connection passed in.