Documentation ¶
Index ¶
Constants ¶
View Source
const ( FLOW_TAG_CACHE_INIT_SIZE = 1 << 14 MIN_FLUSH_CACHE_TIMEOUT = 60 PROMETHEUS_KEYWORD = "prometheus" )
View Source
const (
FLOW_TAG_DB = "flow_tag"
)
Variables ¶
This section is empty.
Functions ¶
func ReleaseFlowTag ¶
func ReleaseFlowTag(t *FlowTag)
Types ¶
type FlowTag ¶
type FlowTag struct { pool.ReferenceCount Timestamp uint32 // s FlowTagInfo }
func AcquireFlowTag ¶
func AcquireFlowTag() *FlowTag
func (*FlowTag) GenCKTable ¶
func (*FlowTag) WriteBlock ¶
type FlowTagCache ¶
type FlowTagCache struct { Id int FieldCache, FieldValueCache *lru.Cache[FlowTagInfo, uint32] CacheFlushTimeout uint32 // only for prometheus PrometheusFieldCache, PrometheusFieldValueCache *lru128.U128LRU // temporary buffers for generating new flow_tags FlowTagInfoBuffer FlowTagInfo Fields []interface{} FieldValues []interface{} }
func NewFlowTagCache ¶
func NewFlowTagCache(name string, id int, cacheFlushTimeout, cacheMaxSize uint32) *FlowTagCache
type FlowTagInfo ¶
type FlowTagInfo struct { Table string // Represents virtual_table_name in ext_metrics FieldName string FieldValue string // IDs only for prometheus TableId uint32 FieldNameId uint32 FieldValueId uint32 VpcId int32 // XXX: can use int16 PodNsId uint16 FieldType FieldType }
This structure will be used as a map key, and it is hoped to be as compact as possible in terms of memory layout. In addition, in order to distinguish as early as possible when comparing two values, put the highly distinguishable fields at the front.
type FlowTagWriter ¶
type FlowTagWriter struct { Cache *FlowTagCache utils.Closable // contains filtered or unexported fields }
func NewFlowTagWriter ¶
func NewFlowTagWriter( decoderIndex int, name string, srcDB string, ttl int, partition ckdb.TimeFuncType, config *config.Config, writerConfig *config.CKWriterConfig) (*FlowTagWriter, error)
func (*FlowTagWriter) GetCounter ¶
func (w *FlowTagWriter) GetCounter() interface{}
func (*FlowTagWriter) Write ¶
func (w *FlowTagWriter) Write(t TagType, values ...interface{})
func (*FlowTagWriter) WriteFieldsAndFieldValuesInCache ¶
func (w *FlowTagWriter) WriteFieldsAndFieldValuesInCache()
Click to show internal directories.
Click to hide internal directories.