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
|
|
|
|
2024-06-04 22:40:43 +02:00
|
|
|
"go-micro.dev/v5/registry"
|
2016-11-07 19:49:35 +02:00
|
|
|
)
|
|
|
|
|
2022-09-30 16:27:07 +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
|
|
|
|
2022-09-30 16:27:07 +02:00
|
|
|
// CallWrapper is a low level wrapper for the CallFunc.
|
2016-11-07 19:58:34 +02:00
|
|
|
type CallWrapper func(CallFunc) CallFunc
|
2016-11-07 19:49:35 +02:00
|
|
|
|
2022-09-30 16:27:07 +02:00
|
|
|
// Wrapper wraps a client and returns a client.
|
2015-11-26 22:36:42 +02:00
|
|
|
type Wrapper func(Client) Client
|
2015-12-18 03:01:59 +02:00
|
|
|
|
2022-09-30 16:27:07 +02:00
|
|
|
// StreamWrapper wraps a Stream and returns the equivalent.
|
2018-04-14 19:15:09 +02:00
|
|
|
type StreamWrapper func(Stream) Stream
|