carrier

package
v0.0.0-...-ae8612d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(
	ctx context.Context,
	logger *logrus.Logger,
	config Config,
	boatStore *clientstore.Store,
	producer sarama.SyncProducer,
	kc kafka.Consumer,
	retryKc kafka.Consumer,
	redisPool *redis.Pool,
)

func Stop

func Stop()

Types

type Config

type Config struct {
	Boat struct {
		NamePrefix string        `mapstructure:"name-prefix"`
		AckWait    time.Duration `mapstructure:"ack-wait"`
	}
	Consumer struct {
		Concurrency      int
		Topic            string
		RetryTopic       string        `mapstructure:"retry-topic"`
		RetryConcurrency int           `mapstructure:"retry-concurrency"`
		RetryDelay       time.Duration `mapstructure:"retry-delay"`
		MaxRetries       int64         `mapstructure:"max-retries"`
		DLQTopic         string        `mapstructure:"dlq-topic"`
	}
	Platform struct {
		Names            []string
		MaxOfflineCounts map[string]int `mapstructure:"max-offline-counts"`
	}
	Offline struct {
		BatchCount int64 `mapstructure:"batch-count"`
		Expire     time.Duration
	}
	// contains filtered or unexported fields
}

func (*Config) Validate

func (cfg *Config) Validate() error

Jump to

Keyboard shortcuts

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