modeutil

package
v5.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoConnectionConfigured indicates no configured connections for publishing.
	ErrNoConnectionConfigured = errors.New("No connection configured")
)

Functions

func MakeAsyncClients

func MakeAsyncClients(
	config *common.Config,
	newClient AsyncClientFactory,
) ([]mode.AsyncProtocolClient, error)

func MakeClients

func MakeClients(
	config *common.Config,
	newClient ClientFactory,
) ([]mode.ProtocolClient, error)

MakeClients will create a list from of ProtocolClient instances from outputer configuration host list and client factory function.

func NewAsyncConnectionMode

func NewAsyncConnectionMode(
	clients []mode.AsyncProtocolClient,
	s Settings,
) (mode.ConnectionMode, error)

func NewAsyncFailoverClient

func NewAsyncFailoverClient(clients []mode.AsyncProtocolClient) []mode.AsyncProtocolClient

func NewConnectionMode

func NewConnectionMode(
	clients []mode.ProtocolClient,
	s Settings,
) (mode.ConnectionMode, error)

func NewFailoverClient

func NewFailoverClient(clients []mode.ProtocolClient) []mode.ProtocolClient

func ReadHostList

func ReadHostList(cfg *common.Config) ([]string, error)

Types

type AsyncClientFactory

type AsyncClientFactory func(string) (mode.AsyncProtocolClient, error)

type ClientFactory

type ClientFactory func(host string) (mode.ProtocolClient, error)

type Settings

type Settings struct {
	Failover     bool
	MaxAttempts  int
	WaitRetry    time.Duration
	Timeout      time.Duration
	MaxWaitRetry time.Duration
}

Jump to

Keyboard shortcuts

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