common

package
v0.0.0-...-8d187f3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MODULE_INGESTER             = "ingester_"
	QUEUE_STATS_MODULE_INGESTER = queue.OptionModule(MODULE_INGESTER)
)
View Source
const (
	CK_VERSION = "v6.6.3.0" // 用于表示clickhouse的表版本号
)

Variables

This section is empty.

Functions

func GetAutoInstance

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

func GetAutoService

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

func IsPodServiceIP

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

func NewCKConnection

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

func RegetInfoFromIP

func RegetInfoFromIP(orgId uint16, 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