Documentation ¶
Index ¶
Constants ¶
View Source
const ( QueryURL = "https://www.scalyr.com/api/query" NumericQueryURL = "https://www.scalyr.com/api/numericQuery" TimeseriesQueryURL = "https://www.scalyr.com/api/timeseriesQuery" FacetQueryURL = "https://www.scalyr.com/api/facetQuery" MaxBuckets = 5000 )
View Source
const ( PrecedenceLevel1 = 1 PrecedenceLevel2 = 2 FloatCutoff = 0.0001 DivideByZeroResult = -1 ValueIndex = 0 TimestampIndex = 1 ReplacePrefix = "var" )
Variables ¶
This section is empty.
Functions ¶
func GetBuckets ¶
func GetBuckets(data *BucketRequest) (int, error)
GetBuckets gets the number of buckets that would be appropriate for the passed in from and to parameters, giving each bucket approximately the number of seconds defined in intervalSeconds
Types ¶
type BucketRequest ¶
type NumericQueryRequest ¶
type NumericQueryResponse ¶
type ParseVar ¶
type ParseVar struct { Id string Filter string Query *TimeseriesQuery Response *TimeseriesQueryResponse ConstValue float64 //this is just for the constant values }
func ParseComplexExpression ¶
func ParseComplexExpression(expression string, start string, end string, buckets int, fullVariableExpression *string, useNumeric bool) ([]*ParseVar, error)
*
- @param $expression
- @param $start
- @param $end
- @param $buckets
- @param string $fullVariableExpression *
- @param $useNumeric *
- @return array
- @throws \Adknown\ProxyScalyr\Scalyr\Request\Exception\BadBucketsException
type Scalyr ¶
type Scalyr struct {
// contains filtered or unexported fields
}
func (*Scalyr) ComplexTimeSeriesQuery ¶
func (s *Scalyr) ComplexTimeSeriesQuery(query *TimeseriesQuery) (*TimeseriesQueryResponse, []string, error)
func (*Scalyr) SetHttpClient ¶
SetHttpClient overrides the existing http client
func (*Scalyr) TimeSeriesQuery ¶
func (s *Scalyr) TimeSeriesQuery(query *TimeseriesQuery) (*TimeseriesQueryResponse, error)
type TimeseriesQuery ¶
type TimeseriesQueryRequest ¶
type TimeseriesQueryRequest struct { Token string `json:"token"` Queries []*TimeseriesQuery `json:"queries"` }
type TimeseriesQueryResponse ¶
type TimeseriesQueryResponse struct { Status string `json:"status"` Results []TimeseriesQueryResult `json:"results"` ExecutionTime int `json:"executionTime"` Message string `json:"message,omitempty"` }
func NewEvaluateExpression ¶
func NewEvaluateExpression(expression string, varArray []*ParseVar) (*TimeseriesQueryResponse, error)
NewEvaluateExpression runs through all the operators/operands and calls the Scalyr query requests. It then applies the math operations on the results of the Scalyr queries.
type TimeseriesQueryResult ¶
Click to show internal directories.
Click to hide internal directories.