Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeltaPAgent ¶
type DeltaPAgent struct {
// contains filtered or unexported fields
}
func NewDeltaPAgent ¶
func NewDeltaPAgent(address string, sensorName, nodeName, nodeIP string, insecureSkipVerify bool, timeout time.Duration, editorFns ...util.RequestEditorFn) *DeltaPAgent
NewDeltaPAgent inits the client. At least one of sensorName, nodeName or nodeIP must be specified.
func (*DeltaPAgent) Endpoint ¶
func (a *DeltaPAgent) 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 (*DeltaPAgent) GetSensorValue ¶
func (a *DeltaPAgent) GetSensorValue(ctx context.Context) (sensorValue, error)
func (*DeltaPAgent) ValueType ¶
func (a *DeltaPAgent) ValueType() metrics.ValueType
Click to show internal directories.
Click to hide internal directories.