Documentation ¶
Index ¶
- Constants
- func New() sdk.Source
- type Config
- type Iterator
- type Source
- func (s *Source) Ack(ctx context.Context, sdkPosition opencdc.Position) error
- func (s *Source) Configure(ctx context.Context, raw config.Config) error
- func (s *Source) Open(ctx context.Context, sdkPosition opencdc.Position) error
- func (s *Source) Parameters() config.Parameters
- func (s *Source) Read(ctx context.Context) (opencdc.Record, error)
- func (s *Source) Teardown(ctx context.Context) error
Constants ¶
View Source
const ( // ConfigKeyOrderingKey is a config name for a orderingKey field. ConfigKeyOrderingKey = "orderingKey" // ConfigKeyKeys is the config name for a keys field. ConfigKeyKeys = "keys" // ConfigKeySnapshot is a config name for a snapshot field. ConfigKeySnapshot = "snapshot" // ConfigKeyMetaProperties is a config name for a metaProperties field. ConfigKeyMetaProperties = "metaProperties" // ConfigKeyBatchSize is a config name for a batchSize field. ConfigKeyBatchSize = "batchSize" )
View Source
const ( ConfigBatchSize = "batchSize" ConfigContainer = "container" ConfigDatabase = "database" ConfigKeys = "keys" ConfigMetaProperties = "metaProperties" ConfigOrderingKey = "orderingKey" ConfigPartitionValue = "partitionValue" ConfigPrimaryKey = "primaryKey" ConfigSnapshot = "snapshot" ConfigUri = "uri" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { config.Config // The name of a key that is used for ordering items. OrderingKey string `json:"orderingKey" validate:"required"` // Comma-separated list of key names to build the opencdc.Record.Key. Keys []string `json:"keys"` // Determines whether the connector takes a snapshot // of all items before starting CDC mode. Snapshot bool `json:"snapshot" default:"true"` // MetaProperties whether the connector takes // the next automatically generated meta-properties: // "_rid", "_ts", "_self", "_etag", "_attachments". MetaProperties bool `json:"metaProperties" default:"false"` // The size of an element batch. BatchSize uint `json:"batchSize" validate:"gt=0,lt=100001" default:"1000"` }
Config holds configurable values specific to source.
type Source ¶
type Source struct { sdk.UnimplementedSource // contains filtered or unexported fields }
Source is an Azure Cosmos DB for NoSQL source connector.
func (*Source) Parameters ¶
func (s *Source) Parameters() config.Parameters
Parameters is a map of named [config.Parameter] that describe how to configure the Source.
func (*Source) Read ¶
Read returns the next opencdc.Record.
Click to show internal directories.
Click to hide internal directories.