Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateRandomName() string
- func GetHashFromMetricAndTags(metric string, tags map[string]string) string
- func GetTSUIDFromPayload(payload *Payload, number bool) string
- func GetTextHashFromMetricAndTags(metric string, tags map[string]string) string
- type CassandraSettings
- type DeleteJSON
- type Error
- type Headers
- type Keyspace
- type KeyspaceAttributes
- type KeyspaceProperties
- type KeyspaceResp
- type KeyspaceUpdate
- type LookupResult
- type LookupResultObject
- type MsgV2
- type MycenaePoints
- type MycenaePointsText
- type PayPoints
- type Payload
- func CreatePayload(v float32, m string, t map[string]string) Payload
- func CreatePayloadTS(v float32, m string, t map[string]string, ts int64) Payload
- func CreateTextPayload(txt string, m string, t map[string]string) Payload
- func CreateTextPayloadTS(txt string, m string, t map[string]string, ts int64) Payload
- type PayloadSlice
- type Point
- type ResponseMeta
- type ResponseMetricTags
- type ResponseQuery
- type RestAPISettings
- type RestError
- type SolrDocument
- type SolrDocumentTag
- type SolrResponse
- type SolrResult
- type TSDBfilter
- type TSDBquery
- type TSDBqueryPayload
- type TSDBrateOptions
- type TableProperties
- type TextPoint
- type Tool
- type TsError
- type TsErrorV2
- type TsMeta
- type TsTagV2
- type UpdateJSON
- type User
Constants ¶
View Source
const MetricForm string = "testMetric-"
View Source
const TagKeyForm string = "testTagKey-"
View Source
const TagValueForm string = "testTagValue-"
Variables ¶
View Source
var Sleep2 = 3 * time.Second
View Source
var Sleep3 = 5 * time.Second
View Source
var (
TTLKeyspaceMap = map[int]string{
1: "one_day",
3: "three_days",
7: "one_week",
14: "two_weeks",
30: "one_month",
90: "three_months",
}
)
Functions ¶
func GenerateRandomName ¶
func GenerateRandomName() string
func GetTSUIDFromPayload ¶
Types ¶
type CassandraSettings ¶
type CassandraSettings struct {
Keyspace string
Consistency string
Nodes []string
Username string
Password string
Connections int
Retry int
DiscoverHosts bool
DiscoverySleep int
PageSize int
Timeout string
ProtoVersion int
}
CassandraSettings abstracts the configuration of a cassandra cluster
type DeleteJSON ¶
type DeleteJSON struct {
Query string `json:"query"`
}
type Keyspace ¶
type KeyspaceAttributes ¶
type KeyspaceProperties ¶
type KeyspaceResp ¶
type KeyspaceResp struct {
KSID string `json:"ksid"`
}
type KeyspaceUpdate ¶
type KeyspaceUpdate struct {
Contact string `json:"contact"`
}
func (KeyspaceUpdate) Marshal ¶
func (k KeyspaceUpdate) Marshal() []byte
type LookupResult ¶
type LookupResultObject ¶
type MycenaePoints ¶
type MycenaePoints struct {
Payload map[string]respPoints `json:"payload"`
}
type MycenaePointsText ¶
type MycenaePointsText struct {
Payload map[string]respPointsText `json:"payload"`
}
type Payload ¶
type Payload struct {
Value *float32 `json:"value,omitempty"`
Text *string `json:"text,omitempty"`
Metric string `json:"metric"`
Tags map[string]string `json:"tags"`
TagKey string `json:"-"`
TagValue string `json:"-"`
TagKey2 string `json:"-"`
TagValue2 string `json:"-"`
Timestamp *int64 `json:"timestamp,omitempty"`
Random int `json:"-"`
TSID string // to use in the tests only
}
func CreatePayloadTS ¶
func CreateTextPayloadTS ¶
func (Payload) StringArray ¶
type PayloadSlice ¶
type PayloadSlice struct {
PS []Payload
}
func (PayloadSlice) Marshal ¶
func (p PayloadSlice) Marshal() []byte
type ResponseMeta ¶
type ResponseMetricTags ¶
type ResponseQuery ¶
type RestAPISettings ¶
RestAPISettings abstracts the configuration of an Elastic Search cluster
type SolrDocument ¶
type SolrDocument struct {
ID string `json:"id"`
Metric string `json:"metric"`
TSType string `json:"type"`
Tags []SolrDocumentTag `json:"_childDocuments_"`
}
type SolrDocumentTag ¶
type SolrResponse ¶
type SolrResponse struct {
Total int `json:"numFound"`
Docs []SolrDocument `json:"docs"`
}
type SolrResult ¶
type SolrResult struct {
Response SolrResponse `json:response`
}
type TSDBfilter ¶
type TSDBquery ¶
type TSDBquery struct {
Aggregator string `json:"aggregator"`
Downsample string `json:"downsample"`
Metric string `json:"metric"`
Tags map[string]string `json:"tags"`
Rate bool `json:"rate"`
RateOptions TSDBrateOptions `json:"rateOptions"`
Order []string `json:"order"`
FilterValue string `json:"filterValue"`
Filters []TSDBfilter `json:"filters"`
}
type TSDBqueryPayload ¶
type TSDBrateOptions ¶
type TableProperties ¶
type TableProperties struct {
Bloom_filter_fp_chance float64
Caching map[string]string
Comment string
Compaction map[string]string
Compression map[string]string
Dclocal_read_repair_chance float64
Default_time_to_live int
Gc_grace_seconds int
Max_index_interval int
Memtable_flush_period_in_ms int
Min_index_interval int
Read_repair_chance float64
Speculative_retry string
}
type Tool ¶
type Tool struct {
Cassandra *cassTool
Solr *solrTool
HTTP *httpTool
UDP *udpTool
Mycenae *mycenaeTool
}
Tool is the main structure to be created from this package
func (*Tool) InitCass ¶
func (t *Tool) InitCass(cassSet CassandraSettings)
InitCass initializes the cassandra session
func (*Tool) InitMycenae ¶
func (t *Tool) InitMycenae(mSet RestAPISettings)
InitMycenae initializes the Mycenae connection
func (*Tool) InitSolr ¶
func (t *Tool) InitSolr(s RestAPISettings)
InitSolr initializes the Solr connection
type UpdateJSON ¶
type UpdateJSON struct {
Delete DeleteJSON `json:"delete"`
}
Click to show internal directories.
Click to hide internal directories.