Documentation ¶
Index ¶
- type DifferentialPressureAPIClient
- func (c *DifferentialPressureAPIClient) Endpoint() (string, error)
- func (c *DifferentialPressureAPIClient) Fetch(ctx context.Context) (float64, error)
- func (c *DifferentialPressureAPIClient) GetSensorValue(ctx context.Context) (sensorValue, error)
- func (c *DifferentialPressureAPIClient) ValueType() metrics.ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DifferentialPressureAPIClient ¶
type DifferentialPressureAPIClient struct {
// contains filtered or unexported fields
}
func NewDifferentialPressureAPIClient ¶
func NewDifferentialPressureAPIClient(address string, sensorName, nodeName, nodeIP string, insecureSkipVerify bool, timeout time.Duration, editorFns ...util.RequestEditorFn) *DifferentialPressureAPIClient
NewDifferentialPressureAPIClient inits the client. At least one of sensorName, nodeName or nodeIP must be specified.
func (*DifferentialPressureAPIClient) Endpoint ¶
func (c *DifferentialPressureAPIClient) Endpoint() (string, error)
Endpoint constructs the API endpoint.
There is 3 types of URL.
- Get value by sensor name http://hogefuga:12345/api/sensor/2027B30
- Get value by node name http://hogefuga:12345/api/sensor/by_nodename/node-0
- Get value by node IP http://hogefuga:12345/api/sensor/by_nodeaddress/10.10.0.1
func (*DifferentialPressureAPIClient) Fetch ¶
func (c *DifferentialPressureAPIClient) Fetch(ctx context.Context) (float64, error)
func (*DifferentialPressureAPIClient) GetSensorValue ¶
func (c *DifferentialPressureAPIClient) GetSensorValue(ctx context.Context) (sensorValue, error)
func (*DifferentialPressureAPIClient) ValueType ¶
func (c *DifferentialPressureAPIClient) ValueType() metrics.ValueType
Click to show internal directories.
Click to hide internal directories.