Skip to content

Commit 3a4e193

Browse files
Marko Petzoldclaude
andcommitted
router/realm: retype broker / dealer fields to Broker / Dealer interfaces
Replaces the concrete *broker / *dealer pointer fields on the realm struct with the Broker / Dealer interface types extracted in the previous commit. The newRealm() constructor signature changes to accept the interfaces too, but the call sites still pass concrete *broker / *dealer values — Go's structural typing handles the implicit satisfaction. Behavior-preserving: the only thing that changes is the static type of two struct fields. Coverage unchanged (63.2%). Step 2 of 3 in the Broker/Dealer interface extraction (gammazero#315). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5fe8057 commit 3a4e193

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

router/realm.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ type testamentBucket struct {
3939
type realm struct {
4040
uri wamp.URI
4141

42-
broker *broker
43-
dealer *dealer
42+
broker Broker
43+
dealer Dealer
4444

4545
authorizer Authorizer
4646

@@ -94,7 +94,7 @@ var (
9494
)
9595

9696
// newRealm creates a new realm with the given RealmConfig, broker and dealer.
97-
func newRealm(config *RealmConfig, broker *broker, dealer *dealer, logger stdlog.StdLog, debug bool) (*realm, error) {
97+
func newRealm(config *RealmConfig, broker Broker, dealer Dealer, logger stdlog.StdLog, debug bool) (*realm, error) {
9898
if !config.URI.ValidURI(config.StrictURI, "") {
9999
return nil, fmt.Errorf(
100100
"invalid realm URI %v (URI strict checking %v)", config.URI, config.StrictURI)

0 commit comments

Comments
 (0)