updating pubsub, go version
This commit is contained in:
parent
354a101d26
commit
ce5a66cfd6
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module git.wntrmute.dev/kyle/sensenet
|
module git.wntrmute.dev/kyle/sensenet
|
||||||
|
|
||||||
go 1.17
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Masterminds/squirrel v1.5.2
|
github.com/Masterminds/squirrel v1.5.2
|
||||||
|
|
|
@ -30,7 +30,7 @@ func NewPublisher(addr string) (*Publisher, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pub *Publisher) connect() error {
|
func (pub *Publisher) connect() error {
|
||||||
return pub.sock.Dial(pub.addr)
|
return pub.sock.Listen(pub.addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pub *Publisher) Conflate(n int) {
|
func (pub *Publisher) Conflate(n int) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (sub *Subscriber) Conflate(n int) {
|
||||||
|
|
||||||
func (sub *Subscriber) connect() error {
|
func (sub *Subscriber) connect() error {
|
||||||
log.Printf("subscriber dialing %s", sub.addr)
|
log.Printf("subscriber dialing %s", sub.addr)
|
||||||
return sub.sock.Listen(sub.addr)
|
return sub.sock.Dial(sub.addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sub *Subscriber) Subscribe(topic string) {
|
func (sub *Subscriber) Subscribe(topic string) {
|
||||||
|
|
Loading…
Reference in New Issue