common

package
v0.0.0-...-9634a1a Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 11 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
	InternatIpType = 0

	PodType     = 10
	PodNodeType = 14

	PodGroupType = 101
	ServiceType  = 102
)
View Source
const (
	CK_VERSION             = "v6.2.0.6" // 用于表示clickhouse的表版本号
	DEFAULT_PCAP_DATA_PATH = "/var/lib/pcap"
)

Variables

This section is empty.

Functions

func GetResourceGl0

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

func GetResourceGl1

func GetResourceGl1(podGroupID, podNodeID, l3DeviceID uint32, l3DeviceType uint8, l3EpcID int32) (uint32, uint8)

func GetResourceGl2

func GetResourceGl2(serviceID, podGroupID, podNodeID, l3DeviceID uint32, l3DeviceType 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) 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