rpc/client/client_handler.go

24 lines
473 B
Go
Raw Normal View History

2017-10-31 09:25:44 +00:00
package client
import (
"time"
"git.loafle.net/commons_go/rpc"
"git.loafle.net/commons_go/rpc/protocol"
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-10-31 09:25:44 +00:00
GetRPCRegistry() rpc.Registry
GetRequestTimeout() time.Duration
GetPendingRequests() int
2017-11-01 08:43:20 +00:00
GetRequestID() uint64
2017-10-31 09:25:44 +00:00
Validate()
}