Documentation ¶
Index ¶
- Variables
- type GetSetter
- func (gs *GetSetter) Get(ctx context.Context, room avcontrol.RoomConfig) (avcontrol.StateResponse, error)
- func (gs *GetSetter) GetHealth(ctx context.Context, room avcontrol.RoomConfig) (avcontrol.RoomHealth, error)
- func (gs *GetSetter) GetInfo(ctx context.Context, room avcontrol.RoomConfig) (avcontrol.RoomInfo, error)
- func (gs *GetSetter) Set(ctx context.Context, room avcontrol.RoomConfig, req avcontrol.StateRequest) (avcontrol.StateResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoStateGettable = errors.New("can't get the state of any devices in this room") ErrDriverNotRegistered = errors.New("driver not registered") )
Functions ¶
This section is empty.
Types ¶
type GetSetter ¶
type GetSetter struct { Logger *zap.Logger DriverRegistry avcontrol.DriverRegistry }
GetSetter is used to get and set the status of the devices in a room.
func (*GetSetter) Get ¶
func (gs *GetSetter) Get(ctx context.Context, room avcontrol.RoomConfig) (avcontrol.StateResponse, error)
Get goes through the devices in the RoomConfig and reports on the state of the room.
func (*GetSetter) GetHealth ¶
func (gs *GetSetter) GetHealth(ctx context.Context, room avcontrol.RoomConfig) (avcontrol.RoomHealth, error)
GetHealth goes through the devices in the RoomConfig and reports on their health statuses. Takes RoomConfig as an input and returns RoomHealth.
func (*GetSetter) GetInfo ¶
func (gs *GetSetter) GetInfo(ctx context.Context, room avcontrol.RoomConfig) (avcontrol.RoomInfo, error)
GetInfo goes through the devices in the RoomConfig and reports on their status. Takes RoomConfig as an input and returns RoomInfo.
func (*GetSetter) Set ¶
func (gs *GetSetter) Set(ctx context.Context, room avcontrol.RoomConfig, req avcontrol.StateRequest) (avcontrol.StateResponse, error)
Set goes through the devices in the RoomConfig and sets their states to match whats in the given StateRequest. Takes RoomConfig and StateRequest as input and returns StateResponse.
Click to show internal directories.
Click to hide internal directories.