Disambiguate 'broker': rename pkg/broker to pkg/eventbus, qualify CLI command#107
Closed
scion-gteam[bot] wants to merge 3 commits into
Closed
Disambiguate 'broker': rename pkg/broker to pkg/eventbus, qualify CLI command#107scion-gteam[bot] wants to merge 3 commits into
scion-gteam[bot] wants to merge 3 commits into
Conversation
The word "broker" was overloaded across three unrelated concepts: 1. Runtime Broker (CLI command + compute nodes) 2. Message Broker (plugin system for messaging integrations) 3. Event Bus (NATS-style pub/sub for real-time SSE events) pkg/broker was actually the Event Bus (#3), not the Message Broker (#2). This rename eliminates the naming collision. Key identifier renames: - MessageBroker -> EventBus - MessageHandler -> EventHandler - InProcessBroker -> InProcessEventBus - FanOutBroker -> FanOutEventBus - NamedBroker -> NamedEventBus - ErrBrokerClosed -> ErrEventBusClosed Refs #95
Qualify the CLI command so "broker" no longer ambiguously spans the Runtime Broker and Message Broker concepts. The old "broker" name is kept as a deprecated alias via cobra Aliases for backward compatibility. Updated all help text examples and cross-references to use the new command name. Refs #95
Owner
|
This pull request has been recreated on the target repository as GoogleCloudPlatform#277. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Resolves the three-way "broker" naming ambiguity by:
pkg/brokertopkg/eventbus— the NATS-style pub/sub package was an event bus, not a message broker. All types renamed:MessageBroker→EventBus,InProcessBroker→InProcessEventBus,FanOutBroker→FanOutEventBus, etc.scion brokerCLI toscion runtime-broker— with a deprecatedbrokeralias for backward compatibility via cobraAliases.Closes #95
Coordination note
The
BrokerPluginAdapter(Message Broker plugin system) now satisfieseventbus.EventBusbut was NOT itself renamed — "Broker" there correctly refers to the Message Broker concept. TheMessageBrokerProxyinpkg/hub/messagebroker.goalso retained its name since it bridges the event bus and the messaging system.Test plan
go build ./...passesgo test ./pkg/eventbus/...passes (all event bus unit tests)go test ./pkg/hub/... -run Brokerpasses (message broker proxy tests)go test ./cmd/... -run Brokerpasses (CLI command registration tests)go test ./cmd/... -run InteractiveOnlypasses (output format tests)scion brokeralias still registered via cobra Aliases