Versions in this module Expand all Collapse all v0 v0.3.1 Mar 4, 2026 v0.3.0 Mar 4, 2026 Changes in this version + var BuildCommit string + var ErrRunNotFound = errors.New("run not found") + func RemoveLockFile(dir string) + func StartTokenRefresh(ctx context.Context, rc *RunContext, grants []string) + func WriteLockFile(dir string, info LockInfo) error + type AWSConfig struct + ExternalID string + Region string + RoleARN string + SessionDuration time.Duration + type Client struct + func EnsureRunning(dir string, proxyPort int) (*Client, error) + func NewClient(sockPath string) *Client + func (c *Client) Health(ctx context.Context) (*HealthResponse, error) + func (c *Client) ListRuns(ctx context.Context) ([]RunInfo, error) + func (c *Client) RegisterRoutes(ctx context.Context, agent string, services map[string]string) error + func (c *Client) RegisterRun(ctx context.Context, regReq RegisterRequest) (*RegisterResponse, error) + func (c *Client) Shutdown(ctx context.Context) error + func (c *Client) UnregisterRoutes(ctx context.Context, agent string) error + func (c *Client) UnregisterRun(ctx context.Context, token string) error + func (c *Client) UpdateRun(ctx context.Context, token, containerID string) error + type CommandContainerChecker struct + func NewCommandContainerChecker() *CommandContainerChecker + func (c *CommandContainerChecker) IsContainerRunning(ctx context.Context, id string) (bool, error) + type ContainerChecker interface + IsContainerRunning func(ctx context.Context, id string) (alive bool, err error) + type CredentialEntry struct + Grant string + Name string + Value string + type CredentialSpec struct + Grant string + Header string + Host string + Value string + type ExtraHeaderEntry struct + Name string + Value string + type ExtraHeaderSpec struct + HeaderName string + Host string + Value string + type HealthResponse struct + Commit string + PID int + ProxyPort int + RunCount int + StartedAt string + type IdleTimer struct + func NewIdleTimer(duration time.Duration, callback func()) *IdleTimer + func (t *IdleTimer) Cancel() + func (t *IdleTimer) Reset() + type LivenessChecker struct + func NewLivenessChecker(registry *Registry, checker ContainerChecker) *LivenessChecker + func (lc *LivenessChecker) CheckOnce(ctx context.Context) + func (lc *LivenessChecker) Run(ctx context.Context) + func (lc *LivenessChecker) SetOnCleanup(fn func(token, runID string)) + func (lc *LivenessChecker) SetOnEmpty(fn func()) + type LockInfo struct + Commit string + PID int + ProxyPort int + SockPath string + StartedAt time.Time + func ReadLockFile(dir string) (*LockInfo, error) + func (l *LockInfo) IsAlive() bool + type RegisterRequest struct + AWSConfig *AWSConfig + AuthToken string + Credentials []CredentialSpec + ExtraHeaders []ExtraHeaderSpec + Grants []string + MCPServers []config.MCPServerConfig + NetworkAllow []string + NetworkPolicy string + RemoveHeaders []RemoveHeaderSpec + ResponseTransformers []TransformerSpec + RunID string + TokenSubstitutions []TokenSubstitutionSpec + func (req *RegisterRequest) ToRunContext() *RunContext + type RegisterResponse struct + AuthToken string + ProxyPort int + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Count() int + func (r *Registry) List() []*RunContext + func (r *Registry) Lookup(token string) (*RunContext, bool) + func (r *Registry) Register(rc *RunContext) string + func (r *Registry) RegisterWithToken(rc *RunContext, token string) + func (r *Registry) Unregister(token string) + func (r *Registry) UpdateContainerID(token, containerID string) bool + type RemoveHeaderSpec struct + HeaderName string + Host string + type RouteRegistration struct + Services map[string]string + type RunContext struct + AWSConfig *AWSConfig + AuthToken string + ContainerID string + Credentials map[string]CredentialEntry + ExtraHeaders map[string][]ExtraHeaderEntry + MCPServers []config.MCPServerConfig + NetworkAllow []string + NetworkPolicy string + RegisteredAt time.Time + RemoveHeaders map[string][]string + ResponseTransformers map[string][]credential.ResponseTransformer + RunID string + TokenSubstitutions map[string]TokenSubstitutionEntry + TransformerSpecs []TransformerSpec + func NewRunContext(runID string) *RunContext + func (rc *RunContext) AddExtraHeader(host, headerName, headerValue string) + func (rc *RunContext) AddResponseTransformer(host string, transformer credential.ResponseTransformer) + func (rc *RunContext) CancelRefresh() + func (rc *RunContext) GetContainerID() string + func (rc *RunContext) GetCredential(host string) (CredentialEntry, bool) + func (rc *RunContext) GetExtraHeaders(host string) []ExtraHeaderEntry + func (rc *RunContext) GetRemoveHeaders(host string) []string + func (rc *RunContext) GetResponseTransformers(host string) []credential.ResponseTransformer + func (rc *RunContext) GetTokenSubstitution(host string) (TokenSubstitutionEntry, bool) + func (rc *RunContext) RemoveRequestHeader(host, headerName string) + func (rc *RunContext) SetAWSHandler(h http.Handler) + func (rc *RunContext) SetCredential(host, value string) + func (rc *RunContext) SetCredentialHeader(host, headerName, headerValue string) + func (rc *RunContext) SetCredentialWithGrant(host, headerName, headerValue, grant string) + func (rc *RunContext) SetRefreshCancel(cancel context.CancelFunc) + func (rc *RunContext) SetTokenSubstitution(host, placeholder, realToken string) + func (rc *RunContext) ToProxyContextData() *proxy.RunContextData + type RunInfo struct + ContainerID string + RegisteredAt string + RunID string + type Server struct + func NewServer(sockPath string, proxyPort int) *Server + func (s *Server) Registry() *Registry + func (s *Server) SetOnEmpty(fn func()) + func (s *Server) SetOnRegister(fn func()) + func (s *Server) SetOnShutdown(fn func()) + func (s *Server) SetOnUnregister(fn func(runID string)) + func (s *Server) SetProxyPort(port int) + func (s *Server) SetRoutes(rt *routing.RouteTable) + func (s *Server) Start() error + func (s *Server) Stop(ctx context.Context) error + type TokenSubstitutionEntry struct + Placeholder string + RealToken string + type TokenSubstitutionSpec struct + Host string + Placeholder string + RealToken string + type TransformerSpec struct + Host string + Kind string + type UpdateRunRequest struct + ContainerID string