Documentation
¶
Index ¶
- Constants
- type Collector
- type Connection
- type EMA
- type EMAValue
- type ProcessInfo
- type ProcessTask
- type Service
- func (s *Service) Close()
- func (s *Service) DeleteProfile(ctx echo.Context) error
- func (s *Service) GetConnections(ctx echo.Context) error
- func (s *Service) GetCustomMetrics(ctx echo.Context) error
- func (s *Service) GetOpenFiles(ctx echo.Context) error
- func (s *Service) GetProcessInfo(ctx echo.Context) error
- func (s *Service) GetProfile(ctx echo.Context) error
- func (s *Service) GetProfileList(ctx echo.Context) error
- func (s *Service) GetUsage(ctx echo.Context) error
- func (s *Service) Register(name string, collector Collector)
- func (s *Service) StartProfile(ctx echo.Context) error
- func (s *Service) StopProfile(ctx echo.Context) error
- func (s *Service) TraceReverseProxy(ctx echo.Context) error
- func (s *Service) Unregister(name string)
- type ServiceConfig
Constants ¶
View Source
const ( // DefaultAnomalyDetectInterval is the default interval to detect anomaly. DefaultAnomalyDetectInterval = 30 * time.Second // DefaultThreshold is the default threshold to detect anomaly. DefaultThreshold = 1.5 // DefaultSuspendTimes is the default times to suspend when dump trace file. DefaultSuspendTimes = 10 )
View Source
const ( DefaultTimeout = 30 DefaultTraceFilePath = "./trace" )
View Source
const ( PendingState = "pending" RunningState = "running" )
View Source
const (
DefaultAlpha = 0.3
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { SourceIP string `json:"sourceIP"` SourcePort int `json:"sourcePort"` DestIP string `json:"destIP"` DestPort int `json:"destPort"` State string `json:"state"` }
Connection is the information of a connection.
type EMA ¶
type EMA struct {
// contains filtered or unexported fields
}
EMA is the Exponential Moving Average.
type ProcessInfo ¶
type ProcessInfo struct { Name string `json:"name"` PID int `json:"pid"` Ppid int32 `json:"ppid"` Cmd string `json:"cmd"` Pwd string `json:"pwd"` Envs []string `json:"envs"` NumFDs int32 `json:"numFDs"` NumThreads int32 `json:"numThreads"` UserName string `json:"userName"` Path string `json:"path"` GoVersion string `json:"goVersion"` }
ProcessInfo is the information of a process.
type ProcessTask ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the service.
func (*Service) DeleteProfile ¶
func (*Service) GetConnections ¶
func (*Service) GetCustomMetrics ¶
func (*Service) GetOpenFiles ¶
func (*Service) GetProcessInfo ¶
func (*Service) GetProfile ¶
func (*Service) GetProfileList ¶
func (*Service) StartProfile ¶
func (*Service) StopProfile ¶
func (*Service) TraceReverseProxy ¶
func (*Service) Unregister ¶
type ServiceConfig ¶
type ServiceConfig struct { ProcessID int `yaml:"processID" json:"processID"` Persist bool `yaml:"persist" json:"persist"` ServicePort int }
ServiceConfig is the configuration for service.
Click to show internal directories.
Click to hide internal directories.