dbwriter

package
v1.6.65 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PCAP_DB    = "flow_log"
	PCAP_TABLE = "l7_packet"
)
View Source
const (
	DefaultPcapPartition = ckdb.TimeFuncHour
)

Variables

This section is empty.

Functions

func GenPcapCKTable

func GenPcapCKTable(cluster, storagePolicy, ckdbType string, ttl int, coldStorage *ckdb.ColdStorage) *ckdb.Table

func PcapStoreColumns

func PcapStoreColumns() []*ckdb.Column

func ReleasePcapStore

func ReleasePcapStore(l *PcapStore)

Types

type PcapStore

type PcapStore struct {
	Time        uint32
	StartTime   int64
	EndTime     int64
	FlowID      uint64
	VtapID      uint16
	PacketCount uint32
	PacketBatch []byte
	AclGids     []uint16

	// Not stored, only determines which database to store in.
	// When Orgid is 0 or 1, it is stored in database 'flow_log', otherwise stored in '<OrgId>_flow_log'.
	OrgId  uint16
	TeamID uint16
}

func AcquirePcapStore

func AcquirePcapStore() *PcapStore

func (*PcapStore) OrgID

func (s *PcapStore) OrgID() uint16

func (*PcapStore) Release

func (p *PcapStore) Release()

func (*PcapStore) String

func (p *PcapStore) String() string

func (*PcapStore) WriteBlock

func (s *PcapStore) WriteBlock(block *ckdb.Block)

type PcapWriter

type PcapWriter struct {
	// contains filtered or unexported fields
}

func NewPcapWriter

func NewPcapWriter(config *config.Config) (*PcapWriter, error)

func (*PcapWriter) Write

func (w *PcapWriter) Write(m interface{})

Jump to

Keyboard shortcuts

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