proximo

package
v0.0.0-...-e11bb24 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package proximo provides proximo support for substrate

Usage

This package support two methods of use. The first is to directly use this package. See the function documentation for more details.

The second method is to use the suburl package. See https://godoc.org/github.com/charlie/substrate/suburl for more information.

Using suburl

The url structure is proximo://host:port/topic/

Additionally, for sources, the following url parameters are available

offset             - The initial offset. Valid values are `newest` and `oldest`.
consumer-group     - The consumer group id
keep-alive-time    - The interval that a keep alive is performed at as a go duration
keep-alive-timeout - The go duration at which a keepalive will timeout [Default: 10s] (requires keep-alive-time to take effect, if keep-alive-time is not present this is ignored)
insecure=true      - The connection to the proximo grpc endpoint will not be using TLS
max-recv-msg-size  - The gRPC max receive message size in bytes (source only) [Default: 67,108,864 (64MiB)]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type AsyncMessageSinkConfig

type AsyncMessageSinkConfig struct {
	Broker    string
	Topic     string
	Insecure  bool
	KeepAlive *KeepAlive

	Debug bool
}

type AsyncMessageSourceConfig

type AsyncMessageSourceConfig struct {
	ConsumerGroup  string
	Topic          string
	Broker         string
	Offset         Offset
	Insecure       bool
	KeepAlive      *KeepAlive
	MaxRecvMsgSize int
}

AsyncMessageSource represents a proximo message source and implements the substrate.AsyncMessageSource interface.

type KeepAlive

type KeepAlive struct {
	// Time the interval at which a keep alive is performed
	Time time.Duration
	// TimeOut the duration in which a keep alive is deemed to have failed if no response is received
	Timeout time.Duration
}

KeepAlive provides configuration for the gRPC keep alive

type Offset

type Offset int64

Offset is the type used to specify the initial subscription offset

const (
	// OffsetOldest indicates the oldest appropriate message available on the broker.
	OffsetOldest Offset = 1
	// OffsetNewest indicates the next appropriate message available on the broker.
	OffsetNewest Offset = 2
)

Jump to

Keyboard shortcuts

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