| "veyron.io/veyron/veyron2/ipc" |
| // Light Switch status constants |
| // LightSwitch allows clients to manipulate a virtual light switch. |
| type lightSwitch struct { |
| // Status indicates whether the light is on or off. |
| func (l *lightSwitch) Status(ipc.ServerContext) (string, error) { |
| // FlipSwitch sets the light to on or off, depending on the input. |
| func (l *lightSwitch) FlipSwitch(_ ipc.ServerContext, toOn bool) error { |
| l.status = lightSwitchOff |
| // NewLightSwitch creates a new light switch stub. |
| func NewLightSwitch() *lightSwitch { |