Documentation ¶
Index ¶
- Constants
- Variables
- func AnomalyColumns() []*ckdb.Column
- func AppAnomalyColumns() []*ckdb.Column
- func AppLatencyColumns() []*ckdb.Column
- func AppMeterColumns() []*ckdb.Column
- func AppTrafficColumns() []*ckdb.Column
- func EncodeAppMeterToMetrics(meter *AppMeter) map[string]float64
- func EncodeCustomTagToPromLabels(tag *CustomTag) []prompb.Label
- func EncodeMiniTagToPromLabels(tag *MiniTag) []prompb.Label
- func EncodeTSDBRow(encoder *codec.SimpleEncoder, timestamp uint64, columnValues []interface{}, ...)
- func EncodeTagToPromLabels(tag *Tag) []prompb.Label
- func FlowLoadColumns() []*ckdb.Column
- func FlowMeterColumns() []*ckdb.Column
- func GenTagColumns(code Code) []*ckdb.Column
- func GenUniversalTagColumns(columns []*ckdb.Column) []*ckdb.Column
- func GetMeasurementID(name string) uint8
- func GetMeterID(name string) uint8
- func GetMetricsTables(engine ckdb.EngineType, version, cluster, storagePolicy, ckdbType string, ...) []*ckdb.Table
- func LatencyColumns() []*ckdb.Column
- func MarshalInt32WithSpecialID(v int32) int32
- func PerformanceColumns() []*ckdb.Column
- func ReleaseField(field *Field)
- func ReleaseMiniField(miniField *MiniField)
- func ReleaseMiniTag(miniTag *MiniTag)
- func ReleaseTag(tag *Tag)
- func TrafficColumns() []*ckdb.Column
- func UsageMeterColumns() []*ckdb.Column
- type Anomaly
- func (a *Anomaly) ConcurrentMerge(other *Anomaly)
- func (a *Anomaly) MarshalTo(b []byte) int
- func (a *Anomaly) ReadFromPB(p *pb.Anomaly)
- func (_ *Anomaly) Reverse()
- func (a *Anomaly) SequentialMerge(other *Anomaly)
- func (a *Anomaly) WriteBlock(block *ckdb.Block)
- func (a *Anomaly) WriteToPB(p *pb.Anomaly)
- type AppAnomaly
- func (a *AppAnomaly) ConcurrentMerge(other *AppAnomaly)
- func (a *AppAnomaly) MarshalTo(b []byte) int
- func (a *AppAnomaly) ReadFromPB(p *pb.AppAnomaly)
- func (_ *AppAnomaly) Reverse()
- func (a *AppAnomaly) SequentialMerge(other *AppAnomaly)
- func (a *AppAnomaly) WriteBlock(block *ckdb.Block)
- func (a *AppAnomaly) WriteToPB(p *pb.AppAnomaly)
- type AppLatency
- func (l *AppLatency) ConcurrentMerge(other *AppLatency)
- func (l *AppLatency) MarshalTo(b []byte) int
- func (l *AppLatency) ReadFromPB(p *pb.AppLatency)
- func (_ *AppLatency) Reverse()
- func (l *AppLatency) SequentialMerge(other *AppLatency)
- func (l *AppLatency) WriteBlock(block *ckdb.Block)
- func (l *AppLatency) WriteToPB(p *pb.AppLatency)
- type AppMeter
- func (m *AppMeter) ConcurrentMerge(other Meter)
- func (m *AppMeter) ID() uint8
- func (m *AppMeter) MarshalTo(b []byte) int
- func (m *AppMeter) Name() string
- func (m *AppMeter) ReadFromPB(p *pb.AppMeter)
- func (m *AppMeter) Reverse()
- func (m *AppMeter) SequentialMerge(other Meter)
- func (m *AppMeter) SortKey() uint64
- func (m *AppMeter) ToKVString() string
- func (m *AppMeter) VTAPName() string
- func (m *AppMeter) WriteBlock(block *ckdb.Block)
- func (m *AppMeter) WriteToPB(p *pb.AppMeter)
- type AppTraffic
- func (t *AppTraffic) ConcurrentMerge(other *AppTraffic)
- func (t *AppTraffic) MarshalTo(b []byte) int
- func (t *AppTraffic) ReadFromPB(p *pb.AppTraffic)
- func (_ *AppTraffic) Reverse()
- func (t *AppTraffic) SequentialMerge(other *AppTraffic)
- func (t *AppTraffic) WriteBlock(block *ckdb.Block)
- func (t *AppTraffic) WriteToPB(p *pb.AppTraffic)
- type Code
- type CustomMeter
- type CustomMeterMeta
- type CustomMeterType
- type CustomTag
- func (t *CustomTag) Clone() Tagger
- func (t *CustomTag) Decode(decoder *codec.SimpleDecoder)
- func (t *CustomTag) Encode(encoder *codec.SimpleEncoder)
- func (t *CustomTag) EncodeWithCode(code uint64, encoder *codec.SimpleEncoder)
- func (t *CustomTag) GetCode() uint64
- func (t *CustomTag) GetID(encoder *codec.SimpleEncoder) string
- func (t *CustomTag) GetTAPType() uint8
- func (t *CustomTag) MarshalTo(b []byte) int
- func (t *CustomTag) PseudoClone() Tagger
- func (t *CustomTag) Release()
- func (t *CustomTag) SetCode(code uint64)
- func (t *CustomTag) SetID(id string)
- func (t *CustomTag) String() string
- func (t *CustomTag) ToKVString() string
- type CustomTagMeta
- type CustomTagMeterMeta
- type DeviceType
- type DirectionEnum
- type Field
- type FlowLoad
- func (l *FlowLoad) ConcurrentMerge(other *FlowLoad)
- func (l *FlowLoad) MarshalTo(b []byte) int
- func (l *FlowLoad) ReadFromPB(p *pb.FlowLoad)
- func (l *FlowLoad) Reverse()
- func (l *FlowLoad) SequentialMerge(other *FlowLoad)
- func (l *FlowLoad) WriteBlock(block *ckdb.Block)
- func (l *FlowLoad) WriteToPB(p *pb.FlowLoad)
- type FlowMeter
- func (m *FlowMeter) ConcurrentMerge(other Meter)
- func (m *FlowMeter) ID() uint8
- func (m *FlowMeter) MarshalTo(b []byte) int
- func (m *FlowMeter) Name() string
- func (m *FlowMeter) ReadFromPB(p *pb.FlowMeter)
- func (m *FlowMeter) Reverse()
- func (m *FlowMeter) SequentialMerge(other Meter)
- func (m *FlowMeter) SortKey() uint64
- func (m *FlowMeter) ToKVString() string
- func (m *FlowMeter) VTAPName() string
- func (m *FlowMeter) WriteBlock(block *ckdb.Block)
- func (m *FlowMeter) WriteToPB(p *pb.FlowMeter)
- type Latency
- func (l *Latency) ConcurrentMerge(other *Latency)
- func (l *Latency) MarshalTo(b []byte) int
- func (l *Latency) ReadFromPB(p *pb.Latency)
- func (_ *Latency) Reverse()
- func (l *Latency) SequentialMerge(other *Latency)
- func (l *Latency) WriteBlock(block *ckdb.Block)
- func (l *Latency) WriteToPB(p *pb.Latency)
- type Meter
- type MetricsTableID
- type MiniField
- type MiniTag
- func (t *MiniTag) Clone() Tagger
- func (t *MiniTag) Decode(_ *codec.SimpleDecoder)
- func (t *MiniTag) GetCode() uint64
- func (t *MiniTag) GetTAPType() uint8
- func (t *MiniTag) MarshalTo(b []byte) int
- func (t *MiniTag) Release()
- func (t *MiniTag) SetCode(code uint64)
- func (t *MiniTag) SetID(id string)
- func (t *MiniTag) SetTID(tid uint8)
- func (t *MiniTag) String() string
- func (t *MiniTag) ToKVString() string
- func (t *MiniTag) WriteToPB(p *pb.MiniTag)
- type Performance
- func (a *Performance) ConcurrentMerge(other *Performance)
- func (a *Performance) MarshalTo(b []byte) int
- func (a *Performance) ReadFromPB(p *pb.Performance)
- func (a *Performance) Reverse()
- func (a *Performance) SequentialMerge(other *Performance)
- func (a *Performance) WriteBlock(block *ckdb.Block)
- func (a *Performance) WriteToPB(p *pb.Performance)
- type SideType
- type TAPSideEnum
- type TAPTypeEnum
- type Tag
- func (t *Tag) Clone() Tagger
- func (t *Tag) DatabaseSuffix() string
- func (t *Tag) DatabaseSuffixID() int
- func (t *Tag) GetCode() uint64
- func (t *Tag) GetTAPType() uint8
- func (t *Tag) MarshalTo(b []byte) int
- func (t *Tag) ReadFromPB(p *pb.MiniTag)
- func (t *Tag) Release()
- func (t *Tag) SetCode(code uint64)
- func (t *Tag) SetID(id string)
- func (t *Tag) SetTID(tid uint8)
- func (t *Tag) String() string
- func (t *Tag) TableID(isSecond bool) (uint8, error)
- func (t *Tag) ToKVString() string
- func (t *Tag) WriteBlock(block *ckdb.Block, time uint32)
- type TagSource
- type Tagger
- type Traffic
- func (t *Traffic) ConcurrentMerge(other *Traffic)
- func (t *Traffic) MarshalTo(b []byte) int
- func (t *Traffic) ReadFromPB(p *pb.Traffic)
- func (t *Traffic) Reverse()
- func (t *Traffic) SequentialMerge(other *Traffic)
- func (t *Traffic) WriteBlock(block *ckdb.Block)
- func (t *Traffic) WriteToPB(p *pb.Traffic)
- type UniversalTag
- type UsageMeter
- func (m *UsageMeter) ConcurrentMerge(other Meter)
- func (m *UsageMeter) ID() uint8
- func (m *UsageMeter) MarshalTo(b []byte) int
- func (m *UsageMeter) Merge(other *UsageMeter)
- func (m *UsageMeter) Name() string
- func (m *UsageMeter) ReadFromPB(p *pb.UsageMeter)
- func (m *UsageMeter) Reverse()
- func (m *UsageMeter) SequentialMerge(other Meter)
- func (m *UsageMeter) SortKey() uint64
- func (m *UsageMeter) ToKVString() string
- func (m *UsageMeter) VTAPName() string
- func (m *UsageMeter) WriteBlock(block *ckdb.Block)
- func (m *UsageMeter) WriteToPB(p *pb.UsageMeter)
Constants ¶
const ( AppTRIFFIC_RRT_MAX = iota AppTRIFFIC_RRT_SUM AppTRIFFIC_RRT_COUNT )
const ( APPLATENCY_RRT_MAX = iota APPLATENCY_RRT_SUM APPLATENCY_RRT_COUNT )
const ( APPANOMALY_CLIENT_ERROR = iota APPANOMALY_SERVER_ERROR APPANOMALY_TIMEOUT APPANOMALY_ERROR )
const ( TRAFFIC_PACKET_TX = iota TRAFFIC_PACKET_RX TRAFFIC_PACKET TRAFFIC_BYTE_TX TRAFFIC_BYTE_RX TRAFFIC_BYTE TRAFFIC_L3_BYTE_TX TRAFFIC_L3_BYTE_RX TRAFFIC_L4_BYTE_TX TRAFFIC_L4_BYTE_RX TRAFFIC_NEW_FLOW TRAFFIC_CLOSED_FLOW TRAFFIC_L7_REQUEST TRAFFIC_L7_RESPONSE TRAFFIC_SYN_COUNT TRAFFIC_SYNACK_COUNT )
const ( LATENCY_RTT = iota LATENCY_RTT_CLIENT LATENCY_RTT_SERVER LATENCY_SRT LATENCY_ART LATENCY_RRT LATENCY_CIT )
const ( PERF_RETRANS_TX = iota PERF_RETRANS_RX PERF_RETRANS PERF_ZERO_WIN_TX PERF_ZERO_WIN_RX PERF_ZERO_WIN PERF_RETRANS_SYN PERF_RETRANS_SYNACK )
const ( ANOMALY_CLIENT_RST_FLOW = iota ANOMALY_SERVER_RST_FLOW ANOMALY_SERVER_SYN_MISS ANOMALY_CLIENT_ACK_MISS ANOMALY_CLIENT_HALF_CLOSE_FLOW ANOMALY_SERVER_HALF_CLOSE_FLOW ANOMALY_CLIENT_SOURCE_PORT_REUSE ANOMALY_SERVER_RESET ANOMALY_SERVER_QUEUE_LACK ANOMALY_CLIENT_ESTABLISH_OTHER_RST ANOMALY_SERVER_ESTABLISH_OTHER_RST ANOMALY_TCP_TIMEOUT ANOMALY_CLIENT_ESTABLISH_FAIL ANOMALY_SERVER_ESTABLISH_FAIL ANOMALY_TCP_ESTABLISH_FAIL ANOMALY_TRANSFER_FAIL ANOMALY_RST_FAIL )
const ( ANOMALY_L7_CLIENT_ERROR = iota ANOMALY_L7_SERVER_ERROR ANOMALY_L7_TIMEOUT ANOMALY_L7_ERROR )
const ( FLOW_SECOND_ID uint8 = iota FLOW_ID ACL_ID // 目前meter的ACL_ID和PACKET_ID内容一致 APP_ID MAX_APP_ID )
const ( MAIN uint8 = iota MAX_MEASUREMENT_ID )
const ( ClientToServer = 1 << iota ServerToClient LocalToLocal // 以下类型为转换tapside而增加,在写入db时均记为c2s或s2c ClientNodeToServer = ClientToServer | DirectionEnum(NodeSide) // 客户端容器节点,路由、SNAT、隧道 ServerNodeToClient = ServerToClient | DirectionEnum(NodeSide) // 服务端容器节点,路由、SNAT、隧道 ClientHypervisorToServer = ClientToServer | DirectionEnum(HypervisorSide) // 客户端宿主机,隧道 ServerHypervisorToClient = ServerToClient | DirectionEnum(HypervisorSide) // 服务端宿主机,隧道 ClientGatewayHypervisorToServer = ClientToServer | DirectionEnum(GatewayHypervisorSide) // 客户端网关宿主机 ServerGatewayHypervisorToClient = ServerToClient | DirectionEnum(GatewayHypervisorSide) // 服务端网关宿主机 ClientGatewayToServer = ClientToServer | DirectionEnum(GatewaySide) // 客户端网关(特指VIP机制的SLB,例如微软云MUX等), Mac地址对应的接口为vip设备 ServerGatewayToClient = ServerToClient | DirectionEnum(GatewaySide) // 服务端网关(特指VIP机制的SLB,例如微软云MUX等), Mac地址对应的接口为vip设备 ClientProcessToServer = ClientToServer | DirectionEnum(ProcessSide) // 客户端进程 ServerProcessToClient = ServerToClient | DirectionEnum(ProcessSide) // 服务端进程 ClientAppToServer = ClientToServer | DirectionEnum(AppSide) // 客户端应用 ServerAppToClient = ServerToClient | DirectionEnum(AppSide) // 服务端应用 )
const ( Client TAPSideEnum = 1 << iota Server Local ClientNode = Client | TAPSideEnum(NodeSide) ServerNode = Server | TAPSideEnum(NodeSide) ClientHypervisor = Client | TAPSideEnum(HypervisorSide) ServerHypervisor = Server | TAPSideEnum(HypervisorSide) ClientGatewayHypervisor = Client | TAPSideEnum(GatewayHypervisorSide) ServerGatewayHypervisor = Server | TAPSideEnum(GatewayHypervisorSide) ClientGateway = Client | TAPSideEnum(GatewaySide) ServerGateway = Server | TAPSideEnum(GatewaySide) ClientProcess = Client | TAPSideEnum(ProcessSide) ServerProcess = Server | TAPSideEnum(ProcessSide) ClientApp = Client | TAPSideEnum(AppSide) ServerApp = Server | TAPSideEnum(AppSide) App = TAPSideEnum(AppSide) Rest = 0 )
const ( ROLE_CLIENT = 0 ROLE_SERVER = 1 )
const ( BaseCode = AZID | HostID | IP | L3Device | L3EpcID | PodClusterID | PodGroupID | PodID | PodNodeID | PodNSID | RegionID | SubnetID | TAPType | VTAPID | ServiceID | Resource | GPID | SignalSource BasePathCode = AZIDPath | HostIDPath | IPPath | L3DevicePath | L3EpcIDPath | PodClusterIDPath | PodGroupIDPath | PodIDPath | PodNodeIDPath | PodNSIDPath | RegionIDPath | SubnetIDPath | TAPSide | TAPType | VTAPID | ServiceIDPath | ResourcePath | GPIDPath | SignalSource BasePortCode = Protocol | ServerPort | IsKeyService NETWORK = BaseCode | BasePortCode | Direction NETWORK_MAP = BasePathCode | BasePortCode | TAPPort APPLICATION = BaseCode | BasePortCode | Direction | L7Protocol APPLICATION_MAP = BasePathCode | BasePortCode | TAPPort | L7Protocol TRAFFIC_POLICY = ACLGID | TunnelIPID | VTAPID )
const ( ID_OTHER = -1 ID_INTERNET = -2 )
const ( SUFFIX_ACL = 1 + iota SUFFIX_EDGE SUFFIX_ACL_EDGE SUFFIX_PORT SUFFIX_ACL_PORT SUFFIX_EDGE_PORT SUFFIX_ACL_EDGE_PORT )
const ( USAGE_PACKET_TX = iota USAGE_PACKET_RX USAGE_PACKET USAGE_BYTE_TX USAGE_BYTE_RX USAGE_BYTE USAGE_L3_BYTE_TX USAGE_L3_BYTE_RX USAGE_L4_BYTE_TX USAGE_L4_BYTE_RX )
const (
FLOW_LOAD = iota
)
const (
MAX_STRING_LENGTH = 2048
)
const ( MINI_FIELD_FULL_CODES = IP | IPPath | L3EpcID | L3EpcIDPath | VTAPID | Protocol | ServerPort | MAC | MACPath | Direction | TAPType | ACLGID | L7Protocol | TunnelIPID )
const TAP_PORT_STR_LEN = 8
Variables ¶
var DatabaseSuffix = [...]string{ 0: "", SUFFIX_ACL: "_acl", SUFFIX_EDGE: "_edge", SUFFIX_ACL_EDGE: "_acl_edge", SUFFIX_PORT: "_port", SUFFIX_ACL_PORT: "_acl_port", SUFFIX_EDGE_PORT: "_edge_port", SUFFIX_ACL_EDGE_PORT: "_acl_edge_port", }
var MeasurementNames [MAX_MEASUREMENT_ID]string = [MAX_MEASUREMENT_ID]string{
"main",
}
var MeasurementNamesToID map[string]uint8
var MeterNamesToID map[string]uint8
var MeterVTAPNames [MAX_APP_ID]string = [MAX_APP_ID]string{
"vtap_flow",
"vtap_flow",
"vtap_wan",
"vtap_packet",
"vtap_acl",
"vtap_app",
}
var TAPSideEnumsString = []string{ Rest: "rest", Client: "c", Server: "s", Local: "local", ClientNode: "c-nd", ServerNode: "s-nd", ClientHypervisor: "c-hv", ServerHypervisor: "s-hv", ClientGatewayHypervisor: "c-gw-hv", ServerGatewayHypervisor: "s-gw-hv", ClientGateway: "c-gw", ServerGateway: "s-gw", ClientProcess: "c-p", ServerProcess: "s-p", ClientApp: "c-app", ServerApp: "s-app", App: "app", }
Functions ¶
func AppMeterColumns ¶
func EncodeAppMeterToMetrics ¶
func EncodeCustomTagToPromLabels ¶
EncodeCustomTagToPromLabels 将 CustomTag 编码成 prom Label
func EncodeMiniTagToPromLabels ¶
EncodeMiniTagToPromLabels 将 MiniTag 转换成 prom Label
func EncodeTSDBRow ¶
func EncodeTSDBRow(encoder *codec.SimpleEncoder, timestamp uint64, columnValues []interface{}, isTag []bool, isNil []bool)
func EncodeTagToPromLabels ¶
EncodeTagToPromLabels 将 Tag 编码成 prom Label
func FlowLoadColumns ¶
func FlowMeterColumns ¶
func GenTagColumns ¶
顺序需要和WriteBlock中一致, 目前time排第一位,其他按字段名字典排序
func GenUniversalTagColumns ¶
Note: The order of append() must be consistent with the order of Write() in WriteBlock. Currently all fields are sorted lexicographically by name.
func GetMeasurementID ¶
func GetMeterID ¶
func GetMetricsTables ¶
func GetMetricsTables(engine ckdb.EngineType, version, cluster, storagePolicy, ckdbType string, flowMinuteTtl, flowSecondTtl, appMinuteTtl, appSecondTtl int, coldStorages map[string]*ckdb.ColdStorage) []*ckdb.Table
func ReleaseField ¶
func ReleaseField(field *Field)
func ReleaseMiniField ¶
func ReleaseMiniField(miniField *MiniField)
Types ¶
type Anomaly ¶
type Anomaly struct { ClientRstFlow uint64 `json:"client_rst_flow" category:"$metrics" sub:"tcp_error"` ServerRstFlow uint64 `json:"server_rst_flow" category:"$metrics" sub:"tcp_error"` ServerSynMiss uint64 `json:"server_syn_miss" category:"$metrics" sub:"tcp_error"` ClientAckMiss uint64 `json:"client_ack_miss" category:"$metrics" sub:"tcp_error"` ClientHalfCloseFlow uint64 `json:"client_half_close_flow" category:"$metrics" sub:"tcp_error"` ServerHalfCloseFlow uint64 `json:"server_half_close_flow" category:"$metrics" sub:"tcp_error"` ClientSourcePortReuse uint64 `json:"client_source_port_reuse" category:"$metrics" sub:"tcp_error"` ClientEstablishReset uint64 `json:"client_establish_other_rst" category:"$metrics" sub:"tcp_error"` ServerReset uint64 `json:"server_reset" category:"$metrics" sub:"tcp_error"` ServerQueueLack uint64 `json:"server_queue_lack" category:"$metrics" sub:"tcp_error"` ServerEstablishReset uint64 `json:"server_establish_other_rst" category:"$metrics" sub:"tcp_error"` TCPTimeout uint64 `json:"tcp_timeout" category:"$metrics" sub:"tcp_error"` ClientEstablishFail uint64 `json:"client_establish_fail" category:"$metrics" sub:"tcp_error"` ServerEstablishFail uint64 `json:"server_establish_fail" category:"$metrics" sub:"tcp_error"` TCPEstablishFail uint64 `json:"tcp_establish_fail" category:"$metrics" sub:"tcp_error"` TCPTransferFail uint64 `json:"tcp_transfer_fail" category:"$metrics" sub:"tcp_error"` TCPRstFail uint64 `json:"tcp_rst_fail" category:"$metrics" sub:"tcp_error"` L7ClientError uint32 `json:"l7_client_error" category:"$metrics" sub:"application"` L7ServerError uint32 `json:"l7_server_error" category:"$metrics" sub:"application"` L7Timeout uint32 `json:"l7_timeout" category:"$metrics" sub:"application"` }
func (*Anomaly) ConcurrentMerge ¶
func (*Anomaly) ReadFromPB ¶
func (*Anomaly) SequentialMerge ¶
func (*Anomaly) WriteBlock ¶
WriteBlock的列和AnomalyColumns需要按顺序一一对应
type AppAnomaly ¶
type AppAnomaly struct { ClientError uint32 `json:"client_error" category:"$metrics" sub:"error"` ServerError uint32 `json:"server_error" category:"$metrics" sub:"error"` Timeout uint32 `json:"timeout" category:"$metrics" sub:"error"` }
func (*AppAnomaly) ConcurrentMerge ¶
func (a *AppAnomaly) ConcurrentMerge(other *AppAnomaly)
func (*AppAnomaly) MarshalTo ¶
func (a *AppAnomaly) MarshalTo(b []byte) int
func (*AppAnomaly) ReadFromPB ¶
func (a *AppAnomaly) ReadFromPB(p *pb.AppAnomaly)
func (*AppAnomaly) Reverse ¶
func (_ *AppAnomaly) Reverse()
func (*AppAnomaly) SequentialMerge ¶
func (a *AppAnomaly) SequentialMerge(other *AppAnomaly)
func (*AppAnomaly) WriteBlock ¶
func (a *AppAnomaly) WriteBlock(block *ckdb.Block)
WriteBlock的列和AnomalyColumns需要按顺序一一对应
func (*AppAnomaly) WriteToPB ¶
func (a *AppAnomaly) WriteToPB(p *pb.AppAnomaly)
type AppLatency ¶
type AppLatency struct { RRTMax uint32 `json:"rrt_max" category:"$metrics" sub:"delay"` // us RRTSum uint64 `json:"rrt_sum" category:"$metrics" sub:"delay"` // us RRTCount uint32 `json:"rrt_count" category:"$metrics" sub:"delay"` }
func (*AppLatency) ConcurrentMerge ¶
func (l *AppLatency) ConcurrentMerge(other *AppLatency)
func (*AppLatency) MarshalTo ¶
func (l *AppLatency) MarshalTo(b []byte) int
func (*AppLatency) ReadFromPB ¶
func (l *AppLatency) ReadFromPB(p *pb.AppLatency)
func (*AppLatency) Reverse ¶
func (_ *AppLatency) Reverse()
func (*AppLatency) SequentialMerge ¶
func (l *AppLatency) SequentialMerge(other *AppLatency)
func (*AppLatency) WriteBlock ¶
func (l *AppLatency) WriteBlock(block *ckdb.Block)
WriteBlock和LatencyColumns的列需要按顺序一一对应
func (*AppLatency) WriteToPB ¶
func (l *AppLatency) WriteToPB(p *pb.AppLatency)
type AppMeter ¶
type AppMeter struct { AppTraffic AppLatency AppAnomaly }
func (*AppMeter) ConcurrentMerge ¶
func (*AppMeter) ReadFromPB ¶
func (*AppMeter) SequentialMerge ¶
func (*AppMeter) ToKVString ¶
func (*AppMeter) WriteBlock ¶
type AppTraffic ¶
type AppTraffic struct { Request uint32 `json:"request" category:"$metrics" sub:"throughput"` Response uint32 `json:"response" category:"$metrics" sub:"throughput"` DirectionScore uint8 `json:"direction_score" category:"$metrics" sub:"throughput"` }
func (*AppTraffic) ConcurrentMerge ¶
func (t *AppTraffic) ConcurrentMerge(other *AppTraffic)
func (*AppTraffic) MarshalTo ¶
func (t *AppTraffic) MarshalTo(b []byte) int
func (*AppTraffic) ReadFromPB ¶
func (t *AppTraffic) ReadFromPB(p *pb.AppTraffic)
func (*AppTraffic) Reverse ¶
func (_ *AppTraffic) Reverse()
func (*AppTraffic) SequentialMerge ¶
func (t *AppTraffic) SequentialMerge(other *AppTraffic)
func (*AppTraffic) WriteBlock ¶
func (t *AppTraffic) WriteBlock(block *ckdb.Block)
WriteBlock和LatencyColumns的列需要按顺序一一对应
func (*AppTraffic) WriteToPB ¶
func (t *AppTraffic) WriteToPB(p *pb.AppTraffic)
type CustomMeter ¶
type CustomMeter struct { Meta *CustomMeterMeta Values []uint64 }
func (*CustomMeter) Decode ¶
func (m *CustomMeter) Decode(decoder *codec.SimpleDecoder)
func (*CustomMeter) Encode ¶
func (m *CustomMeter) Encode(encoder *codec.SimpleEncoder)
type CustomMeterMeta ¶
type CustomMeterMeta struct { Names []string Types []CustomMeterType // contains filtered or unexported fields }
func (*CustomMeterMeta) IndexOf ¶
func (m *CustomMeterMeta) IndexOf(name string) int
func (*CustomMeterMeta) PopulateCache ¶
func (m *CustomMeterMeta) PopulateCache()
func (*CustomMeterMeta) Validate ¶
func (m *CustomMeterMeta) Validate(cm *CustomMeter) bool
type CustomMeterType ¶
type CustomMeterType uint8
const ( CUSTOM_METER_U64 CustomMeterType = iota CUSTOM_METER_U32 )
type CustomTag ¶
type CustomTag struct { Meta *CustomTagMeta Values []string // 每一位表示对应index下的Values[i]有意义 // 如 Code=3时Values[0]和Values[1]有意义 Code uint64 pool.ReferenceCount // contains filtered or unexported fields }
func AcquireCustomTag ¶
func AcquireCustomTag() *CustomTag
func (*CustomTag) Decode ¶
func (t *CustomTag) Decode(decoder *codec.SimpleDecoder)
func (*CustomTag) Encode ¶
func (t *CustomTag) Encode(encoder *codec.SimpleEncoder)
func (*CustomTag) EncodeWithCode ¶
func (t *CustomTag) EncodeWithCode(code uint64, encoder *codec.SimpleEncoder)
func (*CustomTag) GetTAPType ¶
func (*CustomTag) PseudoClone ¶
func (*CustomTag) ToKVString ¶
type CustomTagMeta ¶
type CustomTagMeta struct { Names []string // contains filtered or unexported fields }
func (*CustomTagMeta) IndexOf ¶
func (m *CustomTagMeta) IndexOf(name string) int
func (*CustomTagMeta) PopulateCache ¶
func (m *CustomTagMeta) PopulateCache()
func (*CustomTagMeta) Validate ¶
func (m *CustomTagMeta) Validate(ct *CustomTag) bool
type CustomTagMeterMeta ¶
type CustomTagMeterMeta struct { Tag CustomTagMeta Meter CustomMeterMeta }
func (*CustomTagMeterMeta) Decode ¶
func (t *CustomTagMeterMeta) Decode(decoder *codec.SimpleDecoder)
func (*CustomTagMeterMeta) Encode ¶
func (t *CustomTagMeterMeta) Encode(encoder *codec.SimpleEncoder)
type DeviceType ¶
type DeviceType uint8
const ( VMDevice DeviceType ThirdPartyDevice // 3 VGatewayDevice // 5 HostDevice NetworkDevice FloatingIPDevice DHCPDevice )
type DirectionEnum ¶
type DirectionEnum uint8
func (DirectionEnum) IsClientToServer ¶
func (d DirectionEnum) IsClientToServer() bool
func (DirectionEnum) IsGateway ¶
func (d DirectionEnum) IsGateway() bool
func (DirectionEnum) IsServerToClient ¶
func (d DirectionEnum) IsServerToClient() bool
func (DirectionEnum) ToTAPSide ¶
func (d DirectionEnum) ToTAPSide() TAPSideEnum
type Field ¶
type Field struct { // 用于区分不同的trident及其不同的pipeline,用于如下场景: // - agent和ingester之间的数据传输 // - ingester写入clickhouse,作用类似_id,序列化为_tid GlobalThreadID uint8 `json:"thread_id" category:"$tag"` // structTag "datasource":"n|nm|a|am" means datasource: network, network_map, application, application_map IP6 net.IP `json:"ip6" map_json:"ip6_0" category:"$tag" sub:"network_layer" to_string:"IPv6String" ` // FIXME: 合并IP6和IP MAC uint64 IP uint32 `json:"ip4" map_json:"ip4_0" category:"$tag" sub:"network_layer" to_string:"IPv4String"` L3EpcID int32 `json:"l3_epc_id" map_json:"l3_epc_id_0" category:"$tag" sub:"universal_tag"` L3DeviceID uint32 `json:"l3_device_id" map_json:"l3_device_id_0" category:"$tag" sub:"universal_tag"` L3DeviceType DeviceType `json:"l3_device_type" map_json:"l3_device_type_0" category:"$tag" sub:"universal_tag"` RegionID uint16 `json:"region_id" map_json:"region_id_0" category:"$tag" sub:"universal_tag"` SubnetID uint16 `json:"subnet_id" map_json:"subnet_id_0" category:"$tag" sub:"universal_tag"` HostID uint16 `json:"host_id" map_json:"host_id_0" category:"$tag" sub:"universal_tag"` PodNodeID uint32 `json:"pod_node_id" map_json:"pod_node_id_0" category:"$tag" sub:"universal_tag"` AZID uint16 `json:"az_id" map_json:"az_id_0" category:"$tag" sub:"universal_tag"` PodGroupID uint32 `json:"pod_group_id" map_json:"pod_group_id_0" category:"$tag" sub:"universal_tag"` PodNSID uint16 `json:"pod_ns_id" map_json:"pod_ns_id_0" category:"$tag" sub:"universal_tag"` PodID uint32 `json:"pod_id" map_json:"pod_id_0" category:"$tag" sub:"universal_tag"` PodClusterID uint16 `json:"pod_cluster_id" map_json:"pod_cluster_id_0" category:"$tag" sub:"universal_tag"` ServiceID uint32 `json:"service_id" map_json:"service_id_0" category:"$tag" sub:"universal_tag"` AutoInstanceID uint32 `json:"auto_instance_id" map_json:"auto_instance_id_0" category:"$tag" sub:"universal_tag"` AutoInstanceType uint8 `json:"auto_instance_type" map_json:"auto_instance_type_0" category:"$tag" sub:"universal_tag"` AutoServiceID uint32 `json:"auto_service_id" map_json:"auto_service_id_0" category:"$tag" sub:"universal_tag"` AutoServiceType uint8 `json:"auto_service_type" map_json:"auto_service_type_0" category:"$tag" sub:"universal_tag"` GPID uint32 `json:"gprocess_id" map_json:"gprocess_id_0" category:"$tag" sub:"universal_tag"` MAC1 uint64 IP61 net.IP `json:"ip6_1" category:"$tag" sub:"network_layer" to_string:"IPv6String" datasource:"nm|am"` // FIXME: 合并IP61和IP1 IP1 uint32 `json:"ip4_1" category:"$tag" sub:"network_layer" to_string:"IPv4String" datasource:"nm|am"` L3EpcID1 int32 `json:"l3_epc_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` L3DeviceID1 uint32 `json:"l3_device_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` L3DeviceType1 DeviceType `json:"l3_device_type_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` RegionID1 uint16 `json:"region_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` SubnetID1 uint16 `json:"subnet_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` HostID1 uint16 `json:"host_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` PodNodeID1 uint32 `json:"pod_node_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` AZID1 uint16 `json:"az_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` PodGroupID1 uint32 `json:"pod_group_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` PodNSID1 uint16 `json:"pod_ns_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` PodID1 uint32 `json:"pod_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` PodClusterID1 uint16 `json:"pod_cluster_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` ServiceID1 uint32 `json:"service_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` AutoInstanceID1 uint32 `json:"auto_instance_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` AutoInstanceType1 uint8 `json:"auto_instance_type_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` AutoServiceID1 uint32 `json:"auto_service_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` AutoServiceType1 uint8 `json:"auto_service_type_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` GPID1 uint32 `json:"gprocess_id_1" category:"$tag" sub:"universal_tag" datasource:"nm|am"` ACLGID uint16 Role uint8 `json:"role" category:"$tag" sub:"capture_info" enumfile:"role" datasource:"n|a"` Protocol layers.IPProtocol `json:"protocol" category:"$tag" sub:"network_layer" enumfile:"protocol"` ServerPort uint16 `json:"server_port" category:"$tag" sub:"transport_layer"` VTAPID uint16 `json:"agent_id" category:"$tag" sub:"capture_info"` // Not stored, only determines which database to store in. // When Orgid is 0 or 1, it is stored in database 'flow_metrics', otherwise stored in '<OrgId>_flow_metrics'. OrgId uint16 `json:"org_id" category:"$tag"` TeamID uint16 `json:"team_id" category:"$tag"` TAPPort datatype.TapPort // caculate from TAPPort TapPort uint32 `json:"capture_nic" category:"$tag" sub:"capture_info" datasource:"nm|am"` TapPortType uint8 `json:"capture_nic_type" category:"$tag" sub:"capture_info" enumfile:"capture_nic_type" datasource:"nm|am"` NatSource datatype.NATSource `json:"nat_source" category:"$tag" sub:"capture_info" enumfile:"nat_source" datasource:"nm|am"` TunnelType datatype.TunnelType `json:"tunnel_type" category:"$tag" sub:"tunnel_info" enumfile:"tunnel_type" datasource:"nm|am"` TAPSide TAPSideEnum // only for exporters TAPSideStr string `json:"observation_point" category:"$tag" sub:"capture_info" enumfile:"observation_point" datasource:"nm|am"` TAPType TAPTypeEnum `json:"capture_network_type_id" category:"$tag" sub:"capture_info"` IsIPv4 uint8 `json:"is_ipv4" category:"$tag" sub:"network_layer"` // (8B) 与IP/IP6是共生字段 IsKeyService uint8 L7Protocol datatype.L7Protocol `json:"l7_protocol" category:"$tag" sub:"application_layer" enumfile:"l7_protocol" datasource:"a|am"` AppService string `json:"app_service" category:"$tag" sub:"service_info" datasource:"a|am"` AppInstance string `json:"app_instance" category:"$tag" sub:"service_info" datasource:"a|am"` Endpoint string `json:"endpoint" category:"$tag" sub:"service_info" datasource:"a|am"` BizType uint8 `json:"biz_type" category:"$tag" sub:"capture_info" datasource:"a|am"` SignalSource uint16 `json:"signal_source" category:"$tag" sub:"capture_info" enumfile:"l7_signal_source"` // FIXME: network,network_1m should use l4_signal_source for translate TagSource, TagSource1 uint8 TunnelIPID uint16 }
func AcquireField ¶
func AcquireField() *Field
func CloneField ¶
type FlowLoad ¶
type FlowLoad struct {
Load uint64 `json:"flow_load" category:"$metrics" sub:"l4_throughput"`
}
func (*FlowLoad) ConcurrentMerge ¶
func (*FlowLoad) ReadFromPB ¶
func (*FlowLoad) SequentialMerge ¶
func (*FlowLoad) WriteBlock ¶
type FlowMeter ¶
type FlowMeter struct { Traffic Latency Performance Anomaly FlowLoad }
func (*FlowMeter) ConcurrentMerge ¶
func (*FlowMeter) ReadFromPB ¶
func (*FlowMeter) SequentialMerge ¶
func (*FlowMeter) ToKVString ¶
func (*FlowMeter) WriteBlock ¶
type Latency ¶
type Latency struct { RTTMax uint32 `json:"rtt_max" category:"$metrics" sub:"delay"` // us,Trident保证时延最大值不会超过3600s,能容纳在u32内 RTTClientMax uint32 `json:"rtt_client_max" category:"$metrics" sub:"delay"` // us RTTServerMax uint32 `json:"rtt_server_max" category:"$metrics" sub:"delay"` // us SRTMax uint32 `json:"srt_max" category:"$metrics" sub:"delay"` // us ARTMax uint32 `json:"art_max" category:"$metrics" sub:"delay"` // us RRTMax uint32 `json:"rrt_max" category:"$metrics" sub:"delay"` // us CITMax uint32 `json:"cit_max" category:"$metrics" sub:"delay"` // client idle time max RTTSum uint64 `json:"rtt_sum" category:"$metrics" sub:"delay"` // us RTTClientSum uint64 `json:"rtt_client_sum" category:"$metrics" sub:"delay"` // us RTTServerSum uint64 `json:"rtt_server_sum" category:"$metrics" sub:"delay"` // us SRTSum uint64 `json:"srt_sum" category:"$metrics" sub:"delay"` // us ARTSum uint64 `json:"art_sum" category:"$metrics" sub:"delay"` // us RRTSum uint64 `json:"rrt_sum" category:"$metrics" sub:"delay"` // us CITSum uint64 `json:"cit_sum" category:"$metrics" sub:"delay"` RTTCount uint32 `json:"rtt_count" category:"$metrics" sub:"delay"` RTTClientCount uint32 `json:"rtt_client_count" category:"$metrics" sub:"delay"` RTTServerCount uint32 `json:"rtt_server_count" category:"$metrics" sub:"delay"` SRTCount uint32 `json:"srt_count" category:"$metrics" sub:"delay"` ARTCount uint32 `json:"art_count" category:"$metrics" sub:"delay"` RRTCount uint32 `json:"rrt_count" category:"$metrics" sub:"delay"` CITCount uint32 `json:"cit_count" category:"$metrics" sub:"delay"` }
func (*Latency) ConcurrentMerge ¶
func (*Latency) ReadFromPB ¶
func (*Latency) SequentialMerge ¶
func (*Latency) WriteBlock ¶
WriteBlock和LatencyColumns的列需要按顺序一一对应
type MetricsTableID ¶
type MetricsTableID uint8
const ( NETWORK_1M MetricsTableID = iota NETWORK_MAP_1M APPLICATION_1M APPLICATION_MAP_1M TRAFFIC_POLICY_1M NETWORK_1S NETWORK_MAP_1S APPLICATION_1S APPLICATION_MAP_1S METRICS_TABLE_ID_MAX )
func MetricsTableNameToID ¶
func MetricsTableNameToID(name string) MetricsTableID
func (MetricsTableID) TableCode ¶
func (i MetricsTableID) TableCode() Code
func (MetricsTableID) TableName ¶
func (i MetricsTableID) TableName() string
type MiniField ¶
type MiniField struct { // 用于区分不同的agent及其不同的pipeline,用于如下场景: // - agent和ingester之间的数据传输 // - ingester写入clickhouse,作用类似_id,序列化为_tid GlobalThreadID uint8 IsIPv6 uint8 // 与IP/IP6是共生字段 L3EpcID int16 L3EpcID1 int16 MAC, MAC1 uint64 Direction DirectionEnum Protocol layers.IPProtocol // (8B) ACLGID uint16 ServerPort uint16 VTAPID uint16 TAPPort datatype.TapPort TAPType TAPTypeEnum L7Protocol datatype.L7Protocol TunnelIPID uint16 AppService string AppInstance string // contains filtered or unexported fields }
func AcquireMiniField ¶
func AcquireMiniField() *MiniField
func CloneMiniField ¶
type MiniTag ¶
func AcquireMiniTag ¶
func AcquireMiniTag() *MiniTag
func (*MiniTag) Decode ¶
func (t *MiniTag) Decode(_ *codec.SimpleDecoder)
func (*MiniTag) GetTAPType ¶
type Performance ¶
type Performance struct { RetransTx uint64 `json:"retrans_tx" category:"$metrics"` RetransRx uint64 `json:"retrans_rx" category:"$metrics"` ZeroWinTx uint64 `json:"zero_win_tx" category:"$metrics"` ZeroWinRx uint64 `json:"zero_win_rx" category:"$metrics"` RetransSyn uint32 `json:"retrans_syn" category:"$metrics"` RetransSynack uint32 `json:"retrans_synack" category:"$metrics"` }
func (*Performance) ConcurrentMerge ¶
func (a *Performance) ConcurrentMerge(other *Performance)
func (*Performance) MarshalTo ¶
func (a *Performance) MarshalTo(b []byte) int
func (*Performance) ReadFromPB ¶
func (a *Performance) ReadFromPB(p *pb.Performance)
func (*Performance) Reverse ¶
func (a *Performance) Reverse()
func (*Performance) SequentialMerge ¶
func (a *Performance) SequentialMerge(other *Performance)
func (*Performance) WriteBlock ¶
func (a *Performance) WriteBlock(block *ckdb.Block)
WriteBlock的列和PerformanceColumns需要按顺序一一对应
func (*Performance) WriteToPB ¶
func (a *Performance) WriteToPB(p *pb.Performance)
type TAPSideEnum ¶
type TAPSideEnum uint8
func (TAPSideEnum) String ¶
func (s TAPSideEnum) String() string
type TAPTypeEnum ¶
type TAPTypeEnum uint8
TAP: Traffic Access Point
Indicates the flow data collection location. Currently supports 255 acquisition locations. The traffic in cloud is uniformly represented by a special value `3`, and the other values represent the traffic collected from optical splitting and mirroring at different locations in the IDC.
Note: For historical reasons, we use the confusing term VTAP to refer to deepflow-agent, and agent_id to represent the id of a deepflow-agent.
const ( IDC_MIN TAPTypeEnum = 1 // 1~2, 4~255: IDC CLOUD TAPTypeEnum = 3 )
type Tag ¶
func AcquireTag ¶
func AcquireTag() *Tag
func (*Tag) DatabaseSuffix ¶
func (*Tag) DatabaseSuffixID ¶
func (*Tag) GetTAPType ¶
func (*Tag) ReadFromPB ¶
func (*Tag) ToKVString ¶
type TagSource ¶
type TagSource uint8
const ( GpId TagSource = 1 << iota // if the GpId exists but the podId does not exist, first obtain the podId through the GprocessId table delivered by the Controller PodId // use vtapId + podId to match first Mac // if vtapId + podId cannot be matched, finally use Mac/EpcIP to match resources EpcIP Peer // Multicast, filled with peer information Agent // traffic on the 'lo' port uses the Agent's IP and Epc to match resource information. None TagSource = 0 )
type Traffic ¶
type Traffic struct { PacketTx uint64 `json:"packet_tx" category:"$metrics" sub:"l3_throughput"` PacketRx uint64 `json:"packet_rx" category:"$metrics" sub:"l3_throughput"` ByteTx uint64 `json:"byte_tx" category:"$metrics" sub:"l3_throughput"` ByteRx uint64 `json:"byte_rx" category:"$metrics" sub:"l3_throughput"` L3ByteTx uint64 `json:"l3_byte_tx" category:"$metrics" sub:"l3_throughput"` L3ByteRx uint64 `json:"l3_byte_rx" category:"$metrics" sub:"l3_throughput"` L4ByteTx uint64 `json:"l4_byte_tx" category:"$metrics" sub:"l4_throughput"` L4ByteRx uint64 `json:"l4_byte_rx" category:"$metrics" sub:"l4_throughput"` NewFlow uint64 `json:"new_flow" category:"$metrics" sub:"l4_throughput"` ClosedFlow uint64 `json:"closed_flow" category:"$metrics" sub:"l4_throughput"` L7Request uint32 `json:"l7_request" category:"$metrics" sub:"application"` L7Response uint32 `json:"l7_response" category:"$metrics" sub:"application"` SynCount uint32 `json:"syn_count" category:"$metrics" sub:"l4_throughput"` SynackCount uint32 `json:"synack_count" category:"$metrics" sub:"l4_throughput"` DirectionScore uint8 `json:"direction_score" category:"$metrics" sub:"l4_throughput"` }
func (*Traffic) ConcurrentMerge ¶
func (*Traffic) ReadFromPB ¶
func (*Traffic) SequentialMerge ¶
func (*Traffic) WriteBlock ¶
WriteBlock的列需和Columns 按顺序一一对应
type UniversalTag ¶
type UniversalTag struct { IP6 net.IP // FIXME: merge IP6 and IP IP uint32 L3EpcID int32 // (8B) L3DeviceID uint32 RegionID uint16 SubnetID uint16 HostID uint16 AZID uint16 PodClusterID uint16 PodNSID uint16 PodID uint32 PodNodeID uint32 PodGroupID uint32 ServiceID uint32 AutoInstanceID uint32 AutoServiceID uint32 GPID uint32 IsIPv6 uint8 L3DeviceType DeviceType AutoInstanceType uint8 AutoServiceType uint8 VTAPID uint16 }
func (*UniversalTag) WriteBlock ¶
func (t *UniversalTag) WriteBlock(block *ckdb.Block)
Note: The order of Write() must be consistent with the order of append() in GenUniversalTagColumns. Currently all fields are sorted lexicographically by name.
type UsageMeter ¶
type UsageMeter struct { PacketTx uint64 `json:"packet_tx" category:"$metrics" sub:"NPB"` PacketRx uint64 `json:"packet_rx" category:"$metrics" sub:"NPB"` ByteTx uint64 `json:"byte_tx" category:"$metrics" sub:"NPB"` ByteRx uint64 `json:"byte_rx" category:"$metrics" sub:"NPB"` L3ByteTx uint64 `json:"l3_byte_tx" category:"$metrics" sub:"NPB"` L3ByteRx uint64 `json:"l3_byte_rx" category:"$metrics" sub:"NPB"` L4ByteTx uint64 `json:"l4_byte_tx" category:"$metrics" sub:"NPB"` L4ByteRx uint64 `json:"l4_byte_rx" category:"$metrics" sub:"NPB"` }
func (*UsageMeter) ConcurrentMerge ¶
func (m *UsageMeter) ConcurrentMerge(other Meter)
func (*UsageMeter) ID ¶
func (m *UsageMeter) ID() uint8
func (*UsageMeter) MarshalTo ¶
func (m *UsageMeter) MarshalTo(b []byte) int
func (*UsageMeter) Merge ¶
func (m *UsageMeter) Merge(other *UsageMeter)
func (*UsageMeter) Name ¶
func (m *UsageMeter) Name() string
func (*UsageMeter) ReadFromPB ¶
func (m *UsageMeter) ReadFromPB(p *pb.UsageMeter)
func (*UsageMeter) Reverse ¶
func (m *UsageMeter) Reverse()
func (*UsageMeter) SequentialMerge ¶
func (m *UsageMeter) SequentialMerge(other Meter)
func (*UsageMeter) SortKey ¶
func (m *UsageMeter) SortKey() uint64
func (*UsageMeter) ToKVString ¶
func (m *UsageMeter) ToKVString() string
func (*UsageMeter) VTAPName ¶
func (m *UsageMeter) VTAPName() string
func (*UsageMeter) WriteBlock ¶
func (m *UsageMeter) WriteBlock(block *ckdb.Block)
WriteBlock需要和Colums的列一一对应
func (*UsageMeter) WriteToPB ¶
func (m *UsageMeter) WriteToPB(p *pb.UsageMeter)