common

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	Config    config.ConfigAccessor
	Connector connector.Connector
}

func (*Connector) InitConnector

func (c *Connector) InitConnector(ctx context.Context, config []byte) error

type HTTPConfig

type HTTPConfig struct {
	WorkerConfig `yaml:",inline" json:",inline"`
	BasePath     string `yaml:"base_path" json:"base_path"`
	Port         int    `yaml:"port" json:"port"`
}

type HTTPSourceConstructor

type HTTPSourceConstructor func() connector.HTTPSource

type SinkConfigConstructor

type SinkConfigConstructor func() config.SinkConfigAccessor

type SinkConstructor

type SinkConstructor func() connector.Sink

type SourceConfigConstructor

type SourceConfigConstructor func() config.SourceConfigAccessor

type SourceConstructor

type SourceConstructor func() connector.Source

type Worker

type Worker interface {
	Config() WorkerConfig
	Start(ctx context.Context) error
	Stop() error
	RegisterConnector(connectorID string, config []byte) error
	RemoveConnector(connectorID string)
}

type WorkerConfig

type WorkerConfig struct {
	// standalone or multi
	Multi bool `yaml:"multi" json:"multi"`
	// connector type
	ConnectorType string `yaml:"connector_type" json:"connector_type"`
	// log config
	LogConfig config.LogConfig `json:"log_config" yaml:"log_config"`
}

Jump to

Keyboard shortcuts

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