action

package
v0.0.0-...-fbe4266 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package action implements the viam-labs.services.action API

Index

Constants

This section is empty.

Variables

View Source
var API = resource.APINamespace("viam-labs").WithServiceType("action")

API is the full API definition.

Functions

func Named

func Named(name string) resource.Name

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

func NewRPCServiceServer

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

NewRPCServiceServer returns a new RPC server for the Action API.

Types

type Action

type Action interface {
	resource.Resource
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	IsRunning(ctx context.Context) (bool, error)
	Status(ctx context.Context) (map[string]*structpb.Value, error)
}

Action defines the Go interface for the component (should match the protobuf methods.)

func FromRobot

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

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

func NewClientFromConn

func NewClientFromConn(conn rpc.ClientConn, remoteName string, name resource.Name, logger logging.Logger) Action

NewClientFromConn creates a new Action RPC client from an existing connection.

Directories

Path Synopsis
Package action_api is a reverse proxy.
Package action_api is a reverse proxy.

Jump to

Keyboard shortcuts

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