Documentation
¶
Index ¶
- func IsDaemonRunning() bool
- func SocketPath() string
- type BudgetSnapshot
- type ConfigSnapshot
- type DaemonBackend
- type EnforcementSnapshot
- type LoggingSnapshot
- type NotificationSnapshot
- type Server
- type SessionDetailResponse
- type SessionInfo
- type SourcesSnapshot
- type SpinDetectionSnapshot
- type StatusResponse
- type TracesSnapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDaemonRunning ¶
func IsDaemonRunning() bool
func SocketPath ¶
func SocketPath() string
Types ¶
type BudgetSnapshot ¶
type ConfigSnapshot ¶
type ConfigSnapshot struct {
Budget BudgetSnapshot `json:"budget"`
SpinDetection SpinDetectionSnapshot `json:"spin_detection"`
Enforcement EnforcementSnapshot `json:"enforcement"`
Notifications NotificationSnapshot `json:"notifications"`
Sources SourcesSnapshot `json:"sources"`
Traces TracesSnapshot `json:"traces"`
Logging LoggingSnapshot `json:"logging"`
ConfigPath string `json:"config_path"`
}
ConfigSnapshot is a JSON-safe representation of the running config.
type DaemonBackend ¶
type DaemonBackend interface {
GetSessions() []SessionInfo
GetSession(id string) (*SessionDetailResponse, error)
ResumeSession(ctx context.Context, id string) error
KillSession(ctx context.Context, id string) error
GetConfig() ConfigSnapshot
}
type EnforcementSnapshot ¶
type LoggingSnapshot ¶
type NotificationSnapshot ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewWithDaemon ¶
func NewWithDaemon(logger *slog.Logger, backend DaemonBackend) *Server
type SessionDetailResponse ¶
type SessionDetailResponse struct {
SessionInfo
PID int `json:"pid"`
LogPath string `json:"log_path"`
Alerts int `json:"alert_count"`
LastEvent time.Time `json:"last_event"`
}
SessionDetailResponse wraps a single session with extra fields not present in the list view.
type SessionInfo ¶
type SourcesSnapshot ¶
type SpinDetectionSnapshot ¶
type StatusResponse ¶
type StatusResponse struct {
Daemon string `json:"daemon"`
Sessions []SessionInfo `json:"sessions"`
}
type TracesSnapshot ¶
Click to show internal directories.
Click to hide internal directories.