router

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package router provides E2B-compatible HTTP route registration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(r *gin.Engine, svcs Services, k8sClient client.Client, authMw gin.HandlerFunc, gatewayDomain string)

Setup registers all E2B-compatible routes on the given Gin engine using the generated StrictServerInterface. Routes are also registered at the PrivatePathPrefix path for compatibility with private path mode.

Types

type Services

type Services struct {
	Sandbox service.SandboxService
	APIKey  service.APIKeyService
	Vault   service.VaultService
	// Federation exposes other clusters' Env capacity to the template listing.
	Federation *federation.Registry
	// LocalClusterID identifies this cluster in federation records.
	LocalClusterID string
	// Metrics queries the cluster's metrics backend; nil disables the metrics
	// endpoints.
	Metrics *promclient.Client
	// MetricsSelector returns the PromQL label matcher for this cluster.
	MetricsSelector func() string
	// Forwarder enables cross-cluster forwarding via E2B API.
	// localClusterID is embedded in the forwarder itself; no separate field needed.
	Forwarder *service.CrossClusterForwarder
}

Services bundles all service dependencies for E2B router handlers.

Directories

Path Synopsis
Package middleware provides E2B-compatible authentication middleware.
Package middleware provides E2B-compatible authentication middleware.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL