Documentation
¶
Index ¶
- type AuthAPIClient
- type Client
- type HTTPClient
- type HTTPEventsRecorder
- type HTTPImpressionRecorder
- func (i *HTTPImpressionRecorder) Record(impressions []dtos.ImpressionsDTO, metadata dtos.Metadata, ...) error
- func (i *HTTPImpressionRecorder) RecordImpressionsCount(pf dtos.ImpressionsCountDTO, metadata dtos.Metadata) error
- func (h *HTTPImpressionRecorder) RecordRaw(url string, data []byte, metadata dtos.Metadata, ...) error
- type HTTPMetricsRecorder
- func (m *HTTPMetricsRecorder) RecordCounters(counters []dtos.CounterDTO, metadata dtos.Metadata) error
- func (m *HTTPMetricsRecorder) RecordGauge(gauge dtos.GaugeDTO, metadata dtos.Metadata) error
- func (m *HTTPMetricsRecorder) RecordLatencies(latencies []dtos.LatenciesDTO, metadata dtos.Metadata) error
- func (h *HTTPMetricsRecorder) RecordRaw(url string, data []byte, metadata dtos.Metadata, ...) error
- type HTTPSegmentFetcher
- type HTTPSplitFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthAPIClient ¶
type AuthAPIClient struct {
// contains filtered or unexported fields
}
AuthAPIClient struct is responsible for authenticating client for push services
func NewAuthAPIClient ¶
func NewAuthAPIClient(apikey string, cfg conf.AdvancedConfig, logger logging.LoggerInterface, metadata dtos.Metadata) *AuthAPIClient
NewAuthAPIClient instantiates and return an AuthAPIClient
func (*AuthAPIClient) Authenticate ¶
func (a *AuthAPIClient) Authenticate() (*dtos.Token, error)
Authenticate performs authentication for push services
type Client ¶
type Client interface {
Get(service string) ([]byte, error)
Post(service string, body []byte, headers map[string]string) error
}
Client interface for HTTPClient
func NewHTTPClient ¶
func NewHTTPClient( apikey string, cfg conf.AdvancedConfig, endpoint string, logger logging.LoggerInterface, metadata dtos.Metadata, ) Client
NewHTTPClient instance of HttpClient
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient structure to wrap up the net/http.Client
type HTTPEventsRecorder ¶
type HTTPEventsRecorder struct {
// contains filtered or unexported fields
}
HTTPEventsRecorder is a struct responsible for submitting events bulks to the backend
func NewHTTPEventsRecorder ¶
func NewHTTPEventsRecorder( apikey string, cfg conf.AdvancedConfig, logger logging.LoggerInterface, ) *HTTPEventsRecorder
NewHTTPEventsRecorder instantiates an HTTPEventsRecorder
type HTTPImpressionRecorder ¶
type HTTPImpressionRecorder struct {
// contains filtered or unexported fields
}
HTTPImpressionRecorder is a struct responsible for submitting impression bulks to the backend
func NewHTTPImpressionRecorder ¶
func NewHTTPImpressionRecorder( apikey string, cfg conf.AdvancedConfig, logger logging.LoggerInterface, ) *HTTPImpressionRecorder
NewHTTPImpressionRecorder instantiates an HTTPImpressionRecorder
func (*HTTPImpressionRecorder) Record ¶
func (i *HTTPImpressionRecorder) Record(impressions []dtos.ImpressionsDTO, metadata dtos.Metadata, extraHeaders map[string]string) error
Record sends an array (or slice) of impressionsRecord to the backend
func (*HTTPImpressionRecorder) RecordImpressionsCount ¶
func (i *HTTPImpressionRecorder) RecordImpressionsCount(pf dtos.ImpressionsCountDTO, metadata dtos.Metadata) error
RecordImpressionsCount sens impressionsCount
type HTTPMetricsRecorder ¶
type HTTPMetricsRecorder struct {
// contains filtered or unexported fields
}
HTTPMetricsRecorder is a struct responsible for submitting metrics (latency, gauge, counters) to the backend
func NewHTTPMetricsRecorder ¶
func NewHTTPMetricsRecorder( apikey string, cfg conf.AdvancedConfig, logger logging.LoggerInterface, ) *HTTPMetricsRecorder
NewHTTPMetricsRecorder instantiates an HTTPMetricsRecorder
func (*HTTPMetricsRecorder) RecordCounters ¶
func (m *HTTPMetricsRecorder) RecordCounters(counters []dtos.CounterDTO, metadata dtos.Metadata) error
RecordCounters method submits counter metrics to the backend
func (*HTTPMetricsRecorder) RecordGauge ¶
RecordGauge method submits gauge metrics to the backend
func (*HTTPMetricsRecorder) RecordLatencies ¶
func (m *HTTPMetricsRecorder) RecordLatencies(latencies []dtos.LatenciesDTO, metadata dtos.Metadata) error
RecordLatencies method submits latency metrics to the backend
type HTTPSegmentFetcher ¶
type HTTPSegmentFetcher struct {
// contains filtered or unexported fields
}
HTTPSegmentFetcher struct is responsible for fetching segment by name from the API via HTTP method
func NewHTTPSegmentFetcher ¶
func NewHTTPSegmentFetcher( apikey string, cfg conf.AdvancedConfig, logger logging.LoggerInterface, metadata dtos.Metadata, ) *HTTPSegmentFetcher
NewHTTPSegmentFetcher instantiates and returns a new HTTPSegmentFetcher.
func (*HTTPSegmentFetcher) Fetch ¶
func (f *HTTPSegmentFetcher) Fetch(segmentName string, since int64) (*dtos.SegmentChangesDTO, error)
Fetch issues a GET request to the split backend and returns the contents of a particular segment
type HTTPSplitFetcher ¶
type HTTPSplitFetcher struct {
// contains filtered or unexported fields
}
HTTPSplitFetcher struct is responsible for fetching splits from the backend via HTTP protocol
func NewHTTPSplitFetcher ¶
func NewHTTPSplitFetcher( apikey string, cfg conf.AdvancedConfig, logger logging.LoggerInterface, metadata dtos.Metadata, ) *HTTPSplitFetcher
NewHTTPSplitFetcher instantiates and return an HTTPSplitFetcher
func (*HTTPSplitFetcher) Fetch ¶
func (f *HTTPSplitFetcher) Fetch(since int64) (*dtos.SplitChangesDTO, error)
Fetch makes an http call to the split backend and returns the list of updated splits