Documentation ¶
Index ¶
- func AppendTags(k string, v string, tags map[string]string, path string) map[string]string
- func CreateMetrics(grouper *metric.SeriesGrouper, tags map[string]string, timestamp time.Time, ...)
- func Find(a []string, x string) int
- func GetMessageType(path string) proto.Message
- func GetTypeValue(path string) map[string]reflect.Type
- func LcFirst(str string) string
- func SearchKey(Message *telemetry.TelemetryRowGPB, path string) ([]string, []string)
- func UcFirst(str string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendTags ¶
Append to the tags the telemetry values for position. @params: k - Key to evaluate v - Content of the Key tags - Global tags of the metric path - Telemetry path @returns original tag append the key if its a name Key.
func CreateMetrics ¶
func CreateMetrics(grouper *metric.SeriesGrouper, tags map[string]string, timestamp time.Time, path string, subfield string, vals string)
Creates and add metrics from json mapped data in telegraf metrics SeriesGrouper @params:
- grouper (*metric.SeriesGrouper) - pointer of metric series to append data.
- tags (map[string]string) json data mapped
- timestamp (time.Time) -
- path (string) - sensor path
- subfield (string) - subkey data. vals (string) - subkey content
func Find ¶
Search for a string in a string array.
@Params: a String Array x String to Search @Returns: Returns the index location de x in a or -1 if not Found
func GetMessageType ¶
Returns the protoMessage of the sensor path.
Huawei have only a few sensors paths for metrics. The sensors could be known with the command. "display telemetry sensor-path " @params: path (string) - The head of the sensor path. Example: "huawei-ifm" @returns: sensor-path proto message
func GetTypeValue ¶
Get the types of the Telemetry EndPoint @Params: a string with the telemetry complete path @Returns: a Map with keys and types of the endpoint
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.