(stream proto.DRPCTailnet_CoordinateStream)
| 198 | } |
| 199 | |
| 200 | func (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 | |
| 221 | func (s *DRPCService) WorkspaceUpdates(req *proto.WorkspaceUpdatesRequest, stream proto.DRPCTailnet_WorkspaceUpdatesStream) error { |
| 222 | defer stream.Close() |
nothing calls this directly
no test coverage detected