(ctx context.Context, version string, conn net.Conn, id uuid.UUID)
| 26 | } |
| 27 | |
| 28 | func (s *ClientService) ServeMultiAgentClient(ctx context.Context, version string, conn net.Conn, id uuid.UUID) error { |
| 29 | major, _, err := apiversion.Parse(version) |
| 30 | if err != nil { |
| 31 | s.Logger.Warn(ctx, "serve client called with unparsable version", slog.Error(err)) |
| 32 | return err |
| 33 | } |
| 34 | switch major { |
| 35 | case 2: |
| 36 | auth := agpl.SingleTailnetCoordinateeAuth{} |
| 37 | streamID := agpl.StreamID{ |
| 38 | Name: id.String(), |
| 39 | ID: id, |
| 40 | Auth: auth, |
| 41 | } |
| 42 | return s.ServeConnV2(ctx, conn, streamID) |
| 43 | default: |
| 44 | s.Logger.Warn(ctx, "serve client called with unsupported version", slog.F("version", version)) |
| 45 | return agpl.ErrUnsupportedVersion |
| 46 | } |
| 47 | } |
no test coverage detected