Skip to content

chore: remove tailnet from agent API and rename client API to tailnet #11303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Dec 21, 2023

Refactors our DRPC service definitions slightly.

In the previous version, I inserted the RPCs from the tailnet proto directly into the Agent service. This makes things hard to deal with because DRPC then generates a new set of methods with new interfaces with the DRPCAgent_ prefixed. Since you can't have a single method that takes different argument types, we couldn't reuse the implementation of those RFCs without a lot of extra classes and pass-thru methods.

Instead, the "right" way to do it is to integrate at the DRPC layer. So, we have two DRPC services available over the Agent websocket, and register them both on the DRPC mux.

Since the tailnet proto RPC service is now for both clients and agents, I renamed some things to clarify and shorten.

This PR also removes the TailnetAPI implementation from the agentapi package, and the next PR in the stack replaces it with the implementation from the tailnet package.

Copy link
Contributor Author

spikecurtis commented Dec 21, 2023

Base automatically changed from spike/10532-derp-streaming to main January 2, 2024 04:07
@spikecurtis spikecurtis force-pushed the spike/agent-tailnet-rpc-rename branch from 29e4a7f to 722ef25 Compare January 2, 2024 04:09
Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtis spikecurtis force-pushed the spike/agent-tailnet-rpc-rename branch from 722ef25 to fccb3b8 Compare January 2, 2024 05:50
@spikecurtis spikecurtis merged commit 25f2abf into main Jan 2, 2024
@spikecurtis spikecurtis deleted the spike/agent-tailnet-rpc-rename branch January 2, 2024 06:02
Copy link
Contributor Author

Merge activity

@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants