Versions in this module Expand all Collapse all v0 v0.0.2 Jun 14, 2021 Changes in this version type Manager + func (m Manager) OauthAuthRep(backendURL string, request BackendRequest) (*BackendResponse, error) v0.0.1 Jul 16, 2020 Changes in this version + type BackendAuth struct + Type string + Value string + type BackendConfig struct + CacheFlushInterval time.Duration + EnableCaching bool + Logger core.Logger + Policy backend.FailurePolicy + type BackendParams struct + AppID string + AppKey string + UserID string + UserKey string + type BackendRequest struct + Auth BackendAuth + Service string + Transactions []BackendTransaction + func (request BackendRequest) ToAPIRequest() (*threescale.Request, error) + type BackendResponse struct + Authorized bool + ErrorCode string + RawResponse interface{} + RejectedReason string + type BackendTransaction struct + Metrics map[string]int + Params BackendParams + type Cache int + const Backend + const System + type CacheHitHook func(cache Cache) + type ClientBuilder struct + func NewClientBuilder(httpClient *http.Client) *ClientBuilder + func (cb ClientBuilder) BuildBackendClient(backendURL string) (threescale.Client, error) + func (cb ClientBuilder) BuildSystemClient(systemURL, accessToken string) (SystemClient, error) + type Manager struct + func NewManager(client *http.Client, systemCache *SystemCache, backendConfig BackendConfig, ...) *Manager + func (m Manager) AuthRep(backendURL string, request BackendRequest) (*BackendResponse, error) + func (m Manager) GetSystemConfiguration(systemURL string, request SystemRequest) (client.ProxyConfig, error) + func (m Manager) Shutdown() + type MetricsReporter struct + CacheHitCB CacheHitHook + ReportMetrics bool + ResponseCB ResponseHook + type MetricsRoundTripper struct + func (mt *MetricsRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) + type ResponseHook func(report TelemetryReport) + type SystemCache struct + func NewSystemCache(config SystemCacheConfig, stopRefreshing chan struct{}) *SystemCache + type SystemCacheConfig struct + MaxSize int + NumRetryFailedRefresh int + RefreshInterval time.Duration + TTL time.Duration + type SystemClient interface + GetLatestProxyConfig func(serviceID, environment string) (system.ProxyConfigElement, error) + type SystemRequest struct + AccessToken string + Environment string + ServiceID string + type TelemetryReport struct + Code int + Endpoint string + Host string + Method string + TimeTaken time.Duration