Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelableTransport ¶
type CancelableTransport interface { http.RoundTripper CancelRequest(req *http.Request) }
CancelableTransport is like net.Transport but provides per-request cancelation functionality.
var DefaultTransport CancelableTransport = &http.Transport{ Proxy: http.ProxyFromEnvironment, Dial: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, }).Dial, TLSHandshakeTimeout: 10 * time.Second, }
DefaultTransport is used by the solrClient when no explicit transport is provided.
type Client ¶
type Client interface { Store(ts []*TimeSeries, commit bool, commitWithin time.Duration) error // TODO: Return a more interpreted query result on the Chronix level. Query(q, fq, fl string) ([]byte, error) }
Client is a client that allows storing time series in Chronix.
func New ¶
func New(s StorageClient) Client
New creates a new Chronix client. The client does not create statistics for the individual data chunks in the storage.
func NewWithStatistics ¶
func NewWithStatistics(s StorageClient) Client
creates a new Chronix client. The client does create statistics for the individual data chunks in the storage.
type StorageClient ¶
type StorageClient interface { Update(data []map[string]interface{}, commit bool, commitWithin time.Duration) error // TODO: Return a more interpreted result on the Solr level. Query(q, fq, fl string) ([]byte, error) NeedPostfixOnDynamicField() bool }
A StorageClient allows updating documents in Solr.
func NewElasticStorage ¶
func NewElasticStorage(url *string, withIndex *bool, deleteIfExists *bool, sniffElasticNodes *bool) StorageClient
NewElasticStorage creates a new Elastic client.
func NewElasticTestStorage ¶
func NewElasticTestStorage(url *string) StorageClient
Only for test purposes
func NewSolrStorage ¶
func NewSolrStorage(url *url.URL, transport CancelableTransport) StorageClient
NewSolrStorage creates a new Solr client.