bootstrap

package
v0.0.0-...-223af15 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package bootstrap starts/shuts down the proxy server.

Index

Constants

View Source
const (
	// Proxyname is the name of the RE proxy process.
	Proxyname = "reproxy"
)

Variables

This section is empty.

Functions

func ShutDownProxy

func ShutDownProxy(serverAddr string, shutdownSeconds int) (*spb.Stats, error)

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

func ShutdownProxyAsync(serverAddr string, shutdownSeconds int) (*spb.Stats, error)

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 Sigint

func Sigint(pid int) error

Sigint sends a SIGINT signal to the process with a given pid

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.

Jump to

Keyboard shortcuts

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