Documentation ¶
Index ¶
Constants ¶
View Source
const ( EInternal = "internal error" ENotImplemented = "not implemented" ENotFound = "not found" EConflict = "conflict" // action cannot be performed EInvalid = "invalid" // validation failed EUnprocessableEntity = "unprocessable entity" // data type is correct, but out of range EEmptyValue = "empty value" EForbidden = "forbidden" ETooManyRequests = "too many requests" EMethodNotAllowed = "method not allowed" ETooLarge = "request too large" )
Error codes copied from https://github.com/influxdata/influxdb/blob/569e84d4a73250f2928136e5b40452d058a149bd/kit/platform/errors/errors.go#L15-L29
View Source
const ( // Upped to 10MB based on empirical evidence of proxy receiving batches from telegraf agent DefaultMaxRequestSizeBytes = 10 << 20 // 10 MB )
Variables ¶
View Source
var ( CommitUnixTimestamp = "0" DockerTag = "unset" )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI(conf ProxyConfig, client remotewrite.Client, recorder Recorder) (*API, error)
type ProxyConfig ¶
type ProxyConfig struct { // HTTPConfig is the configuration for the underlying http server. Usually // initialized by flag values via flagext.RegisterFlags. HTTPConfig server.Config // RemoteWriteConfig is the configuration for the underlying remote write client. Usually // initialized by flag values via flagext.RegisterFlags. RemoteWriteConfig remotewrite.Config // EnableAuth determines if the server will reject incoming requests that do // not have X-Scope-OrgID set. EnableAuth bool // Logger is the object that will do the logging for the server. If nil, will // use a LogfmtLogger on stdout. Logger log.Logger // Registerer registers metrics Collectors. If left nil, will use // prometheus.DefaultRegisterer. Registerer prometheus.Registerer // MaxRequestSizeBytes limits the size of an incoming request. Any value less than or equal to 0 means no limit. MaxRequestSizeBytes int }
ProxyConfig holds objects needed to start running an influx2cortex proxy server.
func (*ProxyConfig) RegisterFlags ¶
func (c *ProxyConfig) RegisterFlags(flags *flag.FlagSet)
type ProxyService ¶
ProxyService is the actual Influx Proxy dskit service.
func NewProxy ¶
func NewProxy(conf ProxyConfig) (*ProxyService, error)
NewProxy creates a new remotewrite client
func (*ProxyService) Addr ¶
func (p *ProxyService) Addr() net.Addr
Addr returns the net.Addr for the configured server. This is useful in case it was started with port auto-selection so the port number can be retrieved.
type Recorder ¶
type Recorder interface { RegisterVersionBuildTimestamp() error // contains filtered or unexported methods }
func NewRecorder ¶
func NewRecorder(reg prometheus.Registerer) Recorder
Click to show internal directories.
Click to hide internal directories.