grpc

package
v0.0.0-...-ad801e6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a GRPC client.

func NewClient

func NewClient(
	address string,
	opts *Options,
) (*Client, error)

NewClient creates a new client.

func (*Client) Close

func (c *Client) Close() error

Close closes the client.

func (*Client) Health

func (c *Client) Health() (*client.HealthResult, error)

Health performs a health check against the database.

func (*Client) QueryGrouped

QueryGrouped performs a grouped query.

func (*Client) QueryRaw

QueryRaw performs a raw query.

func (*Client) QueryTimeBucket

QueryTimeBucket performs a time bucket query.

func (*Client) Write

func (c *Client) Write(
	ctx context.Context,
	namespace []byte,
	documents []document.Document,
) error

Write writes a batch of documents.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options provide a set of client options.

func NewOptions

func NewOptions() *Options

NewOptions creates a new set of options.

func (*Options) ClockOptions

func (o *Options) ClockOptions() clock.Options

ClockOptions returns the clock options.

func (*Options) DialTimeout

func (o *Options) DialTimeout() time.Duration

DialTimeout returns the dial timeout. When this is non zero, the initial dialing is blocking until the connection is established.

func (*Options) InstrumentOptions

func (o *Options) InstrumentOptions() instrument.Options

InstrumentOptions returns the instrument options.

func (*Options) KeepAlivePeriod

func (o *Options) KeepAlivePeriod() time.Duration

KeepAlivePeriod returns the keep alive period.

func (*Options) MaxRecvMsgSize

func (o *Options) MaxRecvMsgSize() int

MaxRecvMsgSize returns the max message size in bytes the server can receive.

func (*Options) ReadTimeout

func (o *Options) ReadTimeout() time.Duration

ReadTimeout returns the read timeout.

func (*Options) SetClockOptions

func (o *Options) SetClockOptions(v clock.Options) *Options

SetClockOptions sets the clock options.

func (*Options) SetDialTimeout

func (o *Options) SetDialTimeout(v time.Duration) *Options

SetDialTimeout sets the dial timeout for establishing the initial connection. When this is non zero, the initial dialing is blocking until the connection is established.

func (*Options) SetInstrumentOptions

func (o *Options) SetInstrumentOptions(v instrument.Options) *Options

SetInstrumentOptions sets the instrument options.

func (*Options) SetKeepAlivePeriod

func (o *Options) SetKeepAlivePeriod(v time.Duration) *Options

SetKeepAlivePeriod sets the keep alive period.

func (*Options) SetMaxRecvMsgSize

func (o *Options) SetMaxRecvMsgSize(v int) *Options

SetMaxRecvMsgSize sets the max message size in bytes the server can receive.

func (*Options) SetReadTimeout

func (o *Options) SetReadTimeout(v time.Duration) *Options

SetReadTimeout sets the read timeout.

func (*Options) SetUseCompression

func (o *Options) SetUseCompression(v bool) *Options

SetUseCompression sets whether to use compression.

func (*Options) SetUseInsecure

func (o *Options) SetUseInsecure(v bool) *Options

SetUseInsecure sets whether to use insecure connection.

func (*Options) SetWriteBufferSize

func (o *Options) SetWriteBufferSize(v int) *Options

SetWriteBufferSize sets the read buffer size. This determines how much data can be read at most for one read syscall.

func (*Options) SetWriteTimeout

func (o *Options) SetWriteTimeout(v time.Duration) *Options

SetWriteTimeout sets the write timeout.

func (*Options) UseCompression

func (o *Options) UseCompression() bool

UseCompression returns whether to use compression.

func (*Options) UseInsecure

func (o *Options) UseInsecure() bool

UseInsecure returns whether to use insecure connection.

func (*Options) WriteBufferSize

func (o *Options) WriteBufferSize() int

WriteBufferSize returns the read buffer size. This determines how much data can be read at most for one read syscall.

func (*Options) WriteTimeout

func (o *Options) WriteTimeout() time.Duration

WriteTimeout returns the write timeout.

Jump to

Keyboard shortcuts

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