Files
weave-scope/common/xfer/constants.go
Tom Wilkie 901f46c5fc Report if newer version are availible in /api (#1366)
* Report if newer version are availible in /api

* Render version update hint in UI, next to version

* Fix lint
2016-04-22 10:25:00 +01:00

30 lines
925 B
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"
)
// 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"`
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"`
}