Documentation
¶
Overview ¶
Package api pkg/deployment/rf/api/api.go c2-net-routing
Package api pkg/deployment/rf/api/charts.go
Package api pkg/deployment/rf/api/stats.go
Index ¶
- type API
- func (a *API) Charts() *charts.Page
- func (a *API) ChartsPage(w http.ResponseWriter, r *http.Request)
- func (a *API) ShareTransportsFrom(url string)
- func (a *API) StartCharts(ctx context.Context, st charts.Store, sn *SetupNodes, log logrus.FieldLogger)
- func (a *API) StartGraphCache(ctx context.Context)
- type HealthCheckResponse
- type SetupNodes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// Stats, when set, adds the process and traffic charts to the status page.
Stats *charts.ServiceStats
http.Handler
DmsgServers []string
// contains filtered or unexported fields
}
API represents the api of the route-finder service.
func (*API) ChartsPage ¶ added in v1.3.100
func (a *API) ChartsPage(w http.ResponseWriter, r *http.Request)
ChartsPage serves the charts page, or 404 when charts are not running.
func (*API) ShareTransportsFrom ¶ added in v1.3.99
ShareTransportsFrom builds the route graph from the live transport set of a TPD in this process writing to the redis at url, when there is one (see GraphCache.ShareFrom). Call before StartGraphCache.
func (*API) StartCharts ¶ added in v1.3.100
func (a *API) StartCharts(ctx context.Context, st charts.Store, sn *SetupNodes, log logrus.FieldLogger)
StartCharts samples the finder's counts, and those of sn when it is set, into st until ctx ends and serves them as the charts page.
func (*API) StartGraphCache ¶
StartGraphCache builds one shared full-network graph, which route requests then rebuild when they find it stale, so they no longer each build a per-source graph by walking the store. Bound to ctx (the server lifecycle); until the first build lands, requests fall back to the per-source build. Call once at server start.
type HealthCheckResponse ¶
type HealthCheckResponse = httputil.HealthCheckResponse
HealthCheckResponse is the /health body every service shares.