admin

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package admin provides an HTTP server for exposing internal information of the current service. Includes: - Application metrics - Prom metrics: go, process - Service health check - Runtime configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

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

Admin is a http server for exposing private information, e.g. - application metrics - prom metrics: go, process - service health check - runtime configuration

func NewAdmin

func NewAdmin(port int, gracePeriod time.Duration, logger *zap.Logger) *Admin

func (*Admin) Handle

func (a *Admin) Handle(pattern string, handler http.Handler)

func (*Admin) HandleFunc

func (a *Admin) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

func (*Admin) Run

func (a *Admin) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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