18 lines
383 B
Go
18 lines
383 B
Go
package subscribe
|
|
|
|
import (
|
|
"context"
|
|
|
|
ofs_redis "git.loafle.net/overflow/overflow_subscriber/redis"
|
|
"github.com/garyburd/redigo/redis"
|
|
)
|
|
|
|
func Subscribe(ctx context.Context, redisConn redis.Conn) {
|
|
s := ofs_redis.New(ctx, redisConn)
|
|
probeS := newProbeSubscriberHandler(ctx, "/probe")
|
|
authS := newAuthSubscriberHandler(ctx, "/auth")
|
|
|
|
s.Subscribe(probeS)
|
|
s.Subscribe(authS)
|
|
}
|