1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00
go-micro/client/wrapper.go

20 lines
521 B
Go
Raw Normal View History

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