MCPcopy Index your code
hub / github.com/coder/coder / Connect

Method Connect

coderd/database/awsiamrds/awsiamrds.go:110–126  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

108var _ database.DialerConnector = &connector{}
109
110func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
111 nURL, err := getAuthenticatedURL(c.cfg, c.url)
112 if err != nil {
113 return nil, xerrors.Errorf("assigning authentication token to url: %w", err)
114 }
115
116 nc, err := pq.NewConnector(nURL)
117 if err != nil {
118 return nil, xerrors.Errorf("creating new connector: %w", err)
119 }
120
121 if c.dialer != nil {
122 nc.Dialer(c.dialer)
123 }
124
125 return nc.Connect(ctx)
126}
127
128func (*connector) Driver() driver.Driver {
129 return &pq.Driver{}

Callers

nothing calls this directly

Calls 4

DialerMethod · 0.95
ConnectMethod · 0.95
getAuthenticatedURLFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected