mirror of
https://github.com/sourcegraph/jsonrpc2.git
synced 2026-06-18 13:10:02 +02:00
Expose NoopHandler
This commit is contained in:
parent
c9c77b6bb9
commit
e8229febb0
5 changed files with 14 additions and 12 deletions
|
|
@ -303,6 +303,12 @@ type Handler interface {
|
|||
Handle(context.Context, *Conn, *Request)
|
||||
}
|
||||
|
||||
// NoopHandler is a Handler that does nothing. It is useful for
|
||||
// creating a Handler that can be used as a default handler. It is also
|
||||
// useful for testing.
|
||||
type NoopHandler struct {}
|
||||
func (NoopHandler) Handle(ctx context.Context, conn *Conn, req *Request) {}
|
||||
|
||||
// ID represents a JSON-RPC 2.0 request ID, which may be either a
|
||||
// string or number (or null, which is unsupported).
|
||||
type ID struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue