admin

package
v0.0.0-20180203224945-... Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package admin simplifies the setup of various administrative endpoints such as healthchecks, debugging, and service information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Runner

func Runner(port string, options ...OptionFunc) ifrit.Runner

Runner builds and returns a runner that, when run, will start an HTTP server listening on the specified port that provides the Go pprof endpoints from the standard library along with the additional trace endpoints.

Types

type OptionFunc

type OptionFunc func(*server)

OptionFunc is used to configure the runner.

func WithInfo

func WithInfo(info ServiceInfo) OptionFunc

WithInfo configures the information endpoint to present information about the service.

func WithUptime

func WithUptime() OptionFunc

WithUptime adds a handler to the administrative endpoint that returns the uptime of the service. It is registered at /uptime.

type ServiceInfo

type ServiceInfo struct {
	Name        string
	Description string
	Team        string
}

ServiceInfo represents information about a service that operators may find useful.

Jump to

Keyboard shortcuts

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