Merge branch 'main' into feature-new

pull/2898/head
Twacqwq 1 year ago committed by GitHub
commit 70c1a5b818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      transport/grpc/server.go
  2. 7
      transport/http/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) {

@ -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) {

Loading…
Cancel
Save