server: mask router
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
8742b55305
commit
dcdf133d5b
@ -39,8 +39,12 @@ type Options struct {
|
|||||||
Meter meter.Meter
|
Meter meter.Meter
|
||||||
// Transport holds the transport
|
// Transport holds the transport
|
||||||
Transport transport.Transport
|
Transport transport.Transport
|
||||||
// Router for requests
|
|
||||||
Router Router
|
/*
|
||||||
|
// Router for requests
|
||||||
|
Router Router
|
||||||
|
*/
|
||||||
|
|
||||||
// Listener may be passed if already created
|
// Listener may be passed if already created
|
||||||
Listener net.Listener
|
Listener net.Listener
|
||||||
// Wait group
|
// Wait group
|
||||||
@ -262,12 +266,14 @@ func TLSConfig(t *tls.Config) Option {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// WithRouter sets the request router
|
// WithRouter sets the request router
|
||||||
func WithRouter(r Router) Option {
|
func WithRouter(r Router) Option {
|
||||||
return func(o *Options) {
|
return func(o *Options) {
|
||||||
o.Router = r
|
o.Router = r
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Wait tells the server to wait for requests to finish before exiting
|
// Wait tells the server to wait for requests to finish before exiting
|
||||||
// If `wg` is nil, server only wait for completion of rpc handler.
|
// If `wg` is nil, server only wait for completion of rpc handler.
|
||||||
|
@ -65,6 +65,7 @@ type Server interface {
|
|||||||
String() string
|
String() string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// Router handle serving messages
|
// Router handle serving messages
|
||||||
type Router interface {
|
type Router interface {
|
||||||
// ProcessMessage processes a message
|
// ProcessMessage processes a message
|
||||||
@ -72,6 +73,7 @@ type Router interface {
|
|||||||
// ServeRequest processes a request to completion
|
// ServeRequest processes a request to completion
|
||||||
ServeRequest(ctx context.Context, req Request, rsp Response) error
|
ServeRequest(ctx context.Context, req Request, rsp Response) error
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Message is an async message interface
|
// Message is an async message interface
|
||||||
type Message interface {
|
type Message interface {
|
||||||
|
Loading…
Reference in New Issue
Block a user