Documentation ¶
Overview ¶
Package pas provides the client for making API requests to the Enlight Point Alarm Status Service.
Examples ¶
Out of Window Overall Alarm
40 <= x => DANGER 20 <= x < 40 => ALERT 2 < x < 20 => GOOD 1 < x <= 2 => ALERT x <= 1 => DANGER SetPointAlarmThresholdInput { node_id: "<node_id>", user_id: "<user_id>", type: OVERALL_OUT_OF_WINDOW, intervals: [ { left_bound: 40, type: LEFT_BOUNDED_RIGHT_UNBOUNDED_LEFT_CLOSED, status: DANGER }, { left_bound: 20, right_bound: 40, type: BOUNDED_LEFT_CLOSED_RIGHT_OPEN, status: ALERT }, { left_bound: 2, right_bound: 20, type: BOUNDED_OPEN, status: GOOD }, { left_bound: 1, right_bound: 2, type: BOUNDED_LEFT_OPEN_RIGHT_CLOSED, status: ALERT }, { right_bound: 1, type: LEFT_UNBOUNDED_RIGHT_BOUNDED_RIGHT_CLOSED, status: DANGER } ] }
Index ¶
- type Client
- func (c *Client) CalculateAndSetPointAlarmStatus(input pas_api.CalculateAndSetPointAlarmStatusInput) error
- func (c *Client) CalculateAndSetPointAlarmStatusWithContext(ctx context.Context, input pas_api.CalculateAndSetPointAlarmStatusInput) error
- func (c *Client) Close()
- func (c *Client) DeepPing() (err error)
- func (c *Client) DeepPingWithContext(ctx context.Context) (err error)
- func (c *Client) Dial(host, port string, opts ...grpc.DialOption) error
- func (c *Client) DialWithContext(ctx context.Context, host, port string, opts ...grpc.DialOption) (err error)
- func (c *Client) GetPointAlarmStatus(input pas_api.GetPointAlarmStatusInput) (pas_api.AlarmStatus, error)
- func (c *Client) GetPointAlarmStatusEventLog(seqID string) (events pas_api.GetPointAlarmStatusEventLogOutput, err error)
- func (c *Client) GetPointAlarmStatusEventLogWithContext(ctx context.Context, seqID string) (events pas_api.GetPointAlarmStatusEventLogOutput, err error)
- func (c *Client) GetPointAlarmStatusStream(dc chan<- pas_api.GetPointAlarmStatusStreamOutput) error
- func (c *Client) GetPointAlarmStatusStreamWithContext(ctx context.Context, dc chan<- pas_api.GetPointAlarmStatusStreamOutput) (err error)
- func (c *Client) GetPointAlarmStatusWithContext(ctx context.Context, input pas_api.GetPointAlarmStatusInput) (status pas_api.AlarmStatus, err error)
- func (c *Client) GetPointAlarmThreshold(nodeID string) (pas_api.GetPointAlarmThresholdOutput, error)
- func (c *Client) GetPointAlarmThresholdWithContext(ctx context.Context, nodeID string) (output pas_api.GetPointAlarmThresholdOutput, err error)
- func (c *Client) SetPointAlarmStatus(input pas_api.SetPointAlarmStatusInput) error
- func (c *Client) SetPointAlarmStatusWithContext(ctx context.Context, input pas_api.SetPointAlarmStatusInput) error
- func (c *Client) SetPointAlarmThreshold(input pas_api.SetPointAlarmThresholdInput) error
- func (c *Client) SetPointAlarmThresholdWithContext(ctx context.Context, input pas_api.SetPointAlarmThresholdInput) error
- type PointAlarmStatusClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the PointAlarmStatusClient and holds the connection.
func (*Client) CalculateAndSetPointAlarmStatus ¶
func (c *Client) CalculateAndSetPointAlarmStatus(input pas_api.CalculateAndSetPointAlarmStatusInput) error
CalculateAndSetPointAlarmStatus calculates and sets new PAS based on input data
func (*Client) CalculateAndSetPointAlarmStatusWithContext ¶
func (c *Client) CalculateAndSetPointAlarmStatusWithContext(ctx context.Context, input pas_api.CalculateAndSetPointAlarmStatusInput) error
CalculateAndSetPointAlarmStatusWithContext calculates and sets new PAS based on input data
func (*Client) Close ¶
func (c *Client) Close()
Close tears down the ClientConn and all underlying connections.
func (*Client) DeepPingWithContext ¶
DeepPingWithContext pings the service to see if it is alive.
func (*Client) Dial ¶
func (c *Client) Dial(host, port string, opts ...grpc.DialOption) error
Dial creates a client connection to the given host with background context and no timeout
func (*Client) DialWithContext ¶ added in v1.7.4
func (c *Client) DialWithContext(ctx context.Context, host, port string, opts ...grpc.DialOption) (err error)
DialWithContext creates a client connection to the given host with context (for timeout and transaction id)
func (*Client) GetPointAlarmStatus ¶
func (c *Client) GetPointAlarmStatus(input pas_api.GetPointAlarmStatusInput) (pas_api.AlarmStatus, error)
GetPointAlarmStatus gets the alarm status for a specific point
func (*Client) GetPointAlarmStatusEventLog ¶
func (c *Client) GetPointAlarmStatusEventLog(seqID string) (events pas_api.GetPointAlarmStatusEventLogOutput, err error)
GetPointAlarmStatusEventLog get all alarm events after a given sequence ID
func (*Client) GetPointAlarmStatusEventLogWithContext ¶
func (c *Client) GetPointAlarmStatusEventLogWithContext(ctx context.Context, seqID string) (events pas_api.GetPointAlarmStatusEventLogOutput, err error)
GetPointAlarmStatusEventLogWithContext get all alarm events after a given sequence ID
func (*Client) GetPointAlarmStatusStream ¶
func (c *Client) GetPointAlarmStatusStream(dc chan<- pas_api.GetPointAlarmStatusStreamOutput) error
GetPointAlarmStatusStream gets a stream of alarm status updates for all points
func (*Client) GetPointAlarmStatusStreamWithContext ¶
func (c *Client) GetPointAlarmStatusStreamWithContext(ctx context.Context, dc chan<- pas_api.GetPointAlarmStatusStreamOutput) (err error)
GetPointAlarmStatusStreamWithContext gets a stream of alarm status updates for all points
func (*Client) GetPointAlarmStatusWithContext ¶
func (c *Client) GetPointAlarmStatusWithContext(ctx context.Context, input pas_api.GetPointAlarmStatusInput) (status pas_api.AlarmStatus, err error)
GetPointAlarmStatusWithContext gets the alarm status for a specific point
func (*Client) GetPointAlarmThreshold ¶
func (c *Client) GetPointAlarmThreshold(nodeID string) (pas_api.GetPointAlarmThresholdOutput, error)
GetPointAlarmThreshold gets the alarm threshold for a specific point
func (*Client) GetPointAlarmThresholdWithContext ¶
func (c *Client) GetPointAlarmThresholdWithContext(ctx context.Context, nodeID string) (output pas_api.GetPointAlarmThresholdOutput, err error)
GetPointAlarmThresholdWithContext gets the alarm threshold for a specific point
func (*Client) SetPointAlarmStatus ¶
func (c *Client) SetPointAlarmStatus(input pas_api.SetPointAlarmStatusInput) error
SetPointAlarmStatus sets the alarm status for a specific point
func (*Client) SetPointAlarmStatusWithContext ¶
func (c *Client) SetPointAlarmStatusWithContext(ctx context.Context, input pas_api.SetPointAlarmStatusInput) error
SetPointAlarmStatusWithContext sets the alarm status for a specific point
func (*Client) SetPointAlarmThreshold ¶
func (c *Client) SetPointAlarmThreshold(input pas_api.SetPointAlarmThresholdInput) error
SetPointAlarmThreshold sets the alarm threshold for a specific point
func (*Client) SetPointAlarmThresholdWithContext ¶
func (c *Client) SetPointAlarmThresholdWithContext(ctx context.Context, input pas_api.SetPointAlarmThresholdInput) error
SetPointAlarmThresholdWithContext sets the alarm threshold for a specific point
type PointAlarmStatusClient ¶
type PointAlarmStatusClient interface { Dial(host, port string, opts ...grpc.DialOption) error DialWithContext(ctx context.Context, host, port string, opts ...grpc.DialOption) error Close() DeepPing() error DeepPingWithContext(ctx context.Context) error SetPointAlarmThreshold(input pas_api.SetPointAlarmThresholdInput) error SetPointAlarmThresholdWithContext(ctx context.Context, input pas_api.SetPointAlarmThresholdInput) error GetPointAlarmThreshold(nodeID string) (pas_api.GetPointAlarmThresholdOutput, error) GetPointAlarmThresholdWithContext(ctx context.Context, nodeID string) (pas_api.GetPointAlarmThresholdOutput, error) SetPointAlarmStatus(input pas_api.SetPointAlarmStatusInput) error SetPointAlarmStatusWithContext(ctx context.Context, input pas_api.SetPointAlarmStatusInput) error GetPointAlarmStatus(input pas_api.GetPointAlarmStatusInput) (pas_api.AlarmStatus, error) GetPointAlarmStatusWithContext(ctx context.Context, input pas_api.GetPointAlarmStatusInput) (pas_api.AlarmStatus, error) GetPointAlarmStatusEventLog(seqID string) (events pas_api.GetPointAlarmStatusEventLogOutput, err error) GetPointAlarmStatusEventLogWithContext(ctx context.Context, seqID string) (events pas_api.GetPointAlarmStatusEventLogOutput, err error) GetPointAlarmStatusStream(dc chan<- pas_api.GetPointAlarmStatusStreamOutput) error // nolint: staticcheck GetPointAlarmStatusStreamWithContext(ctx context.Context, dc chan<- pas_api.GetPointAlarmStatusStreamOutput) error // nolint: staticcheck CalculateAndSetPointAlarmStatus(input pas_api.CalculateAndSetPointAlarmStatusInput) error CalculateAndSetPointAlarmStatusWithContext(ctx context.Context, input pas_api.CalculateAndSetPointAlarmStatusInput) error }
PointAlarmStatusClient provides the API operation methods for making requests to the Enlight Point Alarm Status Service. See this package's package overview docs for details on the service.
func CreateClient ¶
func CreateClient() PointAlarmStatusClient
CreateClient creates an instance of the PointAlarmStatusClient