apiv1

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(logger log.Logger,
	config func() *config.Config,
	tmpl func() *template.Template,
	flagsMap map[string]string,
	versionInfo *VersionInfo,
	runtimeInfo func() (*RuntimeInfo, error)) *API

func (*API) Routes

func (api *API) Routes() chi.Router

type RuntimeInfo

type RuntimeInfo struct {
	StartTime time.Time `json:"startTime"`
	CWD       string    `json:"CWD"`
	//ReloadConfigSuccess bool      `json:"reloadConfigSuccess"`
	//LastConfigTime      time.Time `json:"lastConfigTime"`
	GoroutineCount int    `json:"goroutineCount"`
	GOMAXPROCS     int    `json:"GOMAXPROCS"`
	GOGC           string `json:"GOGC"`
	GODEBUG        string `json:"GODEBUG"`
}

type VersionInfo

type VersionInfo struct {
	Version   string `json:"version"`
	Revision  string `json:"revision"`
	Branch    string `json:"branch"`
	BuildUser string `json:"buildUser"`
	BuildDate string `json:"buildDate"`
	GoVersion string `json:"goVersion"`
}

Jump to

Keyboard shortcuts

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