source

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigClientID           = "clientID"
	ConfigClientSecret       = "clientSecret"
	ConfigInsecureSkipVerify = "insecureSkipVerify"
	ConfigOauthEndpoint      = "oauthEndpoint"
	ConfigPollingPeriod      = "pollingPeriod"
	ConfigPubsubAddress      = "pubsubAddress"
	ConfigReplayPreset       = "replayPreset"
	ConfigRetryCount         = "retryCount"
	ConfigTopicName          = "topicName"
	ConfigTopicNames         = "topicNames"
)

Variables

This section is empty.

Functions

func NewSource

func NewSource() sdk.Source

Types

type Config

type Config struct {
	config.Config

	// Deprecated: use `topicNames` instead.
	TopicName string `json:"topicName"`

	// TopicNames are the TopicNames the source connector will subscribe to
	TopicNames []string `json:"topicNames"`

	// PollingPeriod is the client event polling interval
	PollingPeriod time.Duration `json:"pollingPeriod" default:"100ms"`

	// Replay preset for the position the connector is fetching events from, can be latest or default to earliest.
	ReplayPreset string `json:"replayPreset" default:"earliest" validate:"inclusion=latest|earliest"`
}

func (Config) Parameters

func (Config) Parameters() map[string]config.Parameter

func (Config) Validate

func (c Config) Validate(ctx context.Context) (Config, error)

type Source

type Source struct {
	sdk.UnimplementedSource
	// contains filtered or unexported fields
}

func (*Source) Ack

func (s *Source) Ack(ctx context.Context, pos opencdc.Position) error

func (*Source) Configure

func (s *Source) Configure(ctx context.Context, cfg config.Config) error

func (*Source) Open

func (s *Source) Open(ctx context.Context, sdkPos opencdc.Position) error

func (*Source) Parameters

func (s *Source) Parameters() config.Parameters

func (*Source) Read

func (s *Source) Read(ctx context.Context) (rec opencdc.Record, err error)

func (*Source) Teardown

func (s *Source) Teardown(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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