Documentation
¶
Index ¶
- type HealthCheck
- type HealthResponse
- type IngressConfig
- type Server
- func (h *Server) AcquireTunnel(ctx context.Context, hostname, path string) (*TunnelConn, error)
- func (h *Server) DeriveApp(host string) (string, bool)
- func (h *Server) DoRequest(ctx context.Context, req *httpingress_v1alpha.InternalHttpRequest) (*httpingress_v1alpha.InternalHttpResponse, error)
- func (h *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- type TunnelConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheck ¶
HealthCheck represents a single component health check
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
Checks map[string]HealthCheck `json:"checks"`
}
HealthResponse represents the JSON response for /health endpoint
type IngressConfig ¶
type Server ¶
func NewServer ¶
func NewServer( ctx context.Context, log *slog.Logger, config IngressConfig, rpcClient rpc.Client, aa activator.AppActivator, httpMetrics *metrics.HTTPMetrics, logWriter observability.LogWriter, ) *Server
func (*Server) AcquireTunnel ¶ added in v0.6.1
AcquireTunnel resolves a hostname to an app, acquires a lease to a running sandbox, and returns the sandbox URL. This is similar to DoRequest but doesn't execute a request — it gives the caller direct access to the sandbox URL for protocols that need custom connection handling (e.g., WebSocket tunneling).
The path parameter is checked against blocked paths (e.g., admin endpoints). If the route requires OIDC authentication, the tunnel is rejected since OIDC flows cannot be performed over tunneled connections.
func (*Server) DoRequest ¶ added in v0.3.1
func (h *Server) DoRequest(ctx context.Context, req *httpingress_v1alpha.InternalHttpRequest) (*httpingress_v1alpha.InternalHttpResponse, error)
DoRequest handles internal HTTP requests to app sandboxes. This method reuses the same lease management infrastructure as the HTTP proxy but is called directly via Go method invocation rather than through the HTTP listener.
type TunnelConn ¶ added in v0.6.1
type TunnelConn struct {
// URL is the base URL of the sandbox (e.g., "http://10.0.0.5:8080").
URL string
AppID string
// contains filtered or unexported fields
}
TunnelConn represents a resolved connection to an app sandbox. The caller is responsible for calling Release when done to return the lease.
func (*TunnelConn) Release ¶ added in v0.6.1
func (tc *TunnelConn) Release()
Release returns the lease to the pool.