Documentation ¶
Index ¶
- type ApiController
- func (c ApiController) PingHandler(w http.ResponseWriter, r *http.Request)
- func (c ApiController) RPCHandler(w http.ResponseWriter, r *http.Request)
- func (c ApiController) RegisterHandler(w http.ResponseWriter, r *http.Request)
- func (c ApiController) SaveMetricsHandler(w http.ResponseWriter, r *http.Request)
- func (c *ApiController) StatisticsHandlerAllStats(w http.ResponseWriter, r *http.Request)
- func (c *ApiController) StatisticsHandlerAllStatsForLoadbalancer(w http.ResponseWriter, r *http.Request)
- func (c *ApiController) StatisticsHandlerStatsForLoadBalancer(w http.ResponseWriter, r *http.Request)
- func (c *ApiController) StatisticsHandlerStatsForNode(w http.ResponseWriter, r *http.Request)
- func (c ApiController) WSHandler(w http.ResponseWriter, r *http.Request)
- type LbStatsResponse
- type LoadbalancerStatsRequest
- type LoadbalancerStatsResponse
- type MetricsRequest
- type RegisterRequest
- type RegisterResponse
- type StatsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiController ¶
type ApiController struct {
// contains filtered or unexported fields
}
func NewApiController ¶
func NewApiController( whitelistEnabled bool, repositories repositories.Repos, actions actions.Actions, ) *ApiController
func (ApiController) PingHandler ¶
func (c ApiController) PingHandler(w http.ResponseWriter, r *http.Request)
func (ApiController) RPCHandler ¶ added in v0.2.0
func (c ApiController) RPCHandler(w http.ResponseWriter, r *http.Request)
func (ApiController) RegisterHandler ¶
func (c ApiController) RegisterHandler(w http.ResponseWriter, r *http.Request)
func (ApiController) SaveMetricsHandler ¶
func (c ApiController) SaveMetricsHandler(w http.ResponseWriter, r *http.Request)
func (*ApiController) StatisticsHandlerAllStats ¶ added in v0.3.0
func (c *ApiController) StatisticsHandlerAllStats(w http.ResponseWriter, r *http.Request)
handler for `GET /api/v1/stats`
func (*ApiController) StatisticsHandlerAllStatsForLoadbalancer ¶ added in v0.3.0
func (c *ApiController) StatisticsHandlerAllStatsForLoadbalancer(w http.ResponseWriter, r *http.Request)
handler for `POST /api/v1/stats` - signature verification in middleware
func (*ApiController) StatisticsHandlerStatsForLoadBalancer ¶ added in v0.4.0
func (c *ApiController) StatisticsHandlerStatsForLoadBalancer(w http.ResponseWriter, r *http.Request)
handler for `GET /api/v1/stats/lb`
func (*ApiController) StatisticsHandlerStatsForNode ¶ added in v0.3.0
func (c *ApiController) StatisticsHandlerStatsForNode(w http.ResponseWriter, r *http.Request)
handler for `GET /api/v1/stats/node/{id}`
func (ApiController) WSHandler ¶ added in v0.3.0
func (c ApiController) WSHandler(w http.ResponseWriter, r *http.Request)
type LbStatsResponse ¶ added in v0.4.0
type LoadbalancerStatsRequest ¶ added in v0.4.0
type LoadbalancerStatsRequest struct {
TotalReward string `json:"total_reward"`
}
type LoadbalancerStatsResponse ¶ added in v0.3.0
type LoadbalancerStatsResponse struct { Stats map[string]models.NodeStatsDetails `json:"stats"` Fee float32 `json:"fee"` }
type MetricsRequest ¶
type RegisterRequest ¶
type RegisterResponse ¶
type StatsResponse ¶ added in v0.3.0
type StatsResponse struct {
Stats map[string]models.NodeStatsDetails `json:"stats"`
}
Click to show internal directories.
Click to hide internal directories.