Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAgentDeviceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAgentDeviceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentDeviceServiceClient) error
- func RegisterAgentDeviceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAgentDeviceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentDeviceServiceServer) error
- func RegisterAgentDeviceServiceServer(s grpc.ServiceRegistrar, srv AgentDeviceServiceServer)
- type AgentDeviceServiceClient
- type AgentDeviceServiceServer
- type DeviceAgentConfigRequest
- func (*DeviceAgentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeviceAgentConfigRequest) GetHostInfo() *HostInfo
- func (x *DeviceAgentConfigRequest) GetId() string
- func (x *DeviceAgentConfigRequest) GetSubsystemVersions() map[string]string
- func (*DeviceAgentConfigRequest) ProtoMessage()
- func (x *DeviceAgentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *DeviceAgentConfigRequest) Reset()
- func (x *DeviceAgentConfigRequest) String() string
- type DeviceAgentConfigResponse
- func (*DeviceAgentConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeviceAgentConfigResponse) GetCheckInterval() *durationpb.Duration
- func (x *DeviceAgentConfigResponse) GetSubsystemConfigs() map[string]*DeviceSubsystemConfig
- func (*DeviceAgentConfigResponse) ProtoMessage()
- func (x *DeviceAgentConfigResponse) ProtoReflect() protoreflect.Message
- func (x *DeviceAgentConfigResponse) Reset()
- func (x *DeviceAgentConfigResponse) String() string
- type DeviceSubsystemConfig
- func (*DeviceSubsystemConfig) Descriptor() ([]byte, []int)deprecated
- func (x *DeviceSubsystemConfig) GetAttributes() *structpb.Struct
- func (x *DeviceSubsystemConfig) GetDisable() bool
- func (x *DeviceSubsystemConfig) GetForceRestart() bool
- func (x *DeviceSubsystemConfig) GetUpdateInfo() *SubsystemUpdateInfo
- func (*DeviceSubsystemConfig) ProtoMessage()
- func (x *DeviceSubsystemConfig) ProtoReflect() protoreflect.Message
- func (x *DeviceSubsystemConfig) Reset()
- func (x *DeviceSubsystemConfig) String() string
- type HostInfo
- func (*HostInfo) Descriptor() ([]byte, []int)deprecated
- func (x *HostInfo) GetDistro() string
- func (x *HostInfo) GetPlatform() string
- func (x *HostInfo) GetTags() []string
- func (*HostInfo) ProtoMessage()
- func (x *HostInfo) ProtoReflect() protoreflect.Message
- func (x *HostInfo) Reset()
- func (x *HostInfo) String() string
- type PackageFormat
- func (PackageFormat) Descriptor() protoreflect.EnumDescriptor
- func (x PackageFormat) Enum() *PackageFormat
- func (PackageFormat) EnumDescriptor() ([]byte, []int)deprecated
- func (x PackageFormat) Number() protoreflect.EnumNumber
- func (x PackageFormat) String() string
- func (PackageFormat) Type() protoreflect.EnumType
- type SubsystemUpdateInfo
- func (*SubsystemUpdateInfo) Descriptor() ([]byte, []int)deprecated
- func (x *SubsystemUpdateInfo) GetFilename() string
- func (x *SubsystemUpdateInfo) GetFormat() PackageFormat
- func (x *SubsystemUpdateInfo) GetSha256() []byte
- func (x *SubsystemUpdateInfo) GetUrl() string
- func (x *SubsystemUpdateInfo) GetVersion() string
- func (*SubsystemUpdateInfo) ProtoMessage()
- func (x *SubsystemUpdateInfo) ProtoReflect() protoreflect.Message
- func (x *SubsystemUpdateInfo) Reset()
- func (x *SubsystemUpdateInfo) String() string
- type UnimplementedAgentDeviceServiceServer
- type UnsafeAgentDeviceServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( PackageFormat_name = map[int32]string{ 0: "PACKAGE_FORMAT_UNSPECIFIED", 1: "PACKAGE_FORMAT_RAW", 2: "PACKAGE_FORMAT_XZ", 3: "PACKAGE_FORMAT_EXECUTABLE", 4: "PACKAGE_FORMAT_XZ_EXECUTABLE", } PackageFormat_value = map[string]int32{ "PACKAGE_FORMAT_UNSPECIFIED": 0, "PACKAGE_FORMAT_RAW": 1, "PACKAGE_FORMAT_XZ": 2, "PACKAGE_FORMAT_EXECUTABLE": 3, "PACKAGE_FORMAT_XZ_EXECUTABLE": 4, } )
Enum value maps for PackageFormat.
var AgentDeviceService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "viam.app.agent.v1.AgentDeviceService", HandlerType: (*AgentDeviceServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DeviceAgentConfig", Handler: _AgentDeviceService_DeviceAgentConfig_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "app/agent/v1/agent.proto", }
AgentDeviceService_ServiceDesc is the grpc.ServiceDesc for AgentDeviceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_app_agent_v1_agent_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAgentDeviceServiceHandler ¶
func RegisterAgentDeviceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAgentDeviceServiceHandler registers the http handlers for service AgentDeviceService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAgentDeviceServiceHandlerClient ¶
func RegisterAgentDeviceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentDeviceServiceClient) error
RegisterAgentDeviceServiceHandlerClient registers the http handlers for service AgentDeviceService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentDeviceServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentDeviceServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AgentDeviceServiceClient" to call the correct interceptors.
func RegisterAgentDeviceServiceHandlerFromEndpoint ¶
func RegisterAgentDeviceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAgentDeviceServiceHandlerFromEndpoint is same as RegisterAgentDeviceServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAgentDeviceServiceHandlerServer ¶
func RegisterAgentDeviceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentDeviceServiceServer) error
RegisterAgentDeviceServiceHandlerServer registers the http handlers for service AgentDeviceService to "mux". UnaryRPC :call AgentDeviceServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentDeviceServiceHandlerFromEndpoint instead.
func RegisterAgentDeviceServiceServer ¶
func RegisterAgentDeviceServiceServer(s grpc.ServiceRegistrar, srv AgentDeviceServiceServer)
Types ¶
type AgentDeviceServiceClient ¶
type AgentDeviceServiceClient interface { // DeviceAgentConfig is for retrieving config by the on-device agent. DeviceAgentConfig(ctx context.Context, in *DeviceAgentConfigRequest, opts ...grpc.CallOption) (*DeviceAgentConfigResponse, error) }
AgentDeviceServiceClient is the client API for AgentDeviceService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAgentDeviceServiceClient ¶
func NewAgentDeviceServiceClient(cc grpc.ClientConnInterface) AgentDeviceServiceClient
type AgentDeviceServiceServer ¶
type AgentDeviceServiceServer interface { // DeviceAgentConfig is for retrieving config by the on-device agent. DeviceAgentConfig(context.Context, *DeviceAgentConfigRequest) (*DeviceAgentConfigResponse, error) // contains filtered or unexported methods }
AgentDeviceServiceServer is the server API for AgentDeviceService service. All implementations must embed UnimplementedAgentDeviceServiceServer for forward compatibility
type DeviceAgentConfigRequest ¶
type DeviceAgentConfigRequest struct { // robot partID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // info about the host system HostInfo *HostInfo `protobuf:"bytes,2,opt,name=host_info,json=hostInfo,proto3" json:"host_info,omitempty"` // current subsystems and versions SubsystemVersions map[string]string `` /* 200-byte string literal not displayed */ // contains filtered or unexported fields }
Device side
func (*DeviceAgentConfigRequest) Descriptor
deprecated
func (*DeviceAgentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeviceAgentConfigRequest.ProtoReflect.Descriptor instead.
func (*DeviceAgentConfigRequest) GetHostInfo ¶
func (x *DeviceAgentConfigRequest) GetHostInfo() *HostInfo
func (*DeviceAgentConfigRequest) GetId ¶
func (x *DeviceAgentConfigRequest) GetId() string
func (*DeviceAgentConfigRequest) GetSubsystemVersions ¶
func (x *DeviceAgentConfigRequest) GetSubsystemVersions() map[string]string
func (*DeviceAgentConfigRequest) ProtoMessage ¶
func (*DeviceAgentConfigRequest) ProtoMessage()
func (*DeviceAgentConfigRequest) ProtoReflect ¶
func (x *DeviceAgentConfigRequest) ProtoReflect() protoreflect.Message
func (*DeviceAgentConfigRequest) Reset ¶
func (x *DeviceAgentConfigRequest) Reset()
func (*DeviceAgentConfigRequest) String ¶
func (x *DeviceAgentConfigRequest) String() string
type DeviceAgentConfigResponse ¶
type DeviceAgentConfigResponse struct { // subsystems to be installed/configured/updated // note: previously installed subsystems will be removed from the system if removed from this list SubsystemConfigs map[string]*DeviceSubsystemConfig `` /* 197-byte string literal not displayed */ // how often this request should be repeated CheckInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=check_interval,json=checkInterval,proto3" json:"check_interval,omitempty"` // contains filtered or unexported fields }
func (*DeviceAgentConfigResponse) Descriptor
deprecated
func (*DeviceAgentConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeviceAgentConfigResponse.ProtoReflect.Descriptor instead.
func (*DeviceAgentConfigResponse) GetCheckInterval ¶
func (x *DeviceAgentConfigResponse) GetCheckInterval() *durationpb.Duration
func (*DeviceAgentConfigResponse) GetSubsystemConfigs ¶
func (x *DeviceAgentConfigResponse) GetSubsystemConfigs() map[string]*DeviceSubsystemConfig
func (*DeviceAgentConfigResponse) ProtoMessage ¶
func (*DeviceAgentConfigResponse) ProtoMessage()
func (*DeviceAgentConfigResponse) ProtoReflect ¶
func (x *DeviceAgentConfigResponse) ProtoReflect() protoreflect.Message
func (*DeviceAgentConfigResponse) Reset ¶
func (x *DeviceAgentConfigResponse) Reset()
func (*DeviceAgentConfigResponse) String ¶
func (x *DeviceAgentConfigResponse) String() string
type DeviceSubsystemConfig ¶
type DeviceSubsystemConfig struct { // data needed to download/validate the subsystem UpdateInfo *SubsystemUpdateInfo `protobuf:"bytes,1,opt,name=update_info,json=updateInfo,proto3" json:"update_info,omitempty"` // if this subsystem is disabled and should not be started by the agent Disable bool `protobuf:"varint,2,opt,name=disable,proto3" json:"disable,omitempty"` // force_restart will restart the subsystem, even if no updates are available ForceRestart bool `protobuf:"varint,3,opt,name=force_restart,json=forceRestart,proto3" json:"force_restart,omitempty"` // arbitrary config sections Attributes *structpb.Struct `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"` // contains filtered or unexported fields }
func (*DeviceSubsystemConfig) Descriptor
deprecated
func (*DeviceSubsystemConfig) Descriptor() ([]byte, []int)
Deprecated: Use DeviceSubsystemConfig.ProtoReflect.Descriptor instead.
func (*DeviceSubsystemConfig) GetAttributes ¶ added in v0.1.254
func (x *DeviceSubsystemConfig) GetAttributes() *structpb.Struct
func (*DeviceSubsystemConfig) GetDisable ¶
func (x *DeviceSubsystemConfig) GetDisable() bool
func (*DeviceSubsystemConfig) GetForceRestart ¶
func (x *DeviceSubsystemConfig) GetForceRestart() bool
func (*DeviceSubsystemConfig) GetUpdateInfo ¶
func (x *DeviceSubsystemConfig) GetUpdateInfo() *SubsystemUpdateInfo
func (*DeviceSubsystemConfig) ProtoMessage ¶
func (*DeviceSubsystemConfig) ProtoMessage()
func (*DeviceSubsystemConfig) ProtoReflect ¶
func (x *DeviceSubsystemConfig) ProtoReflect() protoreflect.Message
func (*DeviceSubsystemConfig) Reset ¶
func (x *DeviceSubsystemConfig) Reset()
func (*DeviceSubsystemConfig) String ¶
func (x *DeviceSubsystemConfig) String() string
type HostInfo ¶
type HostInfo struct { // platform is the docker styled combination of kernel and architecture. Ex: linux/amd64, darwin/arm64 Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` // ID and VERSION_ID fields from /etc/os-release, colon seperated. Ex: ubuntu:22.04, debian:11 Distro string `protobuf:"bytes,2,opt,name=distro,proto3" json:"distro,omitempty"` // additional tags for specific hardware or software that's present and may affect software selection // ex: "jetson", "rpi4", "systemd", etc. Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` // contains filtered or unexported fields }
func (*HostInfo) Descriptor
deprecated
func (*HostInfo) GetPlatform ¶
func (*HostInfo) ProtoMessage ¶
func (*HostInfo) ProtoMessage()
func (*HostInfo) ProtoReflect ¶
func (x *HostInfo) ProtoReflect() protoreflect.Message
type PackageFormat ¶
type PackageFormat int32
const ( // unknown/unset (autodetection may be attempted) PackageFormat_PACKAGE_FORMAT_UNSPECIFIED PackageFormat = 0 // do nothing PackageFormat_PACKAGE_FORMAT_RAW PackageFormat = 1 // decompress .xz file PackageFormat_PACKAGE_FORMAT_XZ PackageFormat = 2 // set executable permissions PackageFormat_PACKAGE_FORMAT_EXECUTABLE PackageFormat = 3 // decompress and set executable PackageFormat_PACKAGE_FORMAT_XZ_EXECUTABLE PackageFormat = 4 )
func (PackageFormat) Descriptor ¶
func (PackageFormat) Descriptor() protoreflect.EnumDescriptor
func (PackageFormat) Enum ¶
func (x PackageFormat) Enum() *PackageFormat
func (PackageFormat) EnumDescriptor
deprecated
func (PackageFormat) EnumDescriptor() ([]byte, []int)
Deprecated: Use PackageFormat.Descriptor instead.
func (PackageFormat) Number ¶
func (x PackageFormat) Number() protoreflect.EnumNumber
func (PackageFormat) String ¶
func (x PackageFormat) String() string
func (PackageFormat) Type ¶
func (PackageFormat) Type() protoreflect.EnumType
type SubsystemUpdateInfo ¶
type SubsystemUpdateInfo struct { // unpacked filename as it is expected on disk (regardless of url) Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // url to download from Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // version expected at the url Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // sha256 sum of file as downloaded Sha256 []byte `protobuf:"bytes,4,opt,name=sha256,proto3" json:"sha256,omitempty"` // determines if decompression or executable permissions are needed Format PackageFormat `protobuf:"varint,5,opt,name=format,proto3,enum=viam.app.agent.v1.PackageFormat" json:"format,omitempty"` // contains filtered or unexported fields }
func (*SubsystemUpdateInfo) Descriptor
deprecated
func (*SubsystemUpdateInfo) Descriptor() ([]byte, []int)
Deprecated: Use SubsystemUpdateInfo.ProtoReflect.Descriptor instead.
func (*SubsystemUpdateInfo) GetFilename ¶
func (x *SubsystemUpdateInfo) GetFilename() string
func (*SubsystemUpdateInfo) GetFormat ¶
func (x *SubsystemUpdateInfo) GetFormat() PackageFormat
func (*SubsystemUpdateInfo) GetSha256 ¶
func (x *SubsystemUpdateInfo) GetSha256() []byte
func (*SubsystemUpdateInfo) GetUrl ¶
func (x *SubsystemUpdateInfo) GetUrl() string
func (*SubsystemUpdateInfo) GetVersion ¶
func (x *SubsystemUpdateInfo) GetVersion() string
func (*SubsystemUpdateInfo) ProtoMessage ¶
func (*SubsystemUpdateInfo) ProtoMessage()
func (*SubsystemUpdateInfo) ProtoReflect ¶
func (x *SubsystemUpdateInfo) ProtoReflect() protoreflect.Message
func (*SubsystemUpdateInfo) Reset ¶
func (x *SubsystemUpdateInfo) Reset()
func (*SubsystemUpdateInfo) String ¶
func (x *SubsystemUpdateInfo) String() string
type UnimplementedAgentDeviceServiceServer ¶
type UnimplementedAgentDeviceServiceServer struct { }
UnimplementedAgentDeviceServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAgentDeviceServiceServer) DeviceAgentConfig ¶
func (UnimplementedAgentDeviceServiceServer) DeviceAgentConfig(context.Context, *DeviceAgentConfigRequest) (*DeviceAgentConfigResponse, error)
type UnsafeAgentDeviceServiceServer ¶
type UnsafeAgentDeviceServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAgentDeviceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentDeviceServiceServer will result in compilation errors.