status

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Status() (map[string]interface{}, error)
}

Provider is the interface status providers should implement.

type Service

type Service struct {
	BuildInfo map[string]interface{}
	// contains filtered or unexported fields
}

Service provides HTTP status service.

func NewService

func NewService(addr string) *Service

NewService returns an initialized Service object.

func (*Service) Addr

func (s *Service) Addr() net.Addr

Addr returns the address on which the Service is listening

func (*Service) Close

func (s *Service) Close()

Close closes the service.

func (*Service) Register

func (s *Service) Register(key string, provider Provider)

Register registers the given provider with the given key.

func (*Service) ServeHTTP

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP allows Service to serve HTTP requests.

func (*Service) Start

func (s *Service) Start() error

Start starts the service.

Jump to

Keyboard shortcuts

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