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