client

package
v3.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL