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

Method Coordinate

tailnet/service.go:200–219  ·  view source on GitHub ↗
(stream proto.DRPCTailnet_CoordinateStream)

Source from the content-addressed store, hash-verified

198}
199
200func (s *DRPCService) Coordinate(stream proto.DRPCTailnet_CoordinateStream) error {
201 ctx := stream.Context()
202 streamID, ok := ctx.Value(streamIDContextKey{}).(StreamID)
203 if !ok {
204 _ = stream.Close()
205 return xerrors.New("no Stream ID")
206 }
207 logger := s.Logger.With(slog.F("peer_id", streamID), slog.F("name", streamID.Name))
208 logger.Debug(ctx, "starting tailnet Coordinate")
209 coord := *(s.CoordPtr.Load())
210 reqs, resps := coord.Coordinate(ctx, streamID.ID, streamID.Name, streamID.Auth)
211 c := communicator{
212 logger: logger,
213 stream: stream,
214 reqs: reqs,
215 resps: resps,
216 }
217 c.communicate()
218 return nil
219}
220
221func (s *DRPCService) WorkspaceUpdates(req *proto.WorkspaceUpdatesRequest, stream proto.DRPCTailnet_WorkspaceUpdatesStream) error {
222 defer stream.Close()

Callers

nothing calls this directly

Calls 7

communicateMethod · 0.95
ContextMethod · 0.65
CloseMethod · 0.65
NewMethod · 0.65
CoordinateMethod · 0.65
ValueMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected