refactor zrpc server interceptor builder (#4300)

This commit is contained in:
featherlight
2024-08-08 22:37:19 +08:00
committed by GitHub
parent c1f12c5784
commit 03756c9166
8 changed files with 200 additions and 263 deletions

View File

@@ -14,7 +14,7 @@ const (
)
// NewRpcPubServer returns a Server.
func NewRpcPubServer(etcd discov.EtcdConf, listenOn string, middlewares ServerMiddlewaresConf,
func NewRpcPubServer(etcd discov.EtcdConf, listenOn string,
opts ...ServerOption) (Server, error) {
registerEtcd := func() error {
pubListenOn := figureOutListenOn(listenOn)
@@ -34,7 +34,7 @@ func NewRpcPubServer(etcd discov.EtcdConf, listenOn string, middlewares ServerMi
}
server := keepAliveServer{
registerEtcd: registerEtcd,
Server: NewRpcServer(listenOn, middlewares, opts...),
Server: NewRpcServer(listenOn, opts...),
}
return server, nil