micro/client/wrapper.go

18 lines
474 B
Go
Raw Permalink Normal View History

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
type CallFunc func(ctx context.Context, address string, req Request, rsp interface{}, opts CallOptions) error
// 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