We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c097fe commit be301c2Copy full SHA for be301c2
broadcast/router/router.go
@@ -20,6 +20,7 @@ type Router interface {
20
ReplyToClient(dto *dtos.ReplyMsg) error
21
Connect(addr string)
22
Close() error
23
+ AddHandler(method string, handler any)
24
}
25
26
type router struct {
@@ -46,7 +47,7 @@ type Config struct {
46
47
DialOpts []grpc.DialOption
48
49
-func NewRouter(config *Config) *router {
50
+func NewRouter(config *Config) Router {
51
if len(config.DialOpts) <= 0 {
52
config.DialOpts = []grpc.DialOption{
53
grpc.WithTransportCredentials(insecure.NewCredentials()),
0 commit comments