common

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODULE_INGESTER             = "ingester_"
	QUEUE_STATS_MODULE_INGESTER = queue.OptionModule(MODULE_INGESTER)
)
View Source
const (
	IpType         = 255
	InternetIpType = 0

	PodType     = 10
	PodNodeType = 14

	ServiceType = 102

	ProcessType = 120
)
View Source
const (
	CK_VERSION             = "v6.4.4.2" // 用于表示clickhouse的表版本号
	DEFAULT_PCAP_DATA_PATH = "/var/lib/pcap"
)

Variables

This section is empty.

Functions

func GetAutoInstance

func GetAutoInstance(podID, gpID, podNodeID, l3DeviceID uint32, l3DeviceType uint8, l3EpcID int32) (uint32, uint8)

func GetAutoService

func GetAutoService(serviceID, podGroupID, gpID, podNodeID, l3DeviceID uint32, l3DeviceType, podGroupType uint8, l3EpcID int32) (uint32, uint8)

func IsPodServiceIP

func IsPodServiceIP(deviceType zerodoc.DeviceType, podId, podNodeId uint32) bool

func NewCKConnection

func NewCKConnection(addr, username, password string) (*sql.DB, error)

func RegetInfoFromIP

func RegetInfoFromIP(isIPv6 bool, ip6 net.IP, ip4 uint32, epcID int32, platformData *grpc.PlatformInfoTable) *grpc.Info

如果通过MAC匹配平台信息失败,则需要通过IP再获取, 解决工单122/126问题

func RegisterCountableForIngester

func RegisterCountableForIngester(name string, countable stats.Countable, opts ...stats.Option) error

Types

type DBs

type DBs []*sql.DB

func NewCKConnections

func NewCKConnections(addrs []string, username, password string) (DBs, error)

func (DBs) Close

func (s DBs) Close() error

func (DBs) Exec

func (s DBs) Exec(query string, args ...any) (sql.Result, error)

func (DBs) ExecParallel

func (s DBs) ExecParallel(query string, args ...any) (sql.Result, error)

func (DBs) Query

func (s DBs) Query(query string, args ...any) (*sql.Rows, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL