GetServerCommand returns the server cobra command to be executed.
This command receives an async error handler to let the main process decide how to
handle critical errors that may happen in the runners that may prevent Envoy Gateway from
functioning properly.
The Envoy AI Gateway CLI is an example use case of this function, where it needs to terminate
if the infra runner fails to start the Envoy process.
type Runner interface {
// Start the runner. Start(context.Context) error Name() string// Close closes the runner when the server is shutting down.// This called after all the subscriptions are closed at the very end of the server shutdown.
Close() error
}