MCPcopy Create free account
hub / github.com/facebook/time / NewClient

Function NewClient

ntrip/client.go:104–116  ·  view source on GitHub ↗

NewClient creates a new NTRIP client with the given configuration.

(cfg Config, opts ...Option)

Source from the content-addressed store, hash-verified

102
103// NewClient creates a new NTRIP client with the given configuration.
104func NewClient(cfg Config, opts ...Option) *Client {
105 if cfg.UserAgent == "" {
106 cfg.UserAgent = defaultUserAgent
107 }
108 c := &Client{
109 config: cfg,
110 logger: slog.Default(),
111 }
112 for _, opt := range opts {
113 opt(c)
114 }
115 return c
116}
117
118// Connect establishes a connection to the NTRIP caster. If a proxy is
119// configured, it first establishes an HTTP CONNECT tunnel through the proxy

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…