INNER CODE UNIT · Go

registryApiServer

kimdre/doco-cd · cmd/doco-cd/apiserver.go:15

func registryApiServer(c *app.Config, h *api.Handler, mounts api.Mounts, log *logger.Logger) error {
	// Register API endpoints
	apiServerMux := http.NewServeMux()

	enabledApiEndpoints, err := api.RegisterRoutes(apiServerMux, h, mounts)
	if err != nil {
		return fmt.Errorf("register API routes: %w", err)
	}

	protocol := "http"
	if c.HttpTLSEnabled {
		protocol = "https"
	}

	log.Info(
		"listening for events",
		slog.Int("http_port", int(c.HttpPort)),
		slog.String("protocol", protocol),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…