handlers

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package handlers implements the E2B-compatible StrictServerInterface generated by oapi-codegen. Supported operations delegate to the AgentBox service layer; unsupported operations return 501.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements e2bgen.StrictServerInterface. Supported: GET/POST /sandboxes, GET/DELETE /sandboxes/:id, POST /sandboxes/:id/timeout,

GET /templates, GET /templates/:id, GET/POST/DELETE /api-keys, GET /health

All other methods return 501 Not Implemented.

func NewServer

func NewServer(svcs Services, k8sClient client.Client, gatewayDomain string) *Server

NewServer creates a new E2B handler Server.

func (*Server) GetV2Sandboxes

GetV2Sandboxes is the paginated list endpoint the current E2B SDK targets (GET /v2/sandboxes). It applies the same namespace/team/user scoping as the legacy GetSandboxes, then filters by the optional metadata/state query params and returns one page. The next-page cursor is returned via the "x-next-token" response header — the SDK paginator reads it there and stops once it is absent.

type Services

type Services struct {
	Sandbox service.SandboxService
	APIKey  service.APIKeyService
	// Forwarder enables cross-cluster forwarding via E2B API.
	// localClusterID is embedded in the forwarder itself; no separate field needed.
	// When Forwarder is nil, cross-cluster requests will be rejected.
	Forwarder *service.CrossClusterForwarder
}

Services bundles service dependencies for E2B handlers.

Jump to

Keyboard shortcuts

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