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

Method ConnectRPC20WithTailnet

codersdk/agentsdk/agentsdk.go:184–192  ·  view source on GitHub ↗

ConnectRPC20WithTailnet returns a dRPC client to the Agent API v2.0. Notably, it is missing GetAnnouncementBanners, but is useful when you want to be maximally compatible with Coderd Release Versions from 2.9+

(ctx context.Context)

Source from the content-addressed store, hash-verified

182// GetAnnouncementBanners, but is useful when you want to be maximally compatible with Coderd
183// Release Versions from 2.9+
184func (c *Client) ConnectRPC20WithTailnet(ctx context.Context) (
185 proto.DRPCAgentClient20, tailnetproto.DRPCTailnetClient20, error,
186) {
187 conn, err := c.connectRPCVersion(ctx, apiversion.New(2, 0), "")
188 if err != nil {
189 return nil, nil, err
190 }
191 return proto.NewDRPCAgentClient(conn), tailnetproto.NewDRPCTailnetClient(conn), nil
192}
193
194// ConnectRPC21 returns a dRPC client to the Agent API v2.1. It is useful when you want to be
195// maximally compatible with Coderd Release Versions from 2.12+

Callers

nothing calls this directly

Calls 2

connectRPCVersionMethod · 0.95
NewFunction · 0.92

Tested by

no test coverage detected