httpd

package
v0.9.0-rc26 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2015 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// With raw data queries, mappers will read up to this amount before sending results back to the engine.
	// This is the default size in the number of values returned in a raw query. Could be many more bytes depending on fields returned.
	DefaultChunkSize = 10000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Database        string  `json:"database"`
	RetentionPolicy string  `json:"retentionPolicy"`
	Points          []Point `json:"points"`
}

type Handler

type Handler struct {
	Logger         *log.Logger
	LoggingEnabled bool // Log every HTTP access.
	WriteTrace     bool // Detailed logging of write path
	// contains filtered or unexported fields
}

Handler represents an HTTP handler for the InfluxDB server.

func NewAPIHandler

func NewAPIHandler(s *influxdb.Server, requireAuthentication bool, version string) *Handler

NewAPIHandler is the http handler for api endpoints

func NewClusterHandler

func NewClusterHandler(s *influxdb.Server, requireAuthentication, snapshotEnabled bool, version string) *Handler

NewClusterHandler is the http handler for cluster communication endpoints

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP responds to HTTP request to the handler.

func (*Handler) SetRoutes

func (h *Handler) SetRoutes(routes []route)

type Point

type Point struct {
	Name      string                 `json:"name"`
	Timestamp time.Time              `json:"timestamp"`
	Tags      map[string]string      `json:"tags"`
	Fields    map[string]interface{} `json:"fields"`
}

type SnapshotHandler

type SnapshotHandler struct {
	CreateSnapshotWriter func() (*influxdb.SnapshotWriter, error)
}

SnapshotHandler streams out a snapshot from the server.

func (*SnapshotHandler) ServeHTTP

func (h *SnapshotHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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