Documentation
¶
Index ¶
- func TestMain(m *testing.M)
- type LogEntry
- type ServiceMetrics
- type SystemdService
- func (s *SystemdService) GetUnitDetails(name string) (*types.SystemdServiceDetails, error)
- func (s *SystemdService) ListUnits() (*types.SystemdServiceList, error)
- func (s *SystemdService) RestartUnit(name string) error
- func (s *SystemdService) StartUnit(name string) error
- func (s *SystemdService) StopUnit(name string) error
- func (s *SystemdService) StreamServiceLogs(ctx context.Context, unitName string, follow bool, numLines int) (<-chan string, <-chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogEntry ¶
type ServiceMetrics ¶
type SystemdService ¶
type SystemdService struct {
// contains filtered or unexported fields
}
func NewSystemdService ¶
func NewSystemdService(logger *slog.Logger) (*SystemdService, error)
func (*SystemdService) GetUnitDetails ¶
func (s *SystemdService) GetUnitDetails(name string) (*types.SystemdServiceDetails, error)
func (*SystemdService) ListUnits ¶
func (s *SystemdService) ListUnits() (*types.SystemdServiceList, error)
func (*SystemdService) RestartUnit ¶
func (s *SystemdService) RestartUnit(name string) error
func (*SystemdService) StartUnit ¶
func (s *SystemdService) StartUnit(name string) error
func (*SystemdService) StopUnit ¶
func (s *SystemdService) StopUnit(name string) error
func (*SystemdService) StreamServiceLogs ¶
func (s *SystemdService) StreamServiceLogs(ctx context.Context, unitName string, follow bool, numLines int) (<-chan string, <-chan error)
StreamServiceLogs retrieves the last numLines log entries for the specified unit and then continues streaming new logs as they arrive The follow parameter is ignored - we always stream real-time updates
Click to show internal directories.
Click to hide internal directories.