Documentation ¶
Index ¶
Constants ¶
View Source
const ( DialTimeout = 5 * time.Second RequestTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetServerInfo returns the basic server infos of the cluster. GetServerInfo() ([]string, error) // SendRequest sends a rpc request to the server. SendRequest(ctx context.Context, address string, req *hstreamrpc.Request) (*hstreamrpc.Response, error) // Close closes the client. Close() }
Client is a client that sends RPC to HStreamDB server. It should not be used after calling Close().
type RPCClient ¶ added in v0.1.1
RPCClient will send rpc requests to HStreamDB server.
func NewRPCClient ¶ added in v0.1.1
NewRPCClient TODO:use connection pool for each address
func (*RPCClient) GetServerInfo ¶ added in v0.1.1
GetServerInfo returns cached server info
func (*RPCClient) SendRequest ¶ added in v0.1.1
func (c *RPCClient) SendRequest(ctx context.Context, address string, req *hstreamrpc.Request) (*hstreamrpc.Response, error)
SendRequest sends a hstreamrpc.Request to the specified server.
Click to show internal directories.
Click to hide internal directories.