Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetaHook ¶
type MetaHook struct {
// contains filtered or unexported fields
}
MetaHook is a component to update the MetaConfig over a controlled uds http api.
func (*MetaHook) Launch ¶
func (m *MetaHook) Launch( logger *logger.Logger, metaConfig *metaconfig.MetaConfig, socketPath string, socketPerm fs.FileMode, retryMaxSeconds int) error
Launch starts the metahook server on the specified socket.
This operation prepares the socket and starts a separate goroutine to run the server. The server worker restarts automatically on failure with an exponential backoff retry. After a successful launch or shutdown, further calls to Launch will result in an error.
logger: The logger instance used to log operations performed. metaConfig: A pointer to the metaconfig object controlled by this hook. socketPath: The filesystem path for the Unix domain socket. socketPerm: The permissions for the socket file. retryMaxSeconds: The maximum number of seconds until a retry is performed on error. Returns an error if there is a failure in preparing the socket.
func (*MetaHook) Shutdown ¶
Shutdown stops the metahook server and blocks until it is done.
Shutdown closes the http server and waits until it is fully stopped. The function is idempotent, meaning further calls to Shutdown will not result in an error.
Returns an error if there is a critical failure while shutting down the server.