config

package
v0.15.17-hotfix.5 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferConfiguration

type BufferConfiguration struct {
	OnFullStrategy        *buffer.OnFullStrategy `yaml:"onFullStrategy"`
	MaxBufferSize         *int                   `yaml:"maxBufferSize"`
	MaxMessageSize        *int                   `yaml:"maxMessageSize"`
	CloseCheckInterval    *time.Duration         `yaml:"closeCheckInterval"`
	DropOldestInterval    *time.Duration         `yaml:"dropOldestInterval"`
	ScanBatchSize         *int                   `yaml:"scanBatchSize"`
	AllowedSpilloverRatio *float64               `yaml:"allowedSpilloverRatio"`
	CleanupRetry          *retry.Configuration   `yaml:"cleanupRetry"`
}

BufferConfiguration configs the buffer.

func (*BufferConfiguration) NewOptions

func (c *BufferConfiguration) NewOptions(iOpts instrument.Options) buffer.Options

NewOptions creates new buffer options.

type ConnectionConfiguration

type ConnectionConfiguration struct {
	NumConnections  *int                 `yaml:"numConnections"`
	DialTimeout     *time.Duration       `yaml:"dialTimeout"`
	WriteTimeout    *time.Duration       `yaml:"writeTimeout"`
	KeepAlivePeriod *time.Duration       `yaml:"keepAlivePeriod"`
	ResetDelay      *time.Duration       `yaml:"resetDelay"`
	Retry           *retry.Configuration `yaml:"retry"`
	FlushInterval   *time.Duration       `yaml:"flushInterval"`
	WriteBufferSize *int                 `yaml:"writeBufferSize"`
	ReadBufferSize  *int                 `yaml:"readBufferSize"`
}

ConnectionConfiguration configs the connection options.

func (*ConnectionConfiguration) NewOptions

NewOptions creates connection options.

type ProducerConfiguration

type ProducerConfiguration struct {
	Buffer BufferConfiguration `yaml:"buffer"`
	Writer WriterConfiguration `yaml:"writer"`
}

ProducerConfiguration configs the producer.

func (*ProducerConfiguration) NewProducer

func (c *ProducerConfiguration) NewProducer(
	cs client.Client,
	iOpts instrument.Options,
	rwOpts xio.Options,
) (producer.Producer, error)

NewProducer creates new producer.

type WriterConfiguration

type WriterConfiguration struct {
	TopicName                         string                         `yaml:"topicName" validate:"nonzero"`
	TopicServiceOverride              kv.OverrideConfiguration       `yaml:"topicServiceOverride"`
	TopicWatchInitTimeout             *time.Duration                 `yaml:"topicWatchInitTimeout"`
	PlacementOptions                  placement.Configuration        `yaml:"placement"`
	PlacementServiceOverride          services.OverrideConfiguration `yaml:"placementServiceOverride"`
	PlacementWatchInitTimeout         *time.Duration                 `yaml:"placementWatchInitTimeout"`
	MessagePool                       *pool.ObjectPoolConfiguration  `yaml:"messagePool"`
	MessageRetry                      *retry.Configuration           `yaml:"messageRetry"`
	MessageQueueNewWritesScanInterval *time.Duration                 `yaml:"messageQueueNewWritesScanInterval"`
	MessageQueueFullScanInterval      *time.Duration                 `yaml:"messageQueueFullScanInterval"`
	MessageQueueScanBatchSize         *int                           `yaml:"messageQueueScanBatchSize"`
	InitialAckMapSize                 *int                           `yaml:"initialAckMapSize"`
	CloseCheckInterval                *time.Duration                 `yaml:"closeCheckInterval"`
	AckErrorRetry                     *retry.Configuration           `yaml:"ackErrorRetry"`
	Encoder                           *proto.Configuration           `yaml:"encoder"`
	Decoder                           *proto.Configuration           `yaml:"decoder"`
	Connection                        *ConnectionConfiguration       `yaml:"connection"`
}

WriterConfiguration configs the writer options.

func (*WriterConfiguration) NewOptions

func (c *WriterConfiguration) NewOptions(
	cs client.Client,
	iOpts instrument.Options,
	rwOptions xio.Options,
) (writer.Options, error)

NewOptions creates writer options.

Jump to

Keyboard shortcuts

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