Documentation
¶
Index ¶
- Constants
- type AppReq
- type DatabaseReq
- type HardwareReq
- type LoginReq
- type LoginResp
- type Manager
- func (mgr *Manager) Login() error
- func (mgr *Manager) PushAppMetrics(host string, data models.AppPromResp) error
- func (mgr *Manager) PushDBMetrics(host string, data models.DBPromResp) error
- func (mgr *Manager) PushHWMetrics(host string, data models.HWPromResp) error
- func (mgr *Manager) PushNetworkMetrics(host string, data models.NetworkPromResp) error
- type MetricData
- type MetricPayload
- type MetricValue
- type MetricsResp
- type NetworkReq
- type Opts
Constants ¶
View Source
const ( USER_AGENT = "LAMAAPI/1.0.0" NSE_RESP_CODE_SUCCESS = 601 NSE_RESP_CODE_PARTIAL_SUCCESS = 602 NSE_RESP_CODE_INVALID_LOGIN = 701 NSE_RESP_CODE_INVALID_SEQ_ID = 704 NSE_RESP_CODE_INVALID_TOKEN = 801 NSE_RESP_CODE_EXPIRED_TOKEN = 802 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppReq ¶ added in v0.1.4
type AppReq struct { MemberID string `json:"memberId"` ExchangeID int `json:"exchangeId"` SequenceID int `json:"sequenceId"` Timestamp int64 `json:"timestamp"` Payload []MetricPayload `json:"payload"` }
type DatabaseReq ¶
type DatabaseReq struct { MemberID string `json:"memberId"` ExchangeID int `json:"exchangeId"` SequenceID int `json:"sequenceId"` Timestamp int64 `json:"timestamp"` Payload []MetricPayload `json:"payload"` }
type HardwareReq ¶
type HardwareReq struct { MemberID string `json:"memberId"` ExchangeID int `json:"exchangeId"` SequenceID int `json:"sequenceId"` Timestamp int64 `json:"timestamp"` Payload []MetricPayload `json:"payload"` }
type Manager ¶
Manager provides access to the NSE LAMA API.
func (*Manager) Login ¶
Login is used to generate a session token for further requests. Token is valid for 24 hours and after that it should be renewed again.
func (*Manager) PushAppMetrics ¶ added in v0.1.4
func (mgr *Manager) PushAppMetrics(host string, data models.AppPromResp) error
PushAppMetrics sends app metrics to NSE LAMA API.
func (*Manager) PushDBMetrics ¶
func (mgr *Manager) PushDBMetrics(host string, data models.DBPromResp) error
PushDBMetrics sends database metrics to NSE LAMA API.
func (*Manager) PushHWMetrics ¶
func (mgr *Manager) PushHWMetrics(host string, data models.HWPromResp) error
PushHWMetrics is used to push database metrics to NSE LAMA API.
func (*Manager) PushNetworkMetrics ¶ added in v0.1.2
func (mgr *Manager) PushNetworkMetrics(host string, data models.NetworkPromResp) error
PushNetworkMetrics sends network metrics to NSE LAMA API.
type MetricData ¶
type MetricData struct { Key string `json:"key"` Value interface{} `json:"value"` }
type MetricPayload ¶
type MetricPayload struct { ApplicationID int `json:"applicationId"` MetricData []MetricData `json:"metricData"` }
type MetricValue ¶
type MetricsResp ¶
type MetricsResp struct { Timestamp int64 `json:"timestamp"` VersionNo string `json:"versionNo"` ResponseCode int `json:"responseCode"` ResponseDesc string `json:"responseDesc"` Errors []struct { ApplicationID int `json:"applicationId"` ErrCode int `json:"errCode"` ErrDesc string `json:"errDesc"` ErrKey string `json:"errKey"` Measure interface{} `json:"measure"` } `json:"errors"` }
type NetworkReq ¶ added in v0.1.2
type NetworkReq struct { MemberID string `json:"memberId"` ExchangeID int `json:"exchangeId"` SequenceID int `json:"sequenceId"` Timestamp int64 `json:"timestamp"` Payload []MetricPayload `json:"payload"` }
Click to show internal directories.
Click to hide internal directories.