Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// CleanupDataDir controls whether the data directory is deleted on Stop().
// Defaults to true. Set to false to preserve the data directory.
CleanupDataDir *bool
// StdoutWriter is an optional writer to receive stdout logs.
// If nil, stdout will be captured to a buffer accessible via Relay.Stdout().
StdoutWriter io.Writer
// StderrWriter is an optional writer to receive stderr logs.
// If nil, stderr will be captured to a buffer accessible via Relay.Stderr().
StderrWriter io.Writer
}
Options configures relay startup behavior.
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
Relay represents a running relay instance that can be started and stopped.
func Start ¶
Start initializes and starts a relay with the given configuration. It bypasses the configuration loading step and uses the provided config directly.
Parameters:
- cfg: The configuration to use for the relay
- opts: Optional configuration for relay behavior. If nil, defaults are used.
Returns:
- relay: A Relay instance that can be used to stop the relay
- err: An error if initialization or startup fails
func (*Relay) Stderr ¶
Stderr returns the complete stderr log buffer contents.
func (*Relay) StderrBytes ¶
StderrBytes returns the complete stderr log buffer as bytes.
func (*Relay) Stdout ¶
Stdout returns the complete stdout log buffer contents.
func (*Relay) StdoutBytes ¶
StdoutBytes returns the complete stdout log buffer as bytes.
Source Files
¶
- run.go
Click to show internal directories.
Click to hide internal directories.