Documentation ¶
Index ¶
Constants ¶
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 ¶
func MarshalJSON ¶
MarshalJSON will marshal v to JSON. Pretty prints if pretty is true.
func NormalizeBatchPoints ¶
func NormalizeBatchPoints(bp client.BatchPoints) ([]tsdb.Point, error)
NormalizeBatchPoints returns a slice of Points, created by populating individual points within the batch, which do not have times or tags, with the top-level values.
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"` }
type Handler ¶
type Handler struct { Version string MetaStore interface { Database(name string) (*meta.DatabaseInfo, error) Authenticate(username, password string) (ui *meta.UserInfo, err error) Users() ([]meta.UserInfo, error) } QueryExecutor interface { Authorize(u *meta.UserInfo, q *influxql.Query, db string) error ExecuteQuery(q *influxql.Query, db string, chunkSize int) (<-chan *influxql.Result, error) } PointsWriter interface { WritePoints(p *cluster.WritePointsRequest) 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 ¶
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.