rpc/client/client_handler.go

22 lines
348 B
Go
Raw Normal View History

2017-10-31 09:25:44 +00:00
package client
import (
2017-11-01 03:40:26 +00:00
"net"
2017-10-31 09:25:44 +00:00
"time"
"git.loafle.net/commons_go/rpc"
"git.loafle.net/commons_go/rpc/protocol"
)
type ClientHandler interface {
2017-11-01 03:40:26 +00:00
Connect() (net.Conn, error)
2017-10-31 09:25:44 +00:00
GetCodec() protocol.ClientCodec
2017-11-01 03:10:39 +00:00
2017-10-31 09:25:44 +00:00
GetRPCRegistry() rpc.Registry
GetRequestTimeout() time.Duration
GetPendingRequests() int
GetRequestID() interface{}
Validate()
}