Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR, we had a weavelet that was used by all the deployers. This made the weavelet code a bit hard to follow. I would say 75% of the weavelet code only ran in multiprocess mode (e.g., setting up internal listeners, updating routing info, setting up mTLS), but some bits of code only ran in single process mode. The control flow of this code was also dictated by a combination of a
Bootstrap
struct passed via acontext.Context
, some environment variables, and theEnv
interface (which was only partially implemented in the single process case).This PR splits the weavelet in two. First, I introduce a new
Weavelet
interface that borrows from the oldprivate.App
interface:Conceptually, a
Weavelet
is something that hosts components, and it provides an API to get a handle to these components.Next, I introduce a
SingleWeavelet
implementation that is used bygo run .
andweaver single deploy
and aRemoteWeavelet
implementation that is used by all other deployers.