-
Notifications
You must be signed in to change notification settings - Fork 2
/
rpc_callable.go
37 lines (25 loc) · 1.27 KB
/
rpc_callable.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package rpcx
import (
"github.com/gen-iot/liblpc/v2"
"time"
)
type CallableCallback func(callable Callable, err error)
type Callable interface {
liblpc.UserDataStorage
Start()
Call(timeout time.Duration, name string, mids ...MiddlewareFunc) error
Call0(timeout time.Duration, name string, headers RpcMsgHeader, mids ...MiddlewareFunc) (ackHeader RpcMsgHeader, err error)
Call1(timeout time.Duration, name string, in interface{}, mids ...MiddlewareFunc) error
Call2(timeout time.Duration, name string, headers RpcMsgHeader, in interface{}, mids ...MiddlewareFunc) (ackHeader RpcMsgHeader, err error)
Call3(timeout time.Duration, name string, out interface{}, mids ...MiddlewareFunc) error
Call4(timeout time.Duration, name string, headers RpcMsgHeader, out interface{}, mids ...MiddlewareFunc) (ackHeader RpcMsgHeader, err error)
Call5(timeout time.Duration, name string, in, out interface{}, mids ...MiddlewareFunc) error
Call6(timeout time.Duration, name string, headers RpcMsgHeader, in, out interface{}, mids ...MiddlewareFunc) (ackHeader RpcMsgHeader, err error)
Perform(timeout time.Duration, ctx Context)
SetOnReady(cb CallableCallback)
SetOnClose(cb CallableCallback)
liblpc.BucketEntry
BindTimeWheel(timeWheel *liblpc.TimeWheel)
NotifyTimeWheel()
Writer() Writer
}