INNER CODE UNIT · Go

newContext

mariadb-operator/mariadb-operator · cmd/agent/main.go:87

func newContext() (context.Context, context.CancelFunc) {
	return signal.NotifyContext(context.Background(), []os.Signal{
		syscall.SIGINT,
		syscall.SIGTERM,
		syscall.SIGKILL,
		syscall.SIGHUP,
		syscall.SIGQUIT}...,
	)
}

func getAPIServer(apiHandlers []router.RouteHandler, env *environment.PodEnvironment, k8sClient client.Client,
	logger logr.Logger) (*server.Server, error) {
	routerOpts, err := getRouterOpts(logger)
	if err != nil {
		return nil, err
	}
	router := router.NewRouter(
		apiHandlers,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…