sink

package
v0.0.0-...-1a65ef4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListRegisteredSinkTypes

func ListRegisteredSinkTypes() []string

func Register

func Register(item SinkRegItem)

The sink will register itself in `init`. During that the the logger may not be inited. So here we'd better not log anything

Types

type Configuration

type Configuration struct {
	Type       string                 `json:"type"`
	Properties map[string]interface{} `json:"properties"`
}

type Sink

type Sink interface {
	Write(headers []string, rows [][]interface{}, index int) error
	Init(name string, fields []common.Field) error
	GetStats() *Stats
}

func CreateSink

func CreateSink(config Configuration) (Sink, error)

type SinkConstructor

type SinkConstructor func(properties map[string]interface{}) (Sink, error)

func GetConstructor

func GetConstructor(sinkName string) SinkConstructor

type SinkRegItem

type SinkRegItem struct {
	Name        string
	Constructor SinkConstructor
}

type Stats

type Stats struct {
	SuccessWrite int
	FailedWrite  int
}

Jump to

Keyboard shortcuts

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