Documentation
¶
Index ¶
Constants ¶
View Source
const GenerationEnvName = "SERVER_STARTER_GENERATION"
GenerationEnvName is the environment name for the generation number.
View Source
const PortEnvName = "SERVER_STARTER_PORT"
PortEnvName is the environment name for server_starter configures.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Starter ¶
type Starter struct {
Command string
Args []string
// Ports to bind to (addr:port or port, so it's a string)
Ports []string
// Paths at where to listen using unix socket.
Paths []string
Interval time.Duration
// Signal to send when HUP is received
SignalOnHUP os.Signal
// Signal to send when TERM is received
SignalOnTERM os.Signal
// KillOlddeplay is time to suspend to send a signal to the old worker.
KillOldDelay time.Duration
// if set, writes the status of the server process(es) to the file
StatusFile string
// if set, writes the process id of the start_server process to the file
PidFile string
// working directory, start_server do chdir to before exec (optional)
Dir string
// enables automatic restart by time.
EnableAutoRestart bool
// automatic restart interval (default 360). It is used with EnableAutoRestart option.
AutoRestartInterval time.Duration
// directory that contains environment variables to the server processes.
EnvDir string
// prints the version number
Version bool
// prints the help message.
Help bool
// daemonize the server. (UNIMPLEMENTED)
Daemonize bool
// if set, redirects STDOUT and STDERR to given file or command
LogFile string
// this is a wrapper command that reads the pid of the start_server process from --pid-file,
// sends SIGHUP to the process and waits until the server(s) of the older generation(s) die by monitoring the contents of the --status-file
Restart bool
// this is a wrapper command that reads the pid of the start_server process from --pid-file, sends SIGTERM to the process.
Stop bool
// contains filtered or unexported fields
}
Starter is an implement of Server::Starter.
func (*Starter) PacketConns ¶ added in v0.0.3
func (s *Starter) PacketConns() []net.PacketConn
PacketConns returns the PacketConns.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.