api

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeAPI

func ServeAPI(address string, exit chan bool)

ServeAPI serves the REST API on the given address

func ServiceToJSON

func ServiceToJSON(service models.Service, language string, verbose bool) map[string]interface{}

ServiceToJSON generates an interface (convertible to JSON) with all service details

Types

type Statistics

type Statistics struct {
	Counters         stores.Counters `json:"counters"`
	Inventory        int             `json:"inventory"`
	Status           string          `json:"status"`
	LastStatusChange time.Time       `json:"last_status_change"`
	MessagesAverage  float64         `json:"average_messages"`
}

Statistics includes counters and the inventory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL