Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for RoundTripper (0.17 sec)

  1. internal/http/transports.go

    type uaTransport struct {
    	ua string
    	rt http.RoundTripper
    }
    
    func (u *uaTransport) RoundTrip(req *http.Request) (*http.Response, error) {
    	req2 := req.Clone(req.Context())
    	req2.Header.Set("User-Agent", u.ua)
    	return u.rt.RoundTrip(req2)
    }
    
    // WithUserAgent wraps an existing transport with custom User-Agent
    func WithUserAgent(rt http.RoundTripper, getUA func() string) http.RoundTripper {
    	return &uaTransport{
    		ua: getUA(),
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 08 17:51:53 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  2. internal/handlers/forwarder.go

    )
    
    const defaultFlushInterval = time.Duration(100) * time.Millisecond
    
    // Forwarder forwards all incoming HTTP requests to configured transport.
    type Forwarder struct {
    	RoundTripper http.RoundTripper
    	PassHost     bool
    	Logger       func(error)
    	ErrorHandler func(http.ResponseWriter, *http.Request, error)
    
    	// internal variables
    	rewriter *headerRewriter
    }
    
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Feb 18 16:25:55 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  3. internal/http/close.go

    // convenient wrapper to drain any remaining data on response body.
    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    	// If resp.Body is not closed, the Client's underlying RoundTripper
    	// (typically Transport) may not be able to reuse a persistent TCP
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  4. internal/grid/handlers.go

    }
    
    // RoundTripper provides an interface for type roundtrip serialization.
    type RoundTripper interface {
    	msgp.Unmarshaler
    	msgp.Marshaler
    	msgp.Sizer
    
    	comparable
    }
    
    // SingleHandler is a type safe handler for single roundtrip requests.
    type SingleHandler[Req, Resp RoundTripper] struct {
    	id            HandlerID
    	sharedResp    bool
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Feb 18 16:25:55 UTC 2025
    - 27.7K bytes
    - Viewed (0)
  5. internal/config/identity/openid/providercfg.go

    // initializeProvider initializes if any additional vendor specific information
    // was provided, initialization will return an error initial login fails.
    func (p *providerCfg) initializeProvider(cfgGet func(string) string, transport http.RoundTripper) error {
    	vendor := cfgGet(Vendor)
    	if vendor == "" {
    		return nil
    	}
    	var err error
    	switch vendor {
    	case keyCloakVendor:
    		adminURL := cfgGet(KeyCloakAdminURL)
    		realm := cfgGet(KeyCloakRealm)
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  6. internal/config/subnet/config.go

    	APIKey string `json:"apiKey"`
    
    	// The HTTP(S) proxy URL to use for connecting to SUBNET
    	Proxy string `json:"proxy"`
    
    	// Transport configured with proxy_url if set optionally.
    	transport http.RoundTripper
    
    	// The subnet base URL
    	BaseURL string
    }
    
    var configLock sync.RWMutex
    
    // Registered indicates if cluster is registered or not
    func (c *Config) Registered() bool {
    	configLock.RLock()
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Feb 18 16:25:55 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  7. internal/grid/types.go

    func (NoPayload) Recycle() {}
    
    // ArrayOf wraps an array of Messagepack compatible objects.
    type ArrayOf[T RoundTripper] struct {
    	aPool sync.Pool     // Arrays
    	ePool bpool.Pool[T] // Elements
    }
    
    // NewArrayOf returns a new ArrayOf.
    // You must provide a function that returns a new instance of T.
    func NewArrayOf[T RoundTripper](newFn func() T) *ArrayOf[T] {
    	return &ArrayOf[T]{
    		ePool: bpool.Pool[T]{New: func() T {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  8. internal/config/identity/openid/provider/keycloak.go

    }
    
    // Option is a function type that accepts a pointer Target
    type Option func(*KeycloakProvider)
    
    // WithTransport provide custom transport
    func WithTransport(transport http.RoundTripper) Option {
    	return func(p *KeycloakProvider) {
    		p.client = http.Client{
    			Transport: transport,
    		}
    	}
    }
    
    // WithOpenIDConfig provide OpenID Endpoint configuration discovery document
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Jul 14 18:12:07 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. cmd/globals.go

    	globalMRFState = newMRFState()
    
    	// If writes to FS backend should be O_SYNC.
    	globalFSOSync bool
    
    	globalProxyEndpoints []ProxyEndpoint
    
    	globalInternodeTransport http.RoundTripper
    
    	globalRemoteTargetTransport http.RoundTripper
    
    	globalDNSCache = &dnscache.Resolver{
    		Timeout: 5 * time.Second,
    	}
    
    	globalForwarder *handlers.Forwarder
    
    	globalTierConfigMgr *TierConfigMgr
    
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Tue Sep 03 18:23:41 UTC 2024
    - 16.2K bytes
    - Viewed (1)
  10. internal/config/policy/opa/config.go

    		},
    	}
    )
    
    // Args opa general purpose policy engine configuration.
    type Args struct {
    	URL         *xnet.URL             `json:"url"`
    	AuthToken   string                `json:"authToken"`
    	Transport   http.RoundTripper     `json:"-"`
    	CloseRespFn func(r io.ReadCloser) `json:"-"`
    }
    
    // Validate - validate opa configuration params.
    func (a *Args) Validate() error {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 5.3K bytes
    - Viewed (0)
Back to top