sink

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	SetTransientAttribute(key string, value string)
	TransientAttribute(key string) (value string, present bool)
	SetAttribute(key string, value string)
	Attribute(key string) (value string, present bool)
}

type Factory added in v0.4.0

type Factory = func(config *config.Config) (Sink, error)

type Manager added in v0.4.0

type Manager interface {
	Start() error
	Stop() error
	Emit(
		timestamp time.Time, topicName string, key, envelope schema.Struct,
	) error
}

type Sink

type Sink interface {
	Start() error
	Stop() error
	Emit(
		context Context, timestamp time.Time, topicName string, key, envelope schema.Struct,
	) error
}

type SinkFunc

type SinkFunc func(context Context, timestamp time.Time, topicName string, key, envelope schema.Struct) error

func (SinkFunc) Emit

func (sf SinkFunc) Emit(
	context Context, timestamp time.Time, topicName string, key, envelope schema.Struct,
) error

func (SinkFunc) Start

func (sf SinkFunc) Start() error

func (SinkFunc) Stop

func (sf SinkFunc) Stop() error

Jump to

Keyboard shortcuts

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