scribe

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAck        = errors.New("ack wait must be > 0")
	ErrAckTimeout = errors.New("timed out waiting for acknowledgement")
)

Functions

This section is empty.

Types

type AckWaitSeconds

type AckWaitSeconds int

type Client

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

func NewClient

func NewClient(ctx context.Context, conn grpc.ClientConnInterface, opts ...ClientOpt) (*Client, error)

func (*Client) WriteBatch

func (c *Client) WriteBatch(ctx context.Context, batch []*anypb.Any, cb ClientBatchFunc) error

type ClientBatchFunc

type ClientBatchFunc func(ack bool, err error)

type ClientFactory

type ClientFactory func() (*Client, error)

func NewClientFactory

func NewClientFactory(ctx context.Context, cfg *Config, dop client.DialOptionsProvider) ClientFactory

type ClientOpt

type ClientOpt interface {
	// contains filtered or unexported methods
}

type Config

type Config struct {
	client.Config `json:",squash"` // nolint:staticcheck // squash is used by mapstructure

	MaxInflightBatches int  `json:"max_inflight_batches"`
	AckWaitSeconds     int  `json:"ack_wait_seconds"`
	DisableTLS         bool `json:"disable_tls"`
}

Jump to

Keyboard shortcuts

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