Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
stanipetrosyan committed Nov 8, 2023
1 parent 202f2c6 commit 42691a9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions channel.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package goeventbus

type Channel interface {
Register() Channel
Publisher() Publisher
Subscriber() Subscriber
}
Expand All @@ -25,10 +24,6 @@ func (c *defaultChannel) Listen() {
}
}

func (c *defaultChannel) Register() Channel {
return c
}

func (c *defaultChannel) Publisher() Publisher {
return NewPublisher(c.ch)
}
Expand All @@ -44,5 +39,6 @@ func NewChannel(address string) Channel {
ch := make(chan Message)
channel := defaultChannel{address: address, ch: ch, chs: []chan Message{}}
go channel.Listen()

return &channel
}

0 comments on commit 42691a9

Please sign in to comment.