Documentation ¶
Overview ¶
Package bootstrap starts/shuts down the proxy server.
Index ¶
- Constants
- func ShutDownProxy(serverAddr string, shutdownSeconds int) (*spb.Stats, error)
- func ShutdownProxyAsync(serverAddr string, shutdownSeconds int) (*spb.Stats, error)
- func Sigint(pid int) error
- func StartProxy(ctx context.Context, serverAddr, proxyPath string, ...) error
- func StartProxyWithOutput(ctx context.Context, serverAddr, proxyPath, outputDir string, ...) error
Constants ¶
const (
// Proxyname is the name of the RE proxy process.
Proxyname = "reproxy"
)
Variables ¶
This section is empty.
Functions ¶
func ShutDownProxy ¶
ShutDownProxy sends a Shutdown rpc to stop the reproxy process and waits until the process terminates. It will stop waiting if ctx it canceled. The serverAddress value is mapped to process ID through PID file created during reproxy start. The PID file is always removed by the end of the function.
func ShutdownProxyAsync ¶
ShutdownProxyAsync sends a Shutdown rpc to stop the reproxy process and waits until *either* valid stats are returned via RPC or the process terminates. It will stop waiting if ctx it canceled. The serverAddress value is mapped to process ID through PID file created during reproxy start. The PID file is only removed if this function detects the process has terminated before returning.
func StartProxy ¶
func StartProxy(ctx context.Context, serverAddr, proxyPath string, waitSeconds, shutdownSeconds int, args ...string) error
StartProxy starts the proxy; if the proxy is already running, it is shut down first.
func StartProxyWithOutput ¶
func StartProxyWithOutput(ctx context.Context, serverAddr, proxyPath, outputDir string, waitSeconds, shutdownSeconds int, startTime time.Time, args ...string) error
StartProxyWithOutput starts the proxy; if the proxy is already running, it is shut down first. Redirects stdout and stderr to file under given output directory.
Types ¶
This section is empty.