Documentation ¶
Index ¶
- func GetToken(baseURL string, username string, password string) (token *string, err error)
- type Alarm
- type AnalyticMetricFilter
- type AnalyticMetricRequest
- type AnalyticParameter
- type AnalyticPoint
- type AnalyticWindow
- type AuditEvent
- type Client
- func (client *Client) GetAlarms(router string) ([]Alarm, error)
- func (client *Client) GetAuditEvents(router string, filter []string, startTime time.Time, endTime time.Time) ([]AuditEvent, error)
- func (client *Client) GetMetric(router string, request *AnalyticMetricRequest) ([]AnalyticPoint, error)
- func (client *Client) GetMetricMetadata() ([]*MetricDescriptor, error)
- func (client *Client) GetMetricPermutations(router string, descriptor MetricDescriptor) ([]*MetricPermutation, error)
- func (client *Client) GetRouters() ([]Router, error)
- func (client *Client) GetSystemInfo() (SystemInformation, error)
- type MetricDescriptor
- type MetricPermutation
- type Router
- type SystemInformation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alarm ¶ added in v0.0.7
type Alarm map[string]interface{}
Alarm represents an alarm event object.
type AnalyticMetricFilter ¶ added in v0.0.5
AnalyticMetricFilter represents a filter map of keys and values
func (AnalyticMetricFilter) ToString ¶ added in v0.0.5
func (filter AnalyticMetricFilter) ToString() string
ToString converts a filter map to a string for debug
type AnalyticMetricRequest ¶ added in v0.0.5
type AnalyticMetricRequest struct { ID string `json:"id"` Transform string `json:"transform"` Window AnalyticWindow `json:"window"` Filters AnalyticMetricFilter `json:"filters"` }
AnalyticMetricRequest defines the request for a metric
type AnalyticParameter ¶
AnalyticParameter represents a key value parameter
type AnalyticPoint ¶
AnalyticPoint represents a point in time
type AnalyticWindow ¶
AnalyticWindow represents a start and end time window
type AuditEvent ¶ added in v0.0.7
type AuditEvent struct { Type string `json:"type"` Timestamp time.Time `json:"timestamp"` Router string `json:"router"` Node string `json:"node"` Data map[string]interface{} `json:"data"` }
AuditEvent represents an event object.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a HTTP connection to a 128T host.
func CreateClient ¶
CreateClient creates a Client object given a baseURL, token, and httpClient.
func (*Client) GetAlarms ¶ added in v0.0.7
GetAlarms retrieves the currently active alarms for a given router
func (*Client) GetAuditEvents ¶ added in v0.0.7
func (client *Client) GetAuditEvents(router string, filter []string, startTime time.Time, endTime time.Time) ([]AuditEvent, error)
GetAuditEvents retrieves the historical audit events for a router
func (*Client) GetMetric ¶ added in v0.0.5
func (client *Client) GetMetric(router string, request *AnalyticMetricRequest) ([]AnalyticPoint, error)
GetMetric retrieves an array of AnalyticPoint for a given metric.
func (*Client) GetMetricMetadata ¶ added in v0.1.0
func (client *Client) GetMetricMetadata() ([]*MetricDescriptor, error)
GetMetricMetadata asks the server for all available metric descriptors
func (*Client) GetMetricPermutations ¶ added in v0.1.0
func (client *Client) GetMetricPermutations(router string, descriptor MetricDescriptor) ([]*MetricPermutation, error)
GetMetricPermutations retrieves, for a given metric, all the parameter permutations available.
func (*Client) GetRouters ¶ added in v0.1.0
GetRouters retrieves a list of the routers
func (*Client) GetSystemInfo ¶ added in v0.0.8
func (client *Client) GetSystemInfo() (SystemInformation, error)
GetSystemInfo retrieves the version of the given node.
type MetricDescriptor ¶ added in v0.0.5
MetricDescriptor describes a metric within the system.
type MetricPermutation ¶ added in v0.1.0
MetricPermutation describes a series of parameters and their values that can be used to retrieve a metric
type Router ¶
Router represents a 128T Router
func (Router) LocationGeohash ¶ added in v0.0.8
LocationGeohash converts the ISO location field into a geohash
type SystemInformation ¶ added in v0.0.8
type SystemInformation struct {
Version string `json:"softwareVersion"`
}
SystemInformation represents information about the connected 128T server.