Documentation ¶
Overview ¶
Package web provides gRPC/REST/GUI APIs to control and monitor a robot.
Index ¶
Constants ¶
const SubtypeName = "web"
SubtypeName is a constant that identifies the internal web resource subtype string.
Variables ¶
var API = resource.APINamespaceRDKInternal.WithServiceType(SubtypeName)
API is the fully qualified API for the internal web service.
var InternalServiceName = resource.NewName(API, "builtin")
InternalServiceName is used to refer to/depend on this service internally.
Functions ¶
Types ¶
type AppTemplateData ¶ added in v0.2.2
type AppTemplateData struct { WebRTCEnabled bool `json:"webrtc_enabled"` WebRTCSignalingAddress string `json:"webrtc_signaling_address"` Env string `json:"env"` Host string `json:"host"` StaticHost string `json:"static_host"` SupportedAuthTypes []string `json:"supported_auth_types"` AuthEntity string `json:"auth_entity"` BakedAuth map[string]interface{} `json:"baked_auth"` }
AppTemplateData is used to render the remote control page.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures how we set up the web service. Cribbed from https://github.com/grpc/grpc-go/blob/aff571cc86e6e7e740130dbbb32a9741558db805/dialoptions.go#L41
func WithStreamConfig ¶
func WithStreamConfig(config gostream.StreamConfig) Option
WithStreamConfig returns an Option which sets the streamConfig used to enable audio/video streaming over WebRTC.
type RestartStatusResponse ¶ added in v0.51.0
type RestartStatusResponse struct { // RestartAllowed represents whether this instance of the viam-server can be // safely restarted. RestartAllowed bool `json:"restart_allowed"` }
RestartStatusResponse is the JSON response of the `restart_status` HTTP endpoint.
type Service ¶
type Service interface { resource.Resource // Start starts the web server Start(context.Context, weboptions.Options) error // Stop stops the main web service (but leaves module server socket running.) Stop() // StartModule starts the module server socket. StartModule(context.Context) error // Returns the address and port the web service listens on. Address() string // Returns the unix socket path the module server listens on. ModuleAddress() string }
A Service controls the web server for a robot.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package weboptions provides Options for configuring a web server
|
Package weboptions provides Options for configuring a web server |
Package webstream provides controls for streaming from the web server.
|
Package webstream provides controls for streaming from the web server. |
camera
Package camera provides functions for looking up a camera from a robot using a stream
|
Package camera provides functions for looking up a camera from a robot using a stream |
state
Package state controls the source of the RTP packets being written to the stream's subscribers and ensures there is only one active at a time while there are peer connections to receive RTP packets.
|
Package state controls the source of the RTP packets being written to the stream's subscribers and ensures there is only one active at a time while there are peer connections to receive RTP packets. |