Documentation ¶
Overview ¶
Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0
Index ¶
- type GRPCClient
- func (c *GRPCClient) Close() error
- func (c *GRPCClient) Conn() *grpc.ClientConn
- func (c *GRPCClient) Inspect(ctx context.Context, index string, columnIDs []uint64, columnKeys []string, ...) (pb.StreamClient, error)
- func (c *GRPCClient) Query(ctx context.Context, index string, pql string) (pb.StreamClient, error)
- func (c *GRPCClient) QueryUnary(ctx context.Context, index string, pql string) (*pb.TableResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is a client for working with the gRPC server.
func NewGRPCClient ¶
func NewGRPCClient(dialTargets []string, tlsConfig *tls.Config, logger logger.Logger) (*GRPCClient, error)
NewGRPCClient returns a new instance of GRPCClient.
func (*GRPCClient) Close ¶
func (c *GRPCClient) Close() error
Close closes any connections the client has opened.
func (*GRPCClient) Conn ¶
func (c *GRPCClient) Conn() *grpc.ClientConn
Conn returns the gRPC client connection. If the connection has gone into state `TransientFailure`, this method tries to reset the connection and return that new connection.
func (*GRPCClient) Inspect ¶
func (c *GRPCClient) Inspect(ctx context.Context, index string, columnIDs []uint64, columnKeys []string, query string, fieldFilters []string, limit, offset uint64) (pb.StreamClient, error)
Inspect returns a stream of RowResponse for the given index, columns, and filters. It is intended to mimic something like "select [fields] from table where recordID IN (...)".
func (*GRPCClient) Query ¶
func (c *GRPCClient) Query(ctx context.Context, index string, pql string) (pb.StreamClient, error)
Query returns a stream of RowResponse for the given index and PQL string.
func (*GRPCClient) QueryUnary ¶
func (c *GRPCClient) QueryUnary(ctx context.Context, index string, pql string) (*pb.TableResponse, error)
QueryUnary returns a TableResponse for the given index and PQL string.