Documentation ¶
Overview ¶
Package robotimpl defines implementations of robot.Robot and robot.LocalRobot.
It also provides a remote robot implementation that is aware that the robot.Robot it is working with is not on the same physical system.
Index ¶
- func New(ctx context.Context, cfg *config.Config, logger golog.Logger, opts ...Option) (robot.LocalRobot, error)
- func RobotFromConfig(ctx context.Context, cfg *config.Config, logger golog.Logger, opts ...Option) (robot.LocalRobot, error)
- func RobotFromConfigPath(ctx context.Context, cfgPath string, logger golog.Logger, opts ...Option) (robot.LocalRobot, error)
- func RobotFromResources(ctx context.Context, resources map[resource.Name]interface{}, ...) (robot.LocalRobot, error)
- type Option
- type PartsMergeResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( ctx context.Context, cfg *config.Config, logger golog.Logger, opts ...Option, ) (robot.LocalRobot, error)
New returns a new robot with parts sourced from the given config.
func RobotFromConfig ¶
func RobotFromConfig(ctx context.Context, cfg *config.Config, logger golog.Logger, opts ...Option) (robot.LocalRobot, error)
RobotFromConfig is a helper to process a config and then create a robot based on it.
func RobotFromConfigPath ¶
func RobotFromConfigPath(ctx context.Context, cfgPath string, logger golog.Logger, opts ...Option) (robot.LocalRobot, error)
RobotFromConfigPath is a helper to read and process a config given its path and then create a robot based on it.
func RobotFromResources ¶
func RobotFromResources( ctx context.Context, resources map[resource.Name]interface{}, logger golog.Logger, opts ...Option, ) (robot.LocalRobot, error)
RobotFromResources creates a new robot consisting of the given resources. Using RobotFromConfig is preferred to support more streamlined reconfiguration functionality.
Types ¶
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 WithRevealSensitiveConfigDiffs ¶ added in v0.1.0
func WithRevealSensitiveConfigDiffs() Option
WithRevealSensitiveConfigDiffs returns an Option which causes config diffs - which may contain sensitive information - to be displayed in logs.
func WithWebOptions ¶
WithWebOptions returns a Option which sets the streamConfig used to enable audio/video streaming over WebRTC.
type PartsMergeResult ¶
type PartsMergeResult struct {
ReplacedProcesses []pexec.ManagedProcess
}
PartsMergeResult is the result of merging in parts together.