Documentation ¶
Index ¶
Constants ¶
const DefaultBindAddress = ":8086"
DefaultBindAddress is the default address to bind to.
const ( // DefaultChunkSize specifies the maximum number of points that will // be read before sending results back to the engine. // // This has no relation to the number of bytes that are returned. DefaultChunkSize = 10000 )
Variables ¶
This section is empty.
Functions ¶
func MarshalJSON ¶
MarshalJSON will marshal v to JSON. Pretty prints if pretty is true.
Types ¶
type Config ¶
type Config struct { Enabled bool `toml:"enabled"` BindAddress string `toml:"bind-address"` AuthEnabled bool `toml:"auth-enabled"` LogEnabled bool `toml:"log-enabled"` WriteTracing bool `toml:"write-tracing"` PprofEnabled bool `toml:"pprof-enabled"` HTTPSEnabled bool `toml:"https-enabled"` HTTPSCertificate string `toml:"https-certificate"` MaxRowLimit int `toml:"max-row-limit"` }
Config represents a configuration for a HTTP service.
type Handler ¶
type Handler struct { Version string MetaClient interface { Database(name string) (*meta.DatabaseInfo, error) Authenticate(username, password string) (ui *meta.UserInfo, err error) Users() []meta.UserInfo } QueryAuthorizer interface { AuthorizeQuery(u *meta.UserInfo, query *influxql.Query, database string) error } WriteAuthorizer interface { AuthorizeWrite(username, database string) error } QueryExecutor *influxql.QueryExecutor PointsWriter interface { WritePoints(database, retentionPolicy string, consistencyLevel models.ConsistencyLevel, points []models.Point) error } ContinuousQuerier continuous_querier.ContinuousQuerier Logger *log.Logger WriteTrace bool // Detailed logging of write path // contains filtered or unexported fields }
Handler represents an HTTP handler for the InfluxDB server.
func NewHandler ¶
func NewHandler(requireAuthentication, loggingEnabled, writeTrace bool, rowLimit int, statMap *expvar.Map) *Handler
NewHandler returns a new instance of handler with routes.
type Response ¶
Response represents a list of statement results.
func (*Response) Error ¶
Error returns the first error from any statement. Returns nil if no errors occurred on any statements.
func (Response) MarshalJSON ¶
MarshalJSON encodes a Response struct into JSON.
func (*Response) UnmarshalJSON ¶
UnmarshalJSON decodes the data into the Response struct
type Service ¶
type Service struct { Handler *Handler Logger *log.Logger // contains filtered or unexported fields }
Service manages the listener and handler for an HTTP endpoint.
func (*Service) SetLogOutput ¶
SetLogOutput sets the writer to which all logs are written. It must not be called after Open is called.