Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateFlowTagTagResoureMap() map[string]map[string]*Tag
- func GenerateTagResoureMap() map[string]map[string]*Tag
- func GetEnumTagValues(db, table, sql string) (map[string][]interface{}, error)
- func GetExternalTagValues(db, table, rawSql string) (*common.Result, []string, error)
- func GetTagDescriptions(db, table, rawSql string, ctx context.Context) (response *common.Result, err error)
- func GetTagResourceValues(db, table, rawSql string) (*common.Result, []string, error)
- func GetTagValues(db, table, sql string) (*common.Result, []string, error)
- func LoadTagDescriptions(tagData map[string]interface{}) error
- type Tag
- type TagDescription
- type TagDescriptionKey
- type TagEnum
Constants ¶
View Source
const ( VIF_DEVICE_TYPE_INTERNET = 0 VIF_DEVICE_TYPE_VM = 1 VIF_DEVICE_TYPE_VROUTER = 5 VIF_DEVICE_TYPE_HOST = 6 VIF_DEVICE_TYPE_DHCP_PORT = 9 VIF_DEVICE_TYPE_POD = 10 VIF_DEVICE_TYPE_POD_SERVICE = 11 VIF_DEVICE_TYPE_REDIS_INSTANCE = 12 VIF_DEVICE_TYPE_RDS_INSTANCE = 13 VIF_DEVICE_TYPE_POD_NODE = 14 VIF_DEVICE_TYPE_LB = 15 VIF_DEVICE_TYPE_NAT_GATEWAY = 16 VIF_DEVICE_TYPE_POD_GROUP = 101 VIF_DEVICE_TYPE_SERVICE = 102 VIF_DEVICE_TYPE_GPROCESS = 120 VIF_DEVICE_TYPE_POD_GROUP_DEPLOYMENT = 130 VIF_DEVICE_TYPE_POD_GROUP_STATEFULSET = 131 VIF_DEVICE_TYPE_POD_GROUP_RC = 132 VIF_DEVICE_TYPE_POD_GROUP_DAEMON_SET = 133 VIF_DEVICE_TYPE_POD_GROUP_REPLICASET_CONTROLLER = 134 VIF_DEVICE_TYPE_POD_GROUP_CLONESET = 135 VIF_DEVICE_TYPE_IP = 255 )
View Source
const ( TAP_PORT_MAC_0 = 0 TAP_PORT_MAC_1 = 1 TAP_PORT_IPV4 = 2 )
Variables ¶
View Source
var AUTO_CUSTOM_TAG_CHECK_MAP = map[string][]string{}
View Source
var AUTO_CUSTOM_TAG_MAP = map[string][]string{}
View Source
var AUTO_CUSTOM_TAG_NAMES = []string{}
View Source
var AutoMap = map[string]int{ "chost": VIF_DEVICE_TYPE_VM, "router": VIF_DEVICE_TYPE_VROUTER, "host": VIF_DEVICE_TYPE_HOST, "dhcpgw": VIF_DEVICE_TYPE_DHCP_PORT, "pod_service": VIF_DEVICE_TYPE_POD_SERVICE, "redis": VIF_DEVICE_TYPE_REDIS_INSTANCE, "rds": VIF_DEVICE_TYPE_RDS_INSTANCE, "pod_node": VIF_DEVICE_TYPE_POD_NODE, "lb": VIF_DEVICE_TYPE_LB, "natgw": VIF_DEVICE_TYPE_NAT_GATEWAY, "gprocess": VIF_DEVICE_TYPE_GPROCESS, }
View Source
var AutoPodGroupMap = map[string]int{ "pod_group": VIF_DEVICE_TYPE_POD_GROUP, }
View Source
var AutoPodMap = map[string]int{ "pod": VIF_DEVICE_TYPE_POD, }
View Source
var AutoServiceMap = map[string]int{ "pod_group": VIF_DEVICE_TYPE_POD_GROUP, "deployment": VIF_DEVICE_TYPE_POD_GROUP_DEPLOYMENT, "stateful_set": VIF_DEVICE_TYPE_POD_GROUP_STATEFULSET, "replication_controller": VIF_DEVICE_TYPE_POD_GROUP_RC, "daemon_set": VIF_DEVICE_TYPE_POD_GROUP_DAEMON_SET, "replica_set_controller": VIF_DEVICE_TYPE_POD_GROUP_REPLICASET_CONTROLLER, "clone_set": VIF_DEVICE_TYPE_POD_GROUP_CLONESET, "service": VIF_DEVICE_TYPE_SERVICE, }
View Source
var DEVICE_MAP = map[string]int{ "chost": VIF_DEVICE_TYPE_VM, "router": VIF_DEVICE_TYPE_VROUTER, "dhcpgw": VIF_DEVICE_TYPE_DHCP_PORT, "pod_service": VIF_DEVICE_TYPE_POD_SERVICE, "redis": VIF_DEVICE_TYPE_REDIS_INSTANCE, "rds": VIF_DEVICE_TYPE_RDS_INSTANCE, "lb": VIF_DEVICE_TYPE_LB, "natgw": VIF_DEVICE_TYPE_NAT_GATEWAY, }
View Source
var FlowTagResourceMap = GenerateFlowTagTagResoureMap()
View Source
var INT_ENUM_PEER_TAG = []string{"resource_gl0_type", "resource_gl1_type", "resource_gl2_type", "tcp_flags_bit", "auto_instance_type", "auto_service_type"}
View Source
var INT_ENUM_TAG = []string{"close_type", "eth_type", "signal_source", "is_ipv4", "l7_ip_protocol", "type", "l7_protocol", "protocol", "response_status", "server_port", "status", "tap_port_type", "tunnel_tier", "tunnel_type", "instance_type", "nat_source", "role", "event_level", "policy_level", "policy_app_type", "is_tls"}
View Source
var NoLanguageTag = []string{
"ip_type", "l7_ip_protocol", "server_port", "span_kind", "tcp_flags_bit",
"tunnel_tier", "l7_protocol", "eth_type", "protocol", "tunnel_type", "nat_source",
"profile_language_type",
}
View Source
var PodGroupTypeSlice = []string{
"deployment", "stateful_set", "replication_controller", "daemon_set",
"replica_set_controller", "clone_set",
}
View Source
var STRING_ENUM_TAG = []string{"tap_side", "event_type", "profile_language_type"}
View Source
var TAG_DESCRIPTIONS = map[TagDescriptionKey]*TagDescription{}
View Source
var TAG_DESCRIPTION_KEYS = []TagDescriptionKey{}
View Source
var TAG_ENUMS = map[string][]*TagEnum{}
key=tagEnumFile
View Source
var TAG_INT_ENUMS = map[string][]*TagEnum{}
View Source
var TAG_RESOURCE_TYPE_AUTO = []string{"resource_gl0", "resource_gl1", "resource_gl2", "auto_instance", "auto_service"}
View Source
var TAG_RESOURCE_TYPE_DEFAULT = []string{
"region", "az", "pod_node", "pod_ns",
"pod_group", "pod", "pod_cluster", "subnet", "gprocess",
}
View Source
var TAG_RESOURCE_TYPE_DEVICE_MAP = map[string]int{ "chost": VIF_DEVICE_TYPE_VM, "router": VIF_DEVICE_TYPE_VROUTER, "dhcpgw": VIF_DEVICE_TYPE_DHCP_PORT, "pod_service": VIF_DEVICE_TYPE_POD_SERVICE, "redis": VIF_DEVICE_TYPE_REDIS_INSTANCE, "rds": VIF_DEVICE_TYPE_RDS_INSTANCE, "lb": VIF_DEVICE_TYPE_LB, "natgw": VIF_DEVICE_TYPE_NAT_GATEWAY, "host": VIF_DEVICE_TYPE_HOST, "service": VIF_DEVICE_TYPE_SERVICE, }
View Source
var TAG_STRING_ENUMS = map[string][]*TagEnum{}
View Source
var TAP_PORT_DEVICE_MAP = map[string]int{ common.TAP_PORT_HOST: VIF_DEVICE_TYPE_HOST, common.TAP_PORT_CHOST: VIF_DEVICE_TYPE_VM, common.TAP_PORT_POD_NODE: VIF_DEVICE_TYPE_POD_NODE, }
View Source
var TagResoureMap = GenerateTagResoureMap()
Functions ¶
func GenerateTagResoureMap ¶
func GetEnumTagValues ¶
func GetExternalTagValues ¶
func GetTagDescriptions ¶
func GetTagResourceValues ¶
func LoadTagDescriptions ¶
Types ¶
type Tag ¶
type TagDescription ¶
type TagDescription struct { Name string ClientName string ServerName string DisplayName string Type string EnumFile string Category string Description string Operators []string Permissions []bool RelatedTag string }
func NewTagDescription ¶
func NewTagDescription( name, clientName, serverName, displayName, tagType, enumFile, category string, permissions []bool, description, relatedTag string, ) *TagDescription
type TagDescriptionKey ¶
[db][table]tag*TagDescription
type TagEnum ¶
type TagEnum struct { Value interface{} DisplayName interface{} Description interface{} }
func NewTagEnum ¶
func NewTagEnum(value, displayName, description interface{}) *TagEnum
Click to show internal directories.
Click to hide internal directories.