Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultUser = "uncloud" DefaultGossipPort = 51001 DefaultAPIPort = 51002 )
View Source
const ( DefaultCommand = "corrosion" DefaultDataDir = "/var/lib/uncloud/corrosion" )
View Source
const DefaultSystemdUnit = "uncloud-corrosion.service"
View Source
const (
LatestImage = "ghcr.io/psviderski/corrosion:latest"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminConfig ¶
type AdminConfig struct {
Path string `toml:"path"`
}
type Config ¶
type Config struct {
DB DBConfig `toml:"db"`
Gossip GossipConfig `toml:"gossip"`
API APIConfig `toml:"api"`
Admin AdminConfig `toml:"admin"`
}
Config represents the Corrosion config.
type DockerService ¶
type DockerService struct {
Client *client.Client
Image string
Name string
DataDir string
User string
}
func NewDockerService ¶
func NewDockerService(cli *client.Client, image, name, dataDir string) *DockerService
func (*DockerService) Running ¶
func (s *DockerService) Running() bool
type GossipConfig ¶
type SubprocessService ¶
type SubprocessService struct {
Command string
DataDir string
// contains filtered or unexported fields
}
SubprocessService implements the Service interface by running the service as a subprocess.
func DefaultSubprocessService ¶
func DefaultSubprocessService() *SubprocessService
func (*SubprocessService) Running ¶
func (s *SubprocessService) Running() bool
type SystemdService ¶
func DefaultSystemdService ¶
func DefaultSystemdService(dataDir string) *SystemdService
func (*SystemdService) Running ¶
func (s *SystemdService) Running() bool
Click to show internal directories.
Click to hide internal directories.