caller

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller interface {
	SetLEDOn(targetURL string) error
	SetLEDOff(targetURL string) error
	Register(leaderURL, clientURL string) error
}

Caller interface for a Driver

type HTTPCaller

type HTTPCaller struct {
	HTTPClient *http.Client
}

HTTPCaller implements Caller over HTTP

func (*HTTPCaller) Register

func (caller *HTTPCaller) Register(leaderURL, clientURL string) (err error)

Register performs an HTTP request to register the host with the Broker

func (*HTTPCaller) SetLEDOff

func (caller *HTTPCaller) SetLEDOff(targetURL string) (err error)

SetLEDOff performs an HTTP request to switch off the LED at the specified host

func (*HTTPCaller) SetLEDOn

func (caller *HTTPCaller) SetLEDOn(targetURL string) (err error)

SetLEDOn performs an HTTP request to switch on the LED at the specified host

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL