diff --git a/transport/grpc/server.go b/transport/grpc/server.go index 6e281b671..c8c3f4f3b 100644 --- a/transport/grpc/server.go +++ b/transport/grpc/server.go @@ -45,6 +45,13 @@ func Address(addr string) ServerOption { } } +// Endpoint with server address. +func Endpoint(endpoint *url.URL) ServerOption { + return func(s *Server) { + s.endpoint = endpoint + } +} + // Timeout with server timeout. func Timeout(timeout time.Duration) ServerOption { return func(s *Server) { diff --git a/transport/http/server.go b/transport/http/server.go index 8bece9afe..31a3c95e4 100644 --- a/transport/http/server.go +++ b/transport/http/server.go @@ -42,6 +42,13 @@ func Address(addr string) ServerOption { } } +// Endpoint with server address. +func Endpoint(endpoint *url.URL) ServerOption { + return func(s *Server) { + s.endpoint = endpoint + } +} + // Timeout with server timeout. func Timeout(timeout time.Duration) ServerOption { return func(s *Server) {