Versions in this module Expand all Collapse all v1 v1.0.0 Apr 11, 2024 Changes in this version + const MyDB + const STRINGBYTELENGTH + const TimeSize + const UDPPayloadSize + var Fields = GetFieldKeys(c, MyDB) + var QueryTemplates = make(map[string]string) + var TagKV = GetTagKV(c, MyDB) + func BoolToByteArray(b bool) ([]byte, error) + func ByteArrayToBool(byteArray []byte) (bool, error) + func ByteArrayToFloat64(byteArray []byte) (float64, error) + func ByteArrayToInt64(byteArray []byte) (int64, error) + func ByteArrayToString(byteArray []byte) string + func BytesPerLine(datatypes []string) int + func FieldsAndAggregation(queryString string, measurementName string) (string, string) + func Float64ToByteArray(number float64) ([]byte, error) + func GetAggregation(queryString string) string + func GetDataTypeArrayFromResponse(resp *Response) []string + func GetDataTypeArrayFromSF(sfString string) []string + func GetFieldKeys(c Client, database string) map[string]map[string]string + func GetFromFatcache(queryString string, timeSize string) [][]byte + func GetInterval(query string) string + func GetNumOfTable(resp *Response) int64 + func GetQueryTemplate(queryString string) string + func GetQueryTimeRange(queryString string) (int64, int64) + func GetResponseTimeRange(resp *Response) (int64, int64) + func GetSFSG(query string) (string, string) + func GetSFSGWithDataType(queryString string, resp *Response) (string, string) + func GetSM(resp *Response, tagPredicates []string) string + func GetSP(query string, resp *Response, tagMap MeasurementTagMap) (string, []string) + func GetSPST(query string) string + func GetSemanticSegment(queryString string) string + func GetSeperateSM(resp *Response, tagPredicates []string) []string + func GetSeperateSemanticSegment(queryString string) []string + func GetSeriesTagsMap(resp *Response) map[int]map[string]string + func GetTagNameArr(resp *Response) []string + func GroupByTags(queryString string, measurementName string) []string + func Int64ToByteArray(number int64) ([]byte, error) + func IntegratedClient(queryString string) + func IntegratedSM(measurementName string, tagConds []string, tags []string) string + func InterfaceToByteArray(index int, datatype string, value interface{}) []byte + func MeasurementName(queryString string) string + func PredicatesAndTagConditions(query string, measurement string, tagMap MeasurementTagMap) (string, []string) + func ResponseIsEmpty(resp *Response) bool + func ResponseToByteArray(resp *Response, queryString string) []byte + func SemanticSegment(queryString string, response *Response) string + func SeperateSM(integratedSM string) []string + func SeperateSemanticSegment(queryString string, response *Response) []string + func SeriesToRow(ser Series) models.Row + func SetToFatache(queryString string, timeSize string) + func SplitResponseValuesByTime(queryString string, resp *Response, timeSize string) ([][][][]interface{}, []int64, []int64) + func StringToByteArray(str string) []byte + func TSCacheParameter(resp *Response) ([][]string, [][]int64, [][][]byte) + func TSCacheValueToByte(resp *Response) []byte + func TagsMapToString(tagsMap map[string]string) string + func TimeInt64ToString(number int64) string + func TimeStringToInt64(timestamp string) int64 + type BatchPoints interface + AddPoint func(p *Point) + AddPoints func(ps []*Point) + Database func() string + Points func() []*Point + Precision func() string + RetentionPolicy func() string + SetDatabase func(s string) + SetPrecision func(s string) error + SetRetentionPolicy func(s string) + SetWriteConsistency func(s string) + WriteConsistency func() string + func NewBatchPoints(conf BatchPointsConfig) (BatchPoints, error) + type BatchPointsConfig struct + Database string + Precision string + RetentionPolicy string + WriteConsistency string + type BooleanValue bool + func (v BooleanValue) MarshalJSON() ([]byte, error) + type ChunkedResponse struct + func NewChunkedResponse(r io.Reader) *ChunkedResponse + func (r *ChunkedResponse) Close() error + func (r *ChunkedResponse) NextResponse() (*Response, error) + type Client interface + Close func() error + Ping func(timeout time.Duration) (time.Duration, string, error) + Query func(q Query) (*Response, error) + QueryAsChunk func(q Query) (*ChunkedResponse, error) + Write func(bp BatchPoints) error + func NewHTTPClient(conf HTTPConfig) (Client, error) + func NewUDPClient(conf UDPConfig) (Client, error) + type ContentEncoding string + const DefaultEncoding + const GzipEncoding + type DurationValue time.Duration + func (v DurationValue) MarshalJSON() ([]byte, error) + type HTTPConfig struct + Addr string + InsecureSkipVerify bool + Password string + Proxy func(req *http.Request) (*url.URL, error) + TLSConfig *tls.Config + Timeout time.Duration + UserAgent string + Username string + WriteEncoding ContentEncoding + type Identifier string + func (v Identifier) MarshalJSON() ([]byte, error) + type IntegerValue int64 + func (v IntegerValue) MarshalJSON() ([]byte, error) + type MeasurementTagMap struct + Measurement map[string][]TagKeyMap + func GetTagKV(c Client, database string) MeasurementTagMap + type Message struct + Level string + Text string + type NumberValue float64 + func (v NumberValue) MarshalJSON() ([]byte, error) + type Params map[string]interface + type Point struct + func NewPoint(name string, tags map[string]string, fields map[string]interface{}, ...) (*Point, error) + func NewPointFrom(pt models.Point) *Point + func (p *Point) Fields() (map[string]interface{}, error) + func (p *Point) Name() string + func (p *Point) PrecisionString(precision string) string + func (p *Point) String() string + func (p *Point) Tags() map[string]string + func (p *Point) Time() time.Time + func (p *Point) UnixNano() int64 + type Query struct + ChunkSize int + Chunked bool + Command string + Database string + Parameters map[string]interface{} + Precision string + RetentionPolicy string + func NewQuery(command, database, precision string) Query + func NewQueryWithParameters(command, database, precision string, parameters map[string]interface{}) Query + func NewQueryWithRP(command, database, retentionPolicy, precision string) Query + type RegexValue string + func (v RegexValue) MarshalJSON() ([]byte, error) + type RespWithTimeRange struct + func SortResponseWithTimeRange(rwtr []RespWithTimeRange) []RespWithTimeRange + type Response struct + Err string + Results []Result + func ByteArrayToResponse(byteArray []byte) *Response + func Merge(precision string, resps ...*Response) []*Response + func MergeResultTable(resp1, resp2 *Response) *Response + func SortResponses(resps []*Response) []*Response + func TSCacheByteToValue(byteArray []byte) *Response + func (r *Response) Error() error + func (resp *Response) ToString() string + type Result struct + Err string + Messages []*Message + Series []models.Row + StatementId int + type Series struct + Columns []string + Name string + Partial bool + Tags map[string]string + Values [][]interface{} + func MergeSeries(resp1, resp2 *Response) []Series + type StringValue string + func (v StringValue) MarshalJSON() ([]byte, error) + type TagKeyMap struct + Tag map[string]TagValues + type TagValues struct + Values []string + type TimeValue time.Time + func (v TimeValue) MarshalJSON() ([]byte, error) + type UDPConfig struct + Addr string + PayloadSize int