Documentation ¶
Index ¶
- Constants
- type ChartData
- type Client
- func (client *Client) Close()
- func (client *Client) DeleteMetricData(metricID string) error
- func (client *Client) SendMetricChartData(metricID string, items []ChartData) error
- func (client *Client) SendMetricItem(metricID string, item MetricItem) error
- func (client *Client) SendMetricItems(metricID string, items []MetricItem) error
- type KeyInfo
- type MetricItem
- type MetricItems
- type RequestChartData
- type RequestMetricDataDelete
- type SignatureInfo
Constants ¶
const ( TimeseriesURI apiURI = "https://app.panobi.com/integrations/metrics-sdk/timeseries" ChartDataURI apiURI = "https://app.panobi.com/integrations/metrics-sdk/chart-data" DeleteURI apiURI = "https://app.panobi.com/integrations/metrics-sdk/delete" )
const ( // maximum items to send in one request MaxItems int = 1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChartData ¶
type ChartData map[string]interface{}
represents a single row of data for a non-timeseries metric
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for pushing metrics items to your Panobi workspace.
func CreateClient ¶
Creates a new client with the given key information.
func (*Client) DeleteMetricData ¶
Delete all stored rows for a metric (timeseries or non-timeseries)
func (*Client) SendMetricChartData ¶
Sends metric chart data rows to your Panobi workspace.
func (*Client) SendMetricItem ¶
func (client *Client) SendMetricItem(metricID string, item MetricItem) error
Sends a single metric item to your Panobi workspace.
func (*Client) SendMetricItems ¶
func (client *Client) SendMetricItems(metricID string, items []MetricItem) error
Sends multiple metric items to your Panobi workspace.
type KeyInfo ¶
type KeyInfo struct { K string // actual key WorkspaceID string // workspace ID ExternalID string // external ID }
Holds information about a signing key.
func ParseKey ¶
Parses the given string, and returns a KeyInfo structure holding the component parts.
You can find your key in your Panobi workspace's integration settings. Keys are in the format `W-E-K`, where W is the ID of your Panobi workspace, E is the external ID, and K is actually the secret key generated for your integration.
type MetricItem ¶
represents a single data point in a timeseries metric
type MetricItems ¶
type MetricItems struct { MetricID string `json:"metricID"` Items []MetricItem `json:"items"` }
used to send a batch of data points for a timeseries metric
type RequestChartData ¶
used to send a batch of data points for a non-timeseries metric
type RequestMetricDataDelete ¶
type RequestMetricDataDelete struct {
MetricID string `json:"metricID"`
}
Used to delete data rows for a metric (timeseries or non-timeseries)
type SignatureInfo ¶
type SignatureInfo struct { S string // the signature itself, calculated from a payload TS string // unix milliseconds at which it was calculated }
Holds information about a signature.
func CalculateSignature ¶
Calculates a signature for the given byte payload, using the given key information. The events endpoint requires that you include the calculated signature and timestamp when making requests.
func (SignatureInfo) Equals ¶
func (si SignatureInfo) Equals(other SignatureInfo) bool
Test for equality against the given signature information.