Documentation ¶
Index ¶
- type AccountBalance
- type AccountBalanceAttributes
- type AccountBalanceData
- type BridgeTypeAttributes
- type BridgeTypeData
- type BridgeTypes
- type Config
- type JobSpecStats
- type Links
- type Meta
- type Metrics
- type NodeConfig
- type NodeStats
- type NodeStatsAttributes
- type NodeStatsData
- type ParamCount
- type Session
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
type AccountBalance struct {
Data []AccountBalanceData `json:"data"`
}
AccountBalance is the parent type for the account balance endpoint
type AccountBalanceAttributes ¶
type AccountBalanceAttributes struct { Address string `json:"address"` EthBalance string `json:"eth_balance"` LinkBalance string `json:"link_balance"` }
AccountBalanceAttributes reflects `attributes` returned from the account balance endpoint
type AccountBalanceData ¶
type AccountBalanceData struct { Type string `json:"type"` Id string `json:"id"` Attributes AccountBalanceAttributes `json:"attributes"` }
AccountBalanceData reflects `data` returned from the account balance endpoint
type BridgeTypeAttributes ¶
type BridgeTypeAttributes struct {
URL string `json:"url"`
}
BridgeTypeAttributes reflects the `attributes` obj returned from the bridge endpoint
type BridgeTypeData ¶
type BridgeTypeData struct { Type string `json:"type"` Id string `json:"id"` Attributes BridgeTypeAttributes `json:"attributes"` }
BridgeTypeData reflects the `data` obj returned from the bridge endpoint
type BridgeTypes ¶
type BridgeTypes struct { Data []*BridgeTypeData `json:"data"` Meta Meta `json:"meta"` }
BridgeTypes is the parent type for the bridge type api
type Config ¶
type Config struct { Port int TickerInterval time.Duration NodeConfigLocation string NodeConfigs []*NodeConfig PromPort int PromEnabled bool ClientApiEnabled bool ClientApiPort int Debug bool WsEnabled bool StatsEnabled bool }
Config stores all the configurable options parsed by flags
type JobSpecStats ¶
type JobSpecStats struct { ID string `json:"id"` RunCount int `json:"run_count"` AdaptorCount map[string]int `json:"adaptor_count"` StatusCount map[string]int `json:"status_count"` ParamCount map[string][]ParamCount `json:"param_count"` }
JobSpecStats reflects the `job_spec_stats` obj from the stats endpoint
type Links ¶
type Links struct {
Next string `json:"next"`
}
Links is part of the paginated response from a node
type Meta ¶
type Meta struct {
Count int `json:"count"`
}
Meta is part of the paginated response from a node
type Metrics ¶
type Metrics struct { TotalSpecs int `json:"totalSpecs"` TotalBridges int `json:"totalBridges"` Address string `json:"address"` EthBalance string `json:"ethBalance"` LinkBalance string `json:"linkBalance"` JobSpecStats JobSpecStats `json:"job_spec_stats"` }
Metrics is the type returned for the rest and ws clients
type NodeConfig ¶
type NodeConfig struct { URL string `json:"url"` Username string `json:"username"` Password string `json:"password"` }
NodeConfig is the type needed for the client management api and the config file
type NodeStats ¶
type NodeStats struct { Data NodeStatsData `json:"data"` Links Links `json:"links"` Meta Meta `json:"meta"` }
NodeStats is the parent type returned from the stats endpoint
type NodeStatsAttributes ¶
type NodeStatsAttributes struct {
JobSpecStats []JobSpecStats `json:"job_spec_stats"`
}
NodeStatsAttributes reflects the `attributes` obj from the stats endpoint
type NodeStatsData ¶
type NodeStatsData struct { ID string `json:"id"` Attributes NodeStatsAttributes `json:"attributes"` }
NodeStatsData reflects the `data` obj from the stats endpoint
type ParamCount ¶
ParamCount reflects the `param_count` obj from the stats endpoint
type Subscription ¶
type Subscription struct {
Addresses []string `json:"addresses"`
}
Subscription is the type required to be sent from a ws client to subscribe to any addresses