Documentation ¶
Index ¶
- Constants
- type Callback
- type ConnKey
- type ConnectMonitor
- func (c *ConnectMonitor) GetMapSize() int
- func (c *ConnectMonitor) ReadInConnectExitSyscall(event *model.KindlingEvent) (*ConnectionStats, error)
- func (c *ConnectMonitor) ReadInTcpConnect(event *model.KindlingEvent) (*ConnectionStats, error)
- func (c *ConnectMonitor) ReadInTcpSetState(event *model.KindlingEvent) (*ConnectionStats, error)
- func (c *ConnectMonitor) ReadSendRequestSyscall(event *model.KindlingEvent) (*ConnectionStats, error)
- func (c *ConnectMonitor) TrimConnectionsWithTcpStat(waitForEventSecond int) []*ConnectionStats
- type ConnectionStats
- type EventType
- type NetSocketStateMap
- type SocketKey
- type State
- type StateMachine
- type StateType
- type StatesResource
Constants ¶
View Source
const HostProc = "HOST_PROC_PATH"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback func(connStats *ConnectionStats, connMap map[ConnKey]*ConnectionStats) *ConnectionStats
type ConnectMonitor ¶
type ConnectMonitor struct {
// contains filtered or unexported fields
}
ConnectMonitor reads in events related to TCP connect operations and updates its status to record the connection procedure. This is not thread safe to use.
func NewConnectMonitor ¶
func NewConnectMonitor(logger *component.TelemetryLogger) *ConnectMonitor
func (*ConnectMonitor) GetMapSize ¶
func (c *ConnectMonitor) GetMapSize() int
func (*ConnectMonitor) ReadInConnectExitSyscall ¶
func (c *ConnectMonitor) ReadInConnectExitSyscall(event *model.KindlingEvent) (*ConnectionStats, error)
func (*ConnectMonitor) ReadInTcpConnect ¶
func (c *ConnectMonitor) ReadInTcpConnect(event *model.KindlingEvent) (*ConnectionStats, error)
func (*ConnectMonitor) ReadInTcpSetState ¶
func (c *ConnectMonitor) ReadInTcpSetState(event *model.KindlingEvent) (*ConnectionStats, error)
func (*ConnectMonitor) ReadSendRequestSyscall ¶
func (c *ConnectMonitor) ReadSendRequestSyscall(event *model.KindlingEvent) (*ConnectionStats, error)
func (*ConnectMonitor) TrimConnectionsWithTcpStat ¶
func (c *ConnectMonitor) TrimConnectionsWithTcpStat(waitForEventSecond int) []*ConnectionStats
type ConnectionStats ¶
type ConnectionStats struct { Pid uint32 Comm string ContainerId string ConnKey ConnKey StateMachine *StateMachine InitialTimestamp uint64 EndTimestamp uint64 Code int }
func (*ConnectionStats) GetConnectDuration ¶
func (c *ConnectionStats) GetConnectDuration() int64
type NetSocketStateMap ¶
NetSocketStateMap represents the map between socket and its state.
func NewPidTcpStat ¶
func NewPidTcpStat(hostProc string, pid int) (NetSocketStateMap, error)
type StateMachine ¶
type StateMachine struct {
// contains filtered or unexported fields
}
func NewStateMachine ¶
func NewStateMachine(initialState StateType, statesResource StatesResource, connStats *ConnectionStats) *StateMachine
func (*StateMachine) GetCurrentState ¶
func (s *StateMachine) GetCurrentState() StateType
func (*StateMachine) GetLastState ¶
func (s *StateMachine) GetLastState() StateType
func (*StateMachine) ReceiveEvent ¶
func (s *StateMachine) ReceiveEvent(event EventType, connMap map[ConnKey]*ConnectionStats) (*ConnectionStats, error)
type StatesResource ¶
Click to show internal directories.
Click to hide internal directories.