svc_runtime

package
v0.6.40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

HealthStatus returns the Docker health check status for a named service. Returns "healthy", "unhealthy", "starting", or "" (no health check / not found).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSvcMgrName

func GetSvcMgrName() string

func NewDockerClient added in v0.6.34

func NewDockerClient() (dockerAPI, error)

NewDockerClient returns a dockerAPI connected to the local Docker daemon via DOCKER_HOST (or the platform default socket). API version is negotiated automatically.

Types

type DockerService added in v0.6.5

type DockerService struct {
	// contains filtered or unexported fields
}

func (*DockerService) HealthStatus added in v0.6.22

func (d *DockerService) HealthStatus(name string) (string, error)

func (*DockerService) Ice added in v0.6.22

func (d *DockerService) Ice(name string) error

Ice stops the container and removes its image to free disk space. The service record is preserved so the container can be redeployed.

func (*DockerService) Install added in v0.6.5

func (d *DockerService) Install(name, desc, runCmd, workDir string, envVars map[string]string) error

func (*DockerService) Remove added in v0.6.5

func (d *DockerService) Remove(name string) error

func (*DockerService) Start added in v0.6.5

func (d *DockerService) Start(name string) error

func (*DockerService) Status added in v0.6.5

func (d *DockerService) Status(name string) (string, error)

func (*DockerService) Stop added in v0.6.5

func (d *DockerService) Stop(name string) error

type LaunchdManager

type LaunchdManager struct {
	DockerService
}

func (*LaunchdManager) Install

func (l *LaunchdManager) Install(name, desc, runCmd, workDir string, envVars map[string]string) error

func (*LaunchdManager) Remove

func (l *LaunchdManager) Remove(name string) error

func (*LaunchdManager) Status

func (l *LaunchdManager) Status(name string) (string, error)

type NSSMManager

type NSSMManager struct {
	DockerService
}

func (*NSSMManager) Install

func (n *NSSMManager) Install(name, desc, runCmd, workDir string, envVars map[string]string) error

func (*NSSMManager) Remove

func (n *NSSMManager) Remove(name string) error

func (*NSSMManager) Status

func (n *NSSMManager) Status(name string) (string, error)

type ServiceManager

type ServiceManager interface {
	Status(name string) (string, error)
	HealthStatus(name string) (string, error)
	Install(name, desc, runCmd, workDir string, envVars map[string]string) error
	Start(name string) error
	Stop(name string) error
	Remove(name string) error
	Ice(name string) error
}

ServiceManager defines the interface for service management across platforms

func SvcRuntime

func SvcRuntime() (ServiceManager, error)

type SystemdManager

type SystemdManager struct {
	DockerService
}

func (*SystemdManager) Install

func (s *SystemdManager) Install(name, desc, runCmd, workDir string, envVars map[string]string) error

func (*SystemdManager) Status

func (s *SystemdManager) Status(name string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL