Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AppName is application name AppName = "server" // AppVersion is the application version AppVersion = config.Version // AppRelease is the application release AppRelease = config.Commit )
Functions ¶
func RequestResponseBody ¶
RequestResponseBody will perform an http Get using the provided url and return the body as a []byte TODO use built in functions for this instead of calling endpoints
Types ¶
type Health ¶
type Health struct { Readiness types.JSONText `json:"readiness" yaml:"readiness"` Liveness types.JSONText `json:"liveness" yaml:"liveness"` }
Health reports the links to the health monitors
type Metadata ¶
type Metadata struct { Verbose bool `json:"verbose" yaml:"verbose"` Resources string `json:"resources" yaml:"resources"` }
Metadata struct for info about service-specific fields
func NewMetadata ¶
func NewMetadata(cfg *config.ServerConfig) *Metadata
NewServerStatus creates a new Status struct for use in a Status service
type Status ¶
type Status struct { Service *Version `json:"service" yaml:"service"` Uptime string `json:"uptime" yaml:"uptime"` Debug bool `json:"debug" yaml:"debug"` Health *Health `json:"health" yaml:"health"` StartTime time.Time `json:"start_time" yaml:"start_time"` Host string `json:"host" yaml:"host"` Port string `json:"port" yaml:"port"` MetaData interface{} `json:"metadata" yaml:"metadata"` }
Status reports the characteristics of the Service
func New ¶
func New(cfg *config.ServerConfig) *Status
New will return a new Status struct for service given a name, version, release, debug variable, and start time.
Click to show internal directories.
Click to hide internal directories.