micro/client/wrapper.go

20 lines
521 B
Go
Raw Normal View History

2015-12-03 04:02:14 +03:00
package client
2016-11-07 20:49:35 +03:00
import (
2018-03-03 14:53:52 +03:00
"context"
2019-01-18 15:30:39 +03:00
"github.com/micro/go-micro/v2/registry"
2016-11-07 20:49:35 +03:00
)
// CallFunc represents the individual call func
2019-01-18 15:30:39 +03:00
type CallFunc func(ctx context.Context, node *registry.Node, req Request, rsp interface{}, opts CallOptions) error
2016-11-07 20:49:35 +03:00
// CallWrapper is a low level wrapper for the CallFunc
type CallWrapper func(CallFunc) CallFunc
2016-11-07 20:49:35 +03:00
2015-11-26 23:36:42 +03:00
// Wrapper wraps a client and returns a client
type Wrapper func(Client) Client
2015-12-18 04:01:59 +03:00
// StreamWrapper wraps a Stream and returns the equivalent
2018-04-14 20:15:09 +03:00
type StreamWrapper func(Stream) Stream