Files
weave-scope/common/xfer/constants.go
Matthias Radestock 160ba8efa0 rename 'report_persistence' capability to 'historic_reports'
since that better captures the intent - the UI doesn't care about
reports get stored, but what reports it can retrieve.
2017-07-31 09:31:46 +01:00

38 lines
1.3 KiB
Go

package xfer
const (
// AppPort is the default port that the app will use for its HTTP server.
// The app publishes the API and user interface, and receives reports from
// probes, on this port.
AppPort = 4040
// ScopeProbeIDHeader is the header we use to carry the probe's unique ID. The
// ID is currently set to the a random string on probe startup.
ScopeProbeIDHeader = "X-Scope-Probe-ID"
// ScopeProbeVersionHeader is the header we use to carry the probe's version.
ScopeProbeVersionHeader = "X-Scope-Probe-Version"
)
// HistoricReportsCapability indicates whether reports older than the
// current time (-app.window) can be retrieved.
const HistoricReportsCapability = "historic_reports"
// Details are some generic details that can be fetched from /api
type Details struct {
ID string `json:"id"`
Version string `json:"version"`
Hostname string `json:"hostname"`
Plugins PluginSpecs `json:"plugins,omitempty"`
Capabilities map[string]bool `json:"capabilities,omitempty"`
NewVersion *NewVersionInfo `json:"newVersion,omitempty"`
}
// NewVersionInfo is the struct exposed in /api when there is a new
// version of Scope available.
type NewVersionInfo struct {
Version string `json:"version"`
DownloadURL string `json:"downloadUrl"`
}