Documentation
¶
Overview ¶
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. This file is part of cc-lib. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. This file is part of cc-lib. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
View Source
const ( STAGENAME_DROP_BY_NAME string = "drop_by_name" STAGENAME_DROP_BY_TYPE string = "drop_by_type" STAGENAME_DROP_IF string = "drop_if" STAGENAME_ADD_TAG string = "add_tag" STAGENAME_DELETE_TAG string = "delete_tag" STAGENAME_MOVE_TAG_META string = "move_tag_to_meta" STAGENAME_MOVE_TAG_FIELD string = "move_tag_to_fields" STAGENAME_ADD_META string = "add_meta" STAGENAME_DELETE_META string = "delete_meta" STAGENAME_MOVE_META_TAG string = "move_meta_to_tags" STAGENAME_MOVE_META_FIELD string = "move_meta_to_fields" STAGENAME_ADD_FIELD string = "add_field" STAGENAME_DELETE_FIELD string = "delete_field" STAGENAME_MOVE_FIELD_TAG string = "move_field_to_tags" STAGENAME_MOVE_FIELD_META string = "move_field_to_meta" STAGENAME_RENAME_BY_NAME string = "rename" STAGENAME_RENAME_IF string = "rename_if" STAGENAME_CHANGE_UNIT_PREFIX string = "change_unit_prefix" STAGENAME_NORMALIZE_UNIT string = "normalize_unit" )
Variables ¶
View Source
var StageNames = []string{ STAGENAME_DROP_BY_NAME, STAGENAME_DROP_BY_TYPE, STAGENAME_DROP_IF, STAGENAME_ADD_TAG, STAGENAME_DELETE_TAG, STAGENAME_MOVE_TAG_META, STAGENAME_MOVE_TAG_FIELD, STAGENAME_ADD_META, STAGENAME_DELETE_META, STAGENAME_MOVE_META_TAG, STAGENAME_MOVE_META_FIELD, STAGENAME_ADD_FIELD, STAGENAME_DELETE_FIELD, STAGENAME_MOVE_FIELD_TAG, STAGENAME_MOVE_FIELD_META, STAGENAME_RENAME_BY_NAME, STAGENAME_RENAME_IF, STAGENAME_CHANGE_UNIT_PREFIX, STAGENAME_NORMALIZE_UNIT, }
Functions ¶
This section is empty.
Types ¶
type MessageLocation ¶
type MessageLocation int
const ( MESSAGE_LOCATION_TAGS MessageLocation = iota MESSAGE_LOCATION_META MESSAGE_LOCATION_FIELDS )
type MessageProcessor ¶
type MessageProcessor interface {
// Functions to set the execution order of the processing stages
SetStages([]string) error
DefaultStages() []string
// Function to add variables to the base evaluation environment
AddBaseEnv(env map[string]interface{}) error
// Functions to add and remove rules
AddDropMessagesByName(name string) error
RemoveDropMessagesByName(name string)
AddDropMessagesByCondition(condition string) error
RemoveDropMessagesByCondition(condition string)
AddRenameMetricByCondition(condition string, name string) error
RemoveRenameMetricByCondition(condition string)
AddRenameMetricByName(from, to string) error
RemoveRenameMetricByName(from string)
SetNormalizeUnits(settings bool)
AddChangeUnitPrefix(condition string, prefix string) error
RemoveChangeUnitPrefix(condition string)
AddAddTagsByCondition(condition, key, value string) error
RemoveAddTagsByCondition(condition string)
AddDeleteTagsByCondition(condition, key, value string) error
RemoveDeleteTagsByCondition(condition string)
AddAddMetaByCondition(condition, key, value string) error
RemoveAddMetaByCondition(condition string)
AddDeleteMetaByCondition(condition, key, value string) error
RemoveDeleteMetaByCondition(condition string)
AddMoveTagToMeta(condition, key, value string) error
RemoveMoveTagToMeta(condition string)
AddMoveTagToFields(condition, key, value string) error
RemoveMoveTagToFields(condition string)
AddMoveMetaToTags(condition, key, value string) error
RemoveMoveMetaToTags(condition string)
AddMoveMetaToFields(condition, key, value string) error
RemoveMoveMetaToFields(condition string)
AddMoveFieldToTags(condition, key, value string) error
RemoveMoveFieldToTags(condition string)
AddMoveFieldToMeta(condition, key, value string) error
RemoveMoveFieldToMeta(condition string)
// Read in a JSON configuration
FromConfigJSON(config json.RawMessage) error
// Processing functions for legacy CCMetric and current CCMessage
ProcessMessage(m lp.CCMessage) (lp.CCMessage, error)
}
func NewMessageProcessor ¶
func NewMessageProcessor() (MessageProcessor, error)
Get a new instace of a message processor.
Click to show internal directories.
Click to hide internal directories.