Documentation ¶
Index ¶
- func CheckPath() error
- func SetSystemProbePath(path string)
- type Conn
- type RemoteSysProbeUtil
- func (r *RemoteSysProbeUtil) GetCheck(check string) (interface{}, error)
- func (r *RemoteSysProbeUtil) GetConnections(clientID string) (*model.Connections, error)
- func (r *RemoteSysProbeUtil) GetProcStats(pids []int32) (*model.ProcStatsWithPermByPID, error)
- func (r *RemoteSysProbeUtil) GetStats() (map[string]interface{}, error)
- type UDSListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPath ¶
func CheckPath() error
CheckPath is used in conjunction with calling the stats endpoint, since we are calling this From the main agent and want to ensure the socket exists
func SetSystemProbePath ¶
func SetSystemProbePath(path string)
SetSystemProbePath sets where the System probe is listening for connections This needs to be called before GetRemoteSystemProbeUtil.
Types ¶
type Conn ¶
type Conn interface { // GetListener returns the underlying net.Listener GetListener() net.Listener // Stop and clean up resources for the underlying connection Stop() }
Conn is a wrapper over some net.Listener
type RemoteSysProbeUtil ¶
type RemoteSysProbeUtil struct {
// contains filtered or unexported fields
}
RemoteSysProbeUtil wraps interactions with a remote system probe service
func GetRemoteSystemProbeUtil ¶
func GetRemoteSystemProbeUtil() (*RemoteSysProbeUtil, error)
GetRemoteSystemProbeUtil returns a ready to use RemoteSysProbeUtil. It is backed by a shared singleton.
func (*RemoteSysProbeUtil) GetCheck ¶
func (r *RemoteSysProbeUtil) GetCheck(check string) (interface{}, error)
GetCheck returns the output of the specified check
func (*RemoteSysProbeUtil) GetConnections ¶
func (r *RemoteSysProbeUtil) GetConnections(clientID string) (*model.Connections, error)
GetConnections returns a set of active network connections, retrieved from the system probe service
func (*RemoteSysProbeUtil) GetProcStats ¶ added in v0.9.0
func (r *RemoteSysProbeUtil) GetProcStats(pids []int32) (*model.ProcStatsWithPermByPID, error)
GetProcStats returns a set of process stats by querying system-probe
func (*RemoteSysProbeUtil) GetStats ¶
func (r *RemoteSysProbeUtil) GetStats() (map[string]interface{}, error)
GetStats returns the expvar stats of the system probe
type UDSListener ¶
type UDSListener struct {
// contains filtered or unexported fields
}
UDSListener (Unix Domain Socket Listener)
func NewListener ¶
func NewListener(socketAddr string) (*UDSListener, error)
NewListener returns an idle UDSListener
func (*UDSListener) GetListener ¶
func (l *UDSListener) GetListener() net.Listener
GetListener will return the underlying Conn's net.Listener
func (*UDSListener) Stop ¶
func (l *UDSListener) Stop()
Stop closes the UDSListener connection and stops listening