sink

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSinkTypeRequired = errors.New("pipelines[n].sink.type is required")

Functions

This section is empty.

Types

type AbstractInterceptor

type AbstractInterceptor struct {
	DoName      func() string
	DoIntercept func(invoker Invoker, invocation Invocation) api.Result
}

func (*AbstractInterceptor) Category

func (ai *AbstractInterceptor) Category() api.Category

func (*AbstractInterceptor) Config

func (ai *AbstractInterceptor) Config() interface{}

func (*AbstractInterceptor) Init

func (ai *AbstractInterceptor) Init(context api.Context) error

func (*AbstractInterceptor) Intercept

func (ai *AbstractInterceptor) Intercept(invoker Invoker, invocation Invocation) api.Result

func (*AbstractInterceptor) Start

func (ai *AbstractInterceptor) Start() error

func (*AbstractInterceptor) Stop

func (ai *AbstractInterceptor) Stop()

func (*AbstractInterceptor) String

func (ai *AbstractInterceptor) String() string

func (*AbstractInterceptor) Type

func (ai *AbstractInterceptor) Type() api.Type

type AbstractInvoker

type AbstractInvoker struct {
	DoInvoke func(invocation Invocation) api.Result
}

func (*AbstractInvoker) Invoke

func (ai *AbstractInvoker) Invoke(invocation Invocation) api.Result

type Config

type Config struct {
	Enabled     *bool              `yaml:"enabled,omitempty"`
	Name        string             `yaml:"name,omitempty"`
	Type        string             `yaml:"type,omitempty" validate:"required"`
	Properties  cfg.CommonCfg      `yaml:",inline"`
	Parallelism int                `yaml:"parallelism,omitempty" default:"1" validate:"required,gte=1,lte=100"`
	Codec       codec.Config       `yaml:"codec,omitempty" validate:"dive"`
	Concurrency concurrency.Config `yaml:"concurrency,omitempty"`
}

func (*Config) DeepCopy added in v1.4.0

func (c *Config) DeepCopy() *Config

func (*Config) Merge added in v1.3.0

func (c *Config) Merge(from *Config)

func (*Config) Validate

func (c *Config) Validate() error

type Info

type Info struct {
	Sink         api.Sink
	Queue        api.Queue
	Interceptors []Interceptor
}

type Interceptor

type Interceptor interface {
	api.Interceptor
	Intercept(invoker Invoker, invocation Invocation) api.Result
}

type Invocation

type Invocation struct {
	Batch    api.Batch
	Sink     api.Sink
	FlowPool api.FlowDataPool
}

type Invoker

type Invoker interface {
	Invoke(invocation Invocation) api.Result
}

type SortableInterceptor

type SortableInterceptor []Interceptor

func (SortableInterceptor) Len

func (si SortableInterceptor) Len() int

func (SortableInterceptor) Less

func (si SortableInterceptor) Less(i, j int) bool

func (SortableInterceptor) Sort

func (si SortableInterceptor) Sort()

func (SortableInterceptor) Swap

func (si SortableInterceptor) Swap(i, j int)

type SubscribeInvoker

type SubscribeInvoker struct {
}

func (*SubscribeInvoker) Invoke

func (si *SubscribeInvoker) Invoke(invocation Invocation) api.Result

Jump to

Keyboard shortcuts

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