2015-12-03 01:02:14 +00:00
|
|
|
package client
|
|
|
|
|
2016-11-07 17:49:35 +00:00
|
|
|
import (
|
2018-03-03 11:53:52 +00:00
|
|
|
"context"
|
2016-11-07 17:49:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// CallFunc represents the individual call func
|
2020-08-17 22:44:45 +01:00
|
|
|
type CallFunc func(ctx context.Context, addr string, req Request, rsp interface{}, opts CallOptions) error
|
2016-11-07 17:49:35 +00:00
|
|
|
|
2016-11-07 17:58:34 +00:00
|
|
|
// CallWrapper is a low level wrapper for the CallFunc
|
|
|
|
type CallWrapper func(CallFunc) CallFunc
|
2016-11-07 17:49:35 +00:00
|
|
|
|
2015-11-26 20:36:42 +00:00
|
|
|
// Wrapper wraps a client and returns a client
|
|
|
|
type Wrapper func(Client) Client
|
2015-12-18 01:01:59 +00:00
|
|
|
|
|
|
|
// StreamWrapper wraps a Stream and returns the equivalent
|
2018-04-14 18:15:09 +01:00
|
|
|
type StreamWrapper func(Stream) Stream
|