Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectVMRoutingMiddleware ¶
func DirectVMRoutingMiddleware(cache *RouteCache, subresources []string) option.Middleware
DirectVMRoutingMiddleware rewrites allowlisted browser subresource requests to the browser VM using cached base_url and jwt data.
func NewHTTPClient ¶
NewHTTPClient returns an http.Client that performs browser egress HTTP via the browser session base_url and internal /curl/raw path.
Types ¶
type RawCURLRoundTripper ¶
type RawCURLRoundTripper struct {
// contains filtered or unexported fields
}
RawCURLRoundTripper implements browser-egress HTTP by tunneling through the browser session base_url /curl/raw endpoint.
func (*RawCURLRoundTripper) RoundTrip ¶
RoundTrip implements http.RoundTripper.
type Ref ¶
Ref identifies a browser session for direct-to-VM HTTP calls. SessionID is reserved for future client-side routing; allowlisted requests rewrite the /browsers/{SessionID}/ path segment against the returned base_url.
type RouteCache ¶
type RouteCache struct {
// contains filtered or unexported fields
}
RouteCache stores browser session transport details keyed by session_id.
func NewRouteCache ¶
func NewRouteCache() *RouteCache
NewRouteCache returns an empty browser route cache.
func (*RouteCache) Delete ¶
func (c *RouteCache) Delete(sessionID string)
Delete removes a cached route.
func (*RouteCache) Load ¶
func (c *RouteCache) Load(sessionID string) (Route, bool)
Load returns the cached route for the given session id.
func (*RouteCache) Store ¶
func (c *RouteCache) Store(route Route)
Store normalizes and caches the given route.