Documentation
¶
Index ¶
- func TimeSeriePointToTime(v uint64) time.Time
- type ByteContent
- type ByteHashMap
- type CompactRequestStatistics
- type CompactStat
- type Durationable
- type Endpoint
- type Error
- type ErrorType
- type GqlResponse
- type Hash
- type HttpClient
- type MockHttpClient
- type Request
- type RequestStat
- type RequestStats
- type Serie
- type Stats
- type TimeSeriePusher
- type TimeSeries
- type TimeSeriesExpanded
- type TimeSeriesMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TimeSeriePointToTime ¶ added in v0.3.0
Types ¶
type ByteContent ¶
type ByteContent struct { Content []byte `json:"content,omitempty"` ContentType string `json:"contentType,omitempty"` }
func (ByteContent) MarshalJSON ¶
func (c ByteContent) MarshalJSON() ([]byte, error)
type ByteHashMap ¶
type ByteHashMap map[[32]byte]ByteContent
func (ByteHashMap) MarshalJSON ¶
func (c ByteHashMap) MarshalJSON() ([]byte, error)
type CompactRequestStatistics ¶
type CompactRequestStatistics struct { Stats // required: true StartTime time.Time TotalRequests int `json:"total_requests"` CompletedRequests int `json:"completed_requests` RunID string TimeSeries *TimeSeriesMap ResponseHashMap ByteHashMap `json:"response_hash_map,omitempty"` Requests map[ErrorType]CompactStat }
func NewCompactRequestStatistics ¶
func NewCompactRequestStatistics(runID string, ts *TimeSeriesMap) CompactRequestStatistics
func (*CompactRequestStatistics) AddStat ¶
func (rs *CompactRequestStatistics) AddStat(stat RequestStat)
This is only for use will the original RequestStat
func (*CompactRequestStatistics) Calculate ¶
func (rs *CompactRequestStatistics) Calculate()
func (*CompactRequestStatistics) RecalculateAll ¶
func (rs *CompactRequestStatistics) RecalculateAll()
type CompactStat ¶
type Durationable ¶
type Endpoint ¶
type Endpoint struct { // Required: true Url string `json:"url,omitempty"` Headers http.Header `json:"headers,omitempty"` // contains filtered or unexported fields }
func NewEndpoint ¶
func NewEndpoint(l logger.AppLogger, url string, ts TimeSeriePusher) Endpoint
func NewEndpointWithClient ¶
func NewEndpointWithClient(l logger.AppLogger, url string, ts TimeSeriePusher, client HttpClient) Endpoint
type GqlResponse ¶
type MockHttpClient ¶
type MockHttpClient struct{}
type Request ¶
type Request struct { // Will only be used if Query is unset. Body interface{} `json:"body,omitempty"` Query string `json:"query,omitempty"` Variables map[string]interface{} `json:"variables,omitempty"` Headers map[string]string `json:"-"` // For some reason, the server does not like operationName. OperationName string `json:"operationName,omitempty"` //`json:"operationName"` Method string `json:"method,omitempty"` }
type RequestStat ¶
type RequestStat struct { ErrorType `json:"errorType,omitempty"` RawResponse []byte `json:"rawResponse,omitempty"` ContentType string `json:"-"` Start time.Time `json:"-"` RequestID string Duration time.Duration `json:"duration,omitempty"` CompactStat // contains filtered or unexported fields }
func NewStat ¶
func NewStat(offset time.Duration, ts TimeSeriePusher) RequestStat
func (*RequestStat) End ¶
func (r *RequestStat) End(body []byte, errorType ErrorType, err error) RequestStat
type RequestStats ¶
type RequestStats []RequestStat
func (RequestStats) Calculate ¶
func (r RequestStats) Calculate() Stats
type Stats ¶
func (*Stats) MarshalJSON ¶
type TimeSeriePusher ¶ added in v0.3.0
type TimeSeries ¶ added in v0.3.0
type TimeSeries struct {
tsz.Series
}
func NewTimeSeries ¶ added in v0.3.0
func NewTimeSeries(startTime time.Time) *TimeSeries
func (*TimeSeries) Expand ¶ added in v0.3.0
func (ts *TimeSeries) Expand() *TimeSeriesExpanded
type TimeSeriesExpanded ¶ added in v0.3.0
func (TimeSeriesExpanded) DropResolution ¶ added in v0.3.0
func (tse TimeSeriesExpanded) DropResolution(maxResolution int) TimeSeriesExpanded
This is probably terrible for performance, but still better than serving 500000 items to the client... With a real timeseries-database this kind of operation would be a lot less expensive
type TimeSeriesMap ¶ added in v0.3.0
type TimeSeriesMap struct { Map map[string]*TimeSeries StartTime time.Time // contains filtered or unexported fields }
func NewTimeSeriesWithLabel ¶ added in v0.3.0
func NewTimeSeriesWithLabel(startTime time.Time) TimeSeriesMap
func (*TimeSeriesMap) Expand ¶ added in v0.3.0
func (tsm *TimeSeriesMap) Expand() map[string]*TimeSeriesExpanded
func (*TimeSeriesMap) MarshalJSON ¶ added in v0.3.0
func (s *TimeSeriesMap) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.