Documentation
¶
Overview ¶
Package origins the interface and generic functionality for Origin Types
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Handlers returns a map of the HTTP Handlers the client has registered
Handlers() map[string]http.Handler
// DefaultPathConfigs returns the default PathConfigs for the given OriginType
DefaultPathConfigs(*oo.Options) map[string]*po.Options
// Configuration returns the configuration for the Proxy Client
Configuration() *oo.Options
// Name returns the name of the origin the Proxy Client is handling
Name() string
// HTTPClient will return the HTTP Client for this Origin
HTTPClient() *http.Client
// SetCache sets the Cache object the client will use when caching origin content
SetCache(cache.Cache)
// Router returns a Router that handles HTTP Requests for this client
Router() http.Handler
// Cache returns a handle to the Cache instance used by the Client
Cache() cache.Cache
}
Client is the primary interface for interoperating with Trickster and upstream TSDB's
type Origins ¶
Origins represents a map of Origin Clients keyed by Client Name
type TimeseriesClient ¶
type TimeseriesClient interface {
// Handlers returns a map of the HTTP Handlers the client has registered
Handlers() map[string]http.Handler
// DefaultPathConfigs returns the default PathConfigs for the given OriginType
DefaultPathConfigs(*oo.Options) map[string]*po.Options
// ParseTimeRangeQuery returns a timeseries.TimeRangeQuery based on the provided HTTP Request
ParseTimeRangeQuery(*http.Request) (*timeseries.TimeRangeQuery, error)
// Configuration returns the configuration for the Proxy Client
Configuration() *oo.Options
// Name returns the name of the origin the Proxy Client is handling
Name() string
// FastForwardRequest returns an *http.Request crafted to collect Fast Forward
// data from the Origin, based on the provided HTTP Request
// If the inbound request is POST/PUT/PATCH, a non-nil body must be set with the query parameters,
// in lieu of updated url query values, in the returned request
FastForwardRequest(*http.Request) (*http.Request, error)
// SetExtent will update an upstream request's timerange
// parameters based on the provided timeseries.Extent
SetExtent(*http.Request, *timeseries.TimeRangeQuery, *timeseries.Extent)
// UnmarshalTimeseries will return a Timeseries from the provided byte slice
UnmarshalTimeseries([]byte) (timeseries.Timeseries, error)
// MarshalTimeseries will return a byte slice from the provided Timeseries
MarshalTimeseries(timeseries.Timeseries) ([]byte, error)
// UnmarshalInstantaneous will return an Instantaneous Timeseries
// (only one value instead of a series) from the provided byte slice
UnmarshalInstantaneous([]byte) (timeseries.Timeseries, error)
// HTTPClient will return the HTTP Client for this Origin
HTTPClient() *http.Client
// SetCache sets the Cache object the client will use when caching origin content
SetCache(cache.Cache)
// Cache returns a handle to the Cache object used by the client
Cache() cache.Cache
// Router returns a Router that handles HTTP Requests for this client
Router() http.Handler
}
TimeseriesClient is the primary interface for interoperating with Trickster and upstream TSDB's
Directories
¶
| Path | Synopsis |
|---|---|
|
Package clickhouse provides the ClickHouse origin type
|
Package clickhouse provides the ClickHouse origin type |
|
Package influxdb provides the InfluxDB Origin Type
|
Package influxdb provides the InfluxDB Origin Type |
|
Package irondb provides proxy origin support for IRONdb databases.
|
Package irondb provides proxy origin support for IRONdb databases. |
|
Package prometheus provides the Prometheus Origin Type
|
Package prometheus provides the Prometheus Origin Type |
|
Package reverseproxycache provides the HTTP Reverse Proxy Cache Origin Type
|
Package reverseproxycache provides the HTTP Reverse Proxy Cache Origin Type |
Click to show internal directories.
Click to hide internal directories.