Documentation
¶
Index ¶
- Variables
- func Load(name string, cfg *config.Config, executor, detailedExecutor contracts.Executor) (contracts.ProcessManager, error)
- type Docker
- func (pm *Docker) Attach(ctx context.Context, server *domain.Server, in io.Reader, out io.Writer) error
- func (pm *Docker) GetOutput(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Docker) HasOwnInstallation(server *domain.Server) bool
- func (pm *Docker) Install(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Docker) Metrics(ctx context.Context, server *domain.Server) ([]domain.Metric, error)
- func (pm *Docker) Restart(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Docker) SendInput(ctx context.Context, input string, server *domain.Server, _ io.Writer) (domain.Result, error)
- func (pm *Docker) Start(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Docker) Status(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Docker) Stop(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Docker) Uninstall(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- type Podman
- func (pm *Podman) Attach(_ context.Context, _ *domain.Server, _ io.Reader, _ io.Writer) error
- func (pm *Podman) GetOutput(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Podman) HasOwnInstallation(server *domain.Server) bool
- func (pm *Podman) Install(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Podman) Metrics(ctx context.Context, server *domain.Server) ([]domain.Metric, error)
- func (pm *Podman) Restart(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Podman) SendInput(ctx context.Context, input string, server *domain.Server, _ io.Writer) (domain.Result, error)
- func (pm *Podman) Start(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Podman) Status(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Podman) Stop(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Podman) Uninstall(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- type Simple
- func (pm *Simple) Attach(ctx context.Context, server *domain.Server, in io.Reader, out io.Writer) error
- func (pm *Simple) GetOutput(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Simple) HasOwnInstallation(_ *domain.Server) bool
- func (pm *Simple) Install(_ context.Context, _ *domain.Server, _ io.Writer) (domain.Result, error)
- func (pm *Simple) Metrics(_ context.Context, server *domain.Server) ([]domain.Metric, error)
- func (pm *Simple) Restart(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Simple) SendInput(ctx context.Context, input string, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Simple) Start(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Simple) Status(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Simple) Stop(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Simple) Uninstall(_ context.Context, _ *domain.Server, _ io.Writer) (domain.Result, error)
- type SystemD
- func (pm *SystemD) Attach(ctx context.Context, server *domain.Server, in io.Reader, out io.Writer) error
- func (pm *SystemD) GetOutput(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *SystemD) HasOwnInstallation(_ *domain.Server) bool
- func (pm *SystemD) Install(_ context.Context, _ *domain.Server, _ io.Writer) (domain.Result, error)
- func (pm *SystemD) Metrics(ctx context.Context, server *domain.Server) ([]domain.Metric, error)
- func (pm *SystemD) Restart(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *SystemD) SendInput(ctx context.Context, input string, server *domain.Server, _ io.Writer) (domain.Result, error)
- func (pm *SystemD) Start(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *SystemD) Status(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *SystemD) Stop(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *SystemD) Uninstall(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- type Tmux
- func (pm *Tmux) Attach(ctx context.Context, server *domain.Server, in io.Reader, out io.Writer) error
- func (pm *Tmux) GetOutput(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Tmux) HasOwnInstallation(_ *domain.Server) bool
- func (pm *Tmux) Install(_ context.Context, _ *domain.Server, _ io.Writer) (domain.Result, error)
- func (pm *Tmux) Metrics(_ context.Context, server *domain.Server) ([]domain.Metric, error)
- func (pm *Tmux) Restart(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Tmux) SendInput(ctx context.Context, input string, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Tmux) Start(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Tmux) Status(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Tmux) Stop(ctx context.Context, server *domain.Server, out io.Writer) (domain.Result, error)
- func (pm *Tmux) Uninstall(_ context.Context, _ *domain.Server, _ io.Writer) (domain.Result, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnknownProcessManager = errors.New("unknown process manager") ErrEmptyUser = errors.New("empty user") ErrUserNotFound = errors.New("user not found") ErrInvalidUserPassword = errors.New("invalid user password") ErrEmptyCommand = errors.New("empty command") ErrNotImplemented = errors.New("not implemented") ErrContainerNotRunning = errors.New("container is not running") ErrServiceNotRunning = errors.New("service is not running") )
Functions ¶
Types ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
func (*Docker) HasOwnInstallation ¶
func (*Docker) Metrics ¶
Metrics returns CPU, memory, network and block-IO metrics for the container backing this server. Falls back to the cached liveness gauge alone when the container is missing or stats cannot be read.
type Podman ¶
type Podman struct {
// contains filtered or unexported fields
}
func (*Podman) HasOwnInstallation ¶
func (*Podman) Metrics ¶
Metrics returns CPU, memory, network and block-IO metrics for the container backing this server. Falls back to the cached liveness gauge alone when the container is missing or stats cannot be read.
type Simple ¶
type Simple struct {
// contains filtered or unexported fields
}
func (*Simple) Metrics ¶
Metrics returns only the cached process-active gauge for now. PID-based resource collection (cpu/memory/io via gopsutil/process) is tracked as a follow-up since the simple process manager does not persist PIDs.
type SystemD ¶
type SystemD struct {
// contains filtered or unexported fields
}
func NewSystemD ¶
func (*SystemD) Metrics ¶
Metrics returns CPU, memory, network, block-IO and PID counters for the systemd unit backing this server. Falls back to the cached liveness gauge alone when the unit is unknown or `systemctl show` cannot be executed.
Note: services created before the *Accounting=yes directives were added to `buildServiceConfig` will report zeros (and a suppressed CPU%) until the next start/restart regenerates the unit file.
type Tmux ¶
type Tmux struct {
// contains filtered or unexported fields
}
func (*Tmux) Metrics ¶
Metrics returns only the cached process-active gauge for now. Tmux sessions hold child PIDs needed for resource stats; richer metrics are tracked as a follow-up.