• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

README.mdH A D16-Sep-2021775 4027

doc.goH A D16-Sep-2021165 61

handle_rpc.goH A D16-Sep-2021948 4332

mux.goH A D16-Sep-20212.1 KiB9062

README.md

1# package drpcmux
2
3`import "storj.io/drpc/drpcmux"`
4
5Package drpcmux is a handler to dispatch rpcs to implementations.
6
7## Usage
8
9#### type Mux
10
11```go
12type Mux struct {
13}
14```
15
16Mux is an implementation of Handler to serve drpc connections to the appropriate
17Receivers registered by Descriptions.
18
19#### func  New
20
21```go
22func New() *Mux
23```
24New constructs a new Mux.
25
26#### func (*Mux) HandleRPC
27
28```go
29func (m *Mux) HandleRPC(stream drpc.Stream, rpc string) (err error)
30```
31HandleRPC handles the rpc that has been requested by the stream.
32
33#### func (*Mux) Register
34
35```go
36func (m *Mux) Register(srv interface{}, desc drpc.Description) error
37```
38Register associates the RPCs described by the description in the server. It
39returns an error if there was a problem registering it.
40