Skip to content

Commit

Permalink
server: mask router
Browse files Browse the repository at this point in the history
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
  • Loading branch information
vtolstov committed Mar 24, 2021
1 parent 8742b55 commit dcdf133
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ type Options struct {
Meter meter.Meter
// Transport holds the transport
Transport transport.Transport
// Router for requests
Router Router

/*
// Router for requests
Router Router
*/

// Listener may be passed if already created
Listener net.Listener
// Wait group
Expand Down Expand Up @@ -262,12 +266,14 @@ func TLSConfig(t *tls.Config) Option {
}
}

/*
// WithRouter sets the request router
func WithRouter(r Router) Option {
return func(o *Options) {
o.Router = r
}
}
*/

// Wait tells the server to wait for requests to finish before exiting
// If `wg` is nil, server only wait for completion of rpc handler.
Expand Down
2 changes: 2 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ type Server interface {
String() string
}

/*
// Router handle serving messages
type Router interface {
// ProcessMessage processes a message
ProcessMessage(ctx context.Context, msg Message) error
// ServeRequest processes a request to completion
ServeRequest(ctx context.Context, req Request, rsp Response) error
}
*/

// Message is an async message interface
type Message interface {
Expand Down

0 comments on commit dcdf133

Please sign in to comment.