origins

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

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(*config.OriginConfig) map[string]*config.PathConfig
	// Configuration returns the configuration for the Proxy Client
	Configuration() *config.OriginConfig
	// 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)
}

Client is the primary interface for interoperating with Trickster and upstream TSDB's

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(*config.OriginConfig) map[string]*config.PathConfig
	// 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() *config.OriginConfig
	// Name returns the name of the origin the Proxy Client is handling
	Name() string
	// FastForwardURL returns the URL to the origin to collect Fast Forward data points based on the provided HTTP Request
	FastForwardURL(*http.Request) (*url.URL, 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)
}

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

Jump to

Keyboard shortcuts

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