admin

package
v1.2.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: MIT Imports: 8 Imported by: 0

README

InfluxDB Admin Interface

This is the built-in admin interface that ships with InfluxDB. The service is intended to have little overhead and minimal preprocessing steps.

How it works

Static assets, located in the assets directory, are embedded in the influxd binary and served from memory using a simple fileserver.

The admin UI itself uses React for the user interface to interact directly with the InfluxDB API, usually running on port 8086.

Building

The only step required to bundle the admin UI with InfluxDB is to create a compressed file system using statik as follows:

go get github.com/rakyll/statik  # make sure $GOPATH/bin is listed in your PATH
cd $GOPATH/src/github.com/influxdata/influxdb
go generate github.com/influxdata/influxdb/services/admin

The go generate ./... command will run statik to generate the statik/statik.go file. The generated go file will embed the admin interface assets into the InfluxDB binary.

This step should be run before submitting any pull requests which include modifications to admin interface assets.

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"`
	Version          string `toml:"-"`
}

Config represents the configuration for the admin service.

func NewConfig

func NewConfig() Config

NewConfig returns an instance of Config with defaults.

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) WithLogger added in v1.2.0

func (s *Service) WithLogger(log zap.Logger)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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