admin

package
Version: v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2015 License: MIT, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultBindAddress is the default bind address for the HTTP server.
	DefaultBindAddress = ":8083"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled          bool   `toml:"enabled"`
	BindAddress      string `toml:"bind-address"`
	HttpsEnabled     bool   `toml:"https-enabled"`
	HttpsCertificate string `toml:"https-certificate"`
}

func NewConfig

func NewConfig() Config

type Service

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

Service manages the listener for an admin endpoint.

func NewService

func NewService(c Config) *Service

NewService returns a new instance of Service.

func (*Service) Addr

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

Addr returns the listener's address. Returns nil if listener is closed.

func (*Service) Close

func (s *Service) Close() error

Close closes the underlying listener.

func (*Service) Err

func (s *Service) Err() <-chan error

Err returns a channel for fatal errors that occur on the listener.

func (*Service) Open

func (s *Service) Open() error

Open starts the service

func (*Service) SetLogger

func (s *Service) SetLogger(l *log.Logger)

SetLogger sets the internal logger to the logger passed in.

Jump to

Keyboard shortcuts

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