Documentation ¶
Overview ¶
Package cloud implements a service to grab gRPC connections to talk to a cloud service that manages robots.
Index ¶
Constants ¶
const SubtypeName = "cloud_connection"
SubtypeName is a constant that identifies the internal cloud connection resource subtype string.
Variables ¶
var API = resource.APINamespaceRDKInternal.WithServiceType(SubtypeName)
API is the fully qualified API for the internal cloud connection service.
var ErrNotCloudManaged = errors.New("this robot is not cloud managed")
ErrNotCloudManaged is returned if a connection is requested but the robot is not yet cloud managed.
var InternalServiceName = resource.NewName(API, "builtin")
InternalServiceName is used to refer to/depend on this service internally.
Functions ¶
This section is empty.
Types ¶
type ConnectionService ¶
type ConnectionService interface { resource.Resource AcquireConnection(ctx context.Context) (string, rpc.ClientConn, error) AcquireConnectionAPIKey(ctx context.Context, apiKey, apiKeyID string) (string, rpc.ClientConn, error) }
A ConnectionService supplies connections to a cloud service managing robots. Each connection should be closed when its not be used anymore.
func NewCloudConnectionService ¶
func NewCloudConnectionService(cfg *config.Cloud, logger logging.Logger) ConnectionService
NewCloudConnectionService makes a new cloud connection service to get gRPC connections to a cloud service managing robots.