source

package
v1.3.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSourceNameRequired = errors.New("pipelines[n].source.name is required")
	ErrSourceTypeRequired = errors.New("pipelines[n].source.type is required")
)

Functions

This section is empty.

Types

type AbstractInvoker

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

func NewFakeInvoker

func NewFakeInvoker() *AbstractInvoker

NewFakeInvoker usually used by unit test or benchmark

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"`
	FieldsUnderRoot bool                   `yaml:"fieldsUnderRoot,omitempty" default:"false"`
	FieldsUnderKey  string                 `yaml:"fieldsUnderKey,omitempty" default:"fields"`
	Fields          map[string]interface{} `yaml:"fields,omitempty"`
	FieldsFromEnv   map[string]string      `yaml:"fieldsFromEnv,omitempty"`
	Codec           *codec.Config          `yaml:"codec,omitempty"`
}

func MergeSourceList added in v1.3.0

func MergeSourceList(base []*Config, from []*Config) []*Config

func (*Config) DeepCopy added in v1.3.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 {
	Source       api.Source
	Queue        api.Queue
	Interceptors []Interceptor
}

type Interceptor

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

type Invocation

type Invocation struct {
	Event api.Event
	Queue api.Queue
}

type Invoker

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

type PublishInvoker

type PublishInvoker struct {
}

publish event to queue

func (*PublishInvoker) Invoke

func (i *PublishInvoker) 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)

Jump to

Keyboard shortcuts

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