outputs

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterType

func RegisterType(name string, f Factory)

RegisterType registers a new output type.

Types

type Client

type Client interface {
	Close() error

	Publish(context.Context, consumer.Message) error

	String() string
}

type Connectable

type Connectable interface {
	Connect() error
}

type Factory

type Factory func(
	consumerInfo consumer.Info,
	cfg *common.Config,
) (Group, error)

func FindFactory

func FindFactory(name string) Factory

type Group

type Group struct {
	Clients   []Client
	BatchSize int
	Retry     int
}

func Fail

func Fail(err error) (Group, error)

func Load

func Load(
	consumerInfo consumer.Info,
	name string,
	config *common.Config,
) (Group, error)

func Success

func Success(batchSize, retry int, clients ...Client) (Group, error)

type NetworkClient

type NetworkClient interface {
	Client
	Connectable
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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