Documentation ¶
Index ¶
Constants ¶
View Source
const (
// InsertOrUpdateTimeoutSec is the timeout seconds of InsertOrUpdateHostFlows.
InsertOrUpdateTimeoutSec = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
*pgx.Conn
}
DB represents a Database handler.
func (*DB) CreateSchema ¶
CreateSchema creates the table schemas defined by the paths including Schemas.
func (*DB) FindActiveFlows ¶
func (db *DB) FindActiveFlows(cond *FindFlowsCond) (Flows, error)
FindActiveFlows queries active flows to CMDB by the slice of ipaddrs.
func (*DB) FindPassiveFlows ¶
func (db *DB) FindPassiveFlows(cond *FindFlowsCond) (Flows, error)
FindPassiveFlows queries passive flows to CMDB by the slice of ipaddrs.
func (*DB) InsertOrUpdateHostFlows ¶
InsertOrUpdateHostFlows insert host flows or update it if the same flow exists.
type FindFlowsCond ¶ added in v0.6.0
FindFlowsCond represents a query condition for FindActiveFlows or FindPassiveFlows.
type Node ¶
type Node struct { IPAddr net.IP Port int // 0 if active node Pgid int // Process Group ID (Linux) Pname string // Process Name (Linux) }
Node represents a minimum unit of a graph tree.
Click to show internal directories.
Click to hide internal directories.