Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithStartupHook ¶
func WithStartupHook(hook StartupHook) api.RunOption
WithStartupHook returns a RunOption that sets a startup hook.
This is an experimental API that should only be used by CLI entrypoints. See package documentation for usage constraints.
If provided, this hook will REPLACE the default config dump hook. If you want to preserve default behavior, do not use this option.
Types ¶
type AdminClient ¶
type AdminClient = internalapi.AdminClient
AdminClient provides methods to interact with Envoy's admin API.
func NewAdminClient ¶
func NewAdminClient(ctx context.Context, funcEPid int, options ...api.RunOption) (AdminClient, error)
NewAdminClient returns an AdminClient if `funcEPid` has a child envoy process.
Supported api.RunOption values: - api.RunID - use when funcEPid launched multiple envoys - api.HTTPTransport - use in testing or observability.
type StartupHook ¶
type StartupHook = internalapi.StartupHook
StartupHook runs once the Envoy admin server is ready. Configure this via the WithStartupHook api.RunOption.
The hook receives the AdminClient and runID. The runID is unique to this run and can be used to construct file paths as needed.
Note: Startup hooks are considered mandatory and will stop the run with error if failed. If your hook is optional, rescue panics and log your own errors.