Documentation
¶
Index ¶
- type AccessLogContext
- type ActiveConnection
- type CloseEventWithNotify
- type Config
- type ConnectEventWithSocket
- type ConnectionInfo
- type ConnectionManager
- func (c *ConnectionManager) AddNewProcess(pid int32, entities []api.ProcessInterface)
- func (c *ConnectionManager) AddProcessListener(listener ProcessListener)
- func (c *ConnectionManager) Find(event events.Event) *ConnectionInfo
- func (c *ConnectionManager) GetExcludeNamespaces() []string
- func (c *ConnectionManager) OnBuildConnectionLogFinished()
- func (c *ConnectionManager) OnConnectEvent(event *events.SocketConnectEvent, pair *ip.SocketPair)
- func (c *ConnectionManager) OnConnectionClose(event *events.SocketCloseEvent) *CloseEventWithNotify
- func (c *ConnectionManager) OnNewProcessExecuting(pid int32)
- func (c *ConnectionManager) ProcessIsMonitor(pid uint32) bool
- func (c *ConnectionManager) RecheckAllProcesses(processes map[int32][]api.ProcessInterface)
- func (c *ConnectionManager) RegisterNewFlushListener(listener FlusherListener)
- func (c *ConnectionManager) RegisterProcessor(processor ConnectionProcessor)
- func (c *ConnectionManager) RemoveProcess(pid int32, entities []api.ProcessInterface)
- func (c *ConnectionManager) SkipAllDataAnalyze(conID, ranID uint64)
- func (c *ConnectionManager) Start(ctx context.Context, accessLogContext *AccessLogContext)
- func (c *ConnectionManager) Stop()
- type ConnectionProcessFinishCallback
- type ConnectionProcessor
- type FlushConfig
- type FlusherListener
- type KernelLog
- type LogType
- type MonitorFilter
- type ProcessListener
- type ProtocolAnalyzeConfig
- type ProtocolLog
- type Queue
- type QueueConsumer
- type StaticMonitorFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLogContext ¶
type ActiveConnection ¶
type CloseEventWithNotify ¶
type CloseEventWithNotify struct {
*events.SocketCloseEvent
// contains filtered or unexported fields
}
type Config ¶
type Config struct {
module.Config
Active bool `mapstructure:"active"`
ExcludeNamespaces string `mapstructure:"exclude_namespaces"`
ExcludeClusters string `mapstructure:"exclude_cluster"`
Flush FlushConfig `mapstructure:"flush"`
ProtocolAnalyze ProtocolAnalyzeConfig `mapstructure:"protocol_analyze"`
}
type ConnectEventWithSocket ¶
type ConnectEventWithSocket struct {
*events.SocketConnectEvent
SocketPair *ip.SocketPair
}
type ConnectionInfo ¶
type ConnectionInfo struct {
ConnectionID uint64
RandomID uint64
RPCConnection *v3.AccessLogConnection
MarkDeletable bool
PID uint32
Socket *ip.SocketPair
}
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
func NewConnectionManager ¶
func NewConnectionManager(config *Config, moduleMgr *module.Manager, bpfLoader *bpf.Loader, filter MonitorFilter) *ConnectionManager
func (*ConnectionManager) AddNewProcess ¶
func (c *ConnectionManager) AddNewProcess(pid int32, entities []api.ProcessInterface)
func (*ConnectionManager) AddProcessListener ¶
func (c *ConnectionManager) AddProcessListener(listener ProcessListener)
func (*ConnectionManager) Find ¶
func (c *ConnectionManager) Find(event events.Event) *ConnectionInfo
func (*ConnectionManager) GetExcludeNamespaces ¶ added in v0.7.0
func (c *ConnectionManager) GetExcludeNamespaces() []string
func (*ConnectionManager) OnBuildConnectionLogFinished ¶
func (c *ConnectionManager) OnBuildConnectionLogFinished()
OnBuildConnectionLogFinished notify the connection log build finished
func (*ConnectionManager) OnConnectEvent ¶
func (c *ConnectionManager) OnConnectEvent(event *events.SocketConnectEvent, pair *ip.SocketPair)
func (*ConnectionManager) OnConnectionClose ¶
func (c *ConnectionManager) OnConnectionClose(event *events.SocketCloseEvent) *CloseEventWithNotify
func (*ConnectionManager) OnNewProcessExecuting ¶
func (c *ConnectionManager) OnNewProcessExecuting(pid int32)
func (*ConnectionManager) ProcessIsMonitor ¶
func (c *ConnectionManager) ProcessIsMonitor(pid uint32) bool
func (*ConnectionManager) RecheckAllProcesses ¶
func (c *ConnectionManager) RecheckAllProcesses(processes map[int32][]api.ProcessInterface)
func (*ConnectionManager) RegisterNewFlushListener ¶ added in v0.7.0
func (c *ConnectionManager) RegisterNewFlushListener(listener FlusherListener)
func (*ConnectionManager) RegisterProcessor ¶
func (c *ConnectionManager) RegisterProcessor(processor ConnectionProcessor)
func (*ConnectionManager) RemoveProcess ¶
func (c *ConnectionManager) RemoveProcess(pid int32, entities []api.ProcessInterface)
func (*ConnectionManager) SkipAllDataAnalyze ¶
func (c *ConnectionManager) SkipAllDataAnalyze(conID, ranID uint64)
func (*ConnectionManager) Start ¶
func (c *ConnectionManager) Start(ctx context.Context, accessLogContext *AccessLogContext)
func (*ConnectionManager) Stop ¶
func (c *ConnectionManager) Stop()
type ConnectionProcessFinishCallback ¶
type ConnectionProcessFinishCallback func()
type ConnectionProcessor ¶
type ConnectionProcessor interface {
OnConnectionClose(event *events.SocketCloseEvent, callback ConnectionProcessFinishCallback)
}
type FlushConfig ¶
type FlusherListener ¶ added in v0.7.0
type FlusherListener interface {
// ReadyToFlushConnection notify which connection ready to flush
ReadyToFlushConnection(connection *ConnectionInfo, getConnectionFromEvent events.Event)
}
type MonitorFilter ¶ added in v0.7.0
type MonitorFilter interface {
// ShouldIncludeProcesses returns true if the processes should be included in monitoring.
ShouldIncludeProcesses(process []api.ProcessInterface) []api.ProcessInterface
// ExcludeNamespaces returns a list of namespaces that should be excluded from monitoring.
ExcludeNamespaces() []string
}
type ProcessListener ¶
type ProtocolAnalyzeConfig ¶
type ProtocolLog ¶
type ProtocolLog struct {
KernelLogs []*events.SocketDetailEvent
Protocol *v3.AccessLogProtocolLogs
}
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func NewQueue ¶
func NewQueue(maxFlushCount int, period time.Duration, consumer QueueConsumer) *Queue
func (*Queue) AppendProtocolLog ¶
func (q *Queue) AppendProtocolLog(kernelLogs []*events.SocketDetailEvent, protocol *v3.AccessLogProtocolLogs)
type QueueConsumer ¶
type QueueConsumer interface {
Consume(kernels chan *KernelLog, protocols chan *ProtocolLog)
}
type StaticMonitorFilter ¶ added in v0.7.0
type StaticMonitorFilter struct {
// contains filtered or unexported fields
}
func NewStaticMonitorFilter ¶ added in v0.7.0
func NewStaticMonitorFilter(namespaces, clusters []string) *StaticMonitorFilter
func (*StaticMonitorFilter) ExcludeNamespaces ¶ added in v0.7.0
func (s *StaticMonitorFilter) ExcludeNamespaces() []string
func (*StaticMonitorFilter) ShouldIncludeProcesses ¶ added in v0.7.0
func (s *StaticMonitorFilter) ShouldIncludeProcesses(processes []api.ProcessInterface) (res []api.ProcessInterface)
Click to show internal directories.
Click to hide internal directories.