Documentation ¶
Index ¶
- Variables
- func New(baseURL string, opts ...option) (*client, error)
- func WithHTTPClient(h httpClient) option
- func WithIdentity(identity crypto.PrivKey) option
- func WithProviderInfo(peerID peer.ID, addrs []multiaddr.Multiaddr) option
- func WithUserAgent(ua string) option
- type HTTPError
- type ResponseBodyLimitedTransport
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ViewLatency = &view.View{ Measure: measureLatency, Aggregation: distMS, TagKeys: []tag.Key{keyOperation, keyHost, keyStatusCode, keyError}, } ViewLength = &view.View{ Measure: measureLength, Aggregation: distLength, TagKeys: []tag.Key{keyOperation, keyHost}, } OpenCensusViews = []*view.View{ ViewLatency, ViewLength, } )
View Source
var ImportPath = importPath()
ImportPath is the canonical import path that allows us to identify official client builds vs modified forks, and use that info in User-Agent header.
Functions ¶
func New ¶
New creates a content routing API client. The Provider and identity parameters are option. If they are nil, the `Provide` method will not function.
func WithHTTPClient ¶
func WithHTTPClient(h httpClient) option
func WithIdentity ¶
func WithProviderInfo ¶
func WithUserAgent ¶
func WithUserAgent(ua string) option
Types ¶
type ResponseBodyLimitedTransport ¶
type ResponseBodyLimitedTransport struct { http.RoundTripper LimitBytes int64 UserAgent string }
Click to show internal directories.
Click to hide internal directories.