2017-10-31 09:25:44 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"git.loafle.net/commons_go/rpc/protocol"
|
2017-12-01 07:48:40 +00:00
|
|
|
crr "git.loafle.net/commons_go/rpc/registry"
|
2017-11-29 09:55:24 +00:00
|
|
|
cuc "git.loafle.net/commons_go/util/context"
|
2017-10-31 09:25:44 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ClientHandler interface {
|
2017-11-29 09:55:24 +00:00
|
|
|
ClientContext(parent cuc.Context) ClientContext
|
|
|
|
|
|
|
|
Init(clientCTX ClientContext) error
|
|
|
|
Destroy(clientCTX ClientContext)
|
2017-11-01 03:10:39 +00:00
|
|
|
|
2017-11-29 09:55:24 +00:00
|
|
|
GetCodec() protocol.ClientCodec
|
2017-12-01 07:48:40 +00:00
|
|
|
GetRPCInvoker() crr.RPCInvoker
|
2017-10-31 09:25:44 +00:00
|
|
|
GetRequestTimeout() time.Duration
|
|
|
|
GetPendingRequests() int
|
2017-11-01 08:43:20 +00:00
|
|
|
GetRequestID() uint64
|
2017-10-31 09:25:44 +00:00
|
|
|
Validate()
|
|
|
|
}
|