serviceproxy

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package serviceproxy exposes configured HTTP targets through space-owned bindings. Apps use their runtime network identity; their Authorization header remains available to the upstream API.

Index

Constants

View Source
const TestRequestHeader = "X-Donkey-Proxy-Test"

Console requests use a short-lived, purpose-bound control-plane grant. Apps continue to authenticate by their runtime IP without credentials.

Variables

This section is empty.

Functions

func Handler

func Handler(services config.ProxyServices, access Access) (http.Handler, error)

Handler joins each request's suffix and query onto its configured target. proxyUrl selects an outbound proxy; omission means a direct connection.

func Run

func Run(ctx context.Context, cfg *Config, provider runtime.Provider) error

func SealTestRequest

func SealTestRequest(key []byte, space, offering string, r *http.Request) (string, error)

Types

type Access

type Access func(context.Context, string, string) (bool, error)

type Config

type Config struct {
	Listen   string
	Services config.ProxyServices
	File     string
	TestKey  []byte
}

func FromEnv

func FromEnv() (*Config, error)

Jump to

Keyboard shortcuts

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