MCPcopy Create free account
hub / github.com/DoNewsCode/core / WithHTTPClient

Function WithHTTPClient

ots3/uploader.go:72–76  ·  view source on GitHub ↗

WithHTTPClient is an option that replaces the default http client. Useful for interceptors like tracing and metrics.

(client contract.HttpDoer)

Source from the content-addressed store, hash-verified

70
71// WithHTTPClient is an option that replaces the default http client. Useful for interceptors like tracing and metrics.
72func WithHTTPClient(client contract.HttpDoer) ManagerOptionFunc {
73 return func(c *ManagerConfig) {
74 c.doer = client
75 }
76}
77
78// WithLocationFunc is an option that decides how url is mapped to S3 bucket and path.
79// Useful when not serving file directly from S3, but from a CDN.

Callers 1

TestNewManagerFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNewManagerFunction · 0.68