[PR #2938] feat(mapper): add SendDirectUpdate method for direct MapResponse delivery #2946

Open
opened 2025-12-29 04:19:46 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2938
Author: @roganlynch
Created: 12/6/2025
Status: 🔄 Open

Base: mainHead: pr2a-mapper-direct-update


📝 Commits (1)

  • 3b8bad4 feat(mapper): add SendDirectUpdate method for direct MapResponse delivery

📊 Changes

1 file changed (+32 additions, -0 deletions)

View changed files

📝 hscontrol/mapper/batcher_lockfree.go (+32 -0)

📄 Description

Adds SendDirectUpdate method to the mapper batcher interface for direct MapResponse delivery.

Changes

  • Extends the Batcher interface with SendDirectUpdate(ctx context.Context, node *types.Node, update *tailcfg.MapResponse) error
  • Implements the method to deliver MapResponse updates directly to specific nodes without queuing
  • Provides foundation for sending targeted ping requests to nodes

Context

This is a prerequisite for the ping functionality, allowing the control plane to send MapResponses containing ping requests directly to target nodes. This builds upon the mapper infrastructure and enables immediate delivery of control messages.

Part of the work discussed in #2902 to add ping functionality to headscale.


Note: This code was generated with assistance from Claude Sonnet 4.5 via cline.bot


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2938 **Author:** [@roganlynch](https://github.com/roganlynch) **Created:** 12/6/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr2a-mapper-direct-update` --- ### 📝 Commits (1) - [`3b8bad4`](https://github.com/juanfont/headscale/commit/3b8bad4252652995d5b95467d39befc79a1a26db) feat(mapper): add SendDirectUpdate method for direct MapResponse delivery ### 📊 Changes **1 file changed** (+32 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/mapper/batcher_lockfree.go` (+32 -0) </details> ### 📄 Description Adds `SendDirectUpdate` method to the mapper batcher interface for direct MapResponse delivery. ## Changes - Extends the `Batcher` interface with `SendDirectUpdate(ctx context.Context, node *types.Node, update *tailcfg.MapResponse) error` - Implements the method to deliver MapResponse updates directly to specific nodes without queuing - Provides foundation for sending targeted ping requests to nodes ## Context This is a prerequisite for the ping functionality, allowing the control plane to send MapResponses containing ping requests directly to target nodes. This builds upon the mapper infrastructure and enables immediate delivery of control messages. Part of the work discussed in #2902 to add ping functionality to headscale. --- *Note: This code was generated with assistance from Claude Sonnet 4.5 via cline.bot* --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:46 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2946