Documentation ¶
Overview ¶
Package source implements the source logic of the Neo4j connector.
Index ¶
- Constants
- func New() sdk.Source
- type Config
- type Iterator
- type Source
- func (s *Source) Ack(ctx context.Context, sdkPosition sdk.Position) error
- func (s *Source) Configure(_ context.Context, raw map[string]string) error
- func (s *Source) Open(ctx context.Context, sdkPosition sdk.Position) error
- func (s *Source) Parameters() map[string]sdk.Parameter
- func (s *Source) Read(ctx context.Context) (sdk.Record, error)
- func (s *Source) Teardown(ctx context.Context) error
Constants ¶
View Source
const ( // ConfigKeyOrderingProperty is a config name for a orderingProperty field. ConfigKeyOrderingProperty = "orderingProperty" // ConfigKeyKeyProperties is a config name for a keyProperties field. ConfigKeyKeyProperties = "keyProperties" // ConfigKeyBatchSize is a config name for a batch size. ConfigKeyBatchSize = "batchSize" // ConfigKeySnapshot is a config name for a snapshot field. ConfigKeySnapshot = "snapshot" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { config.Config // The name of a property that is used for ordering // nodes or relationships when capturing a snapshot. OrderingProperty string `json:"orderingProperty" validate:"required"` // The list of property names that are used for constructing a record key. KeyProperties []string `json:"keyProperties"` // The size of an element batch. BatchSize int `json:"batchSize" validate:"gt=0,lt=100001" default:"1000"` // Determines whether or not the connector will take a snapshot // of all nodes or relationships before starting polling mode. Snapshot bool `json:"snapshot" default:"true"` }
Config holds configurable values specific to source.
type Iterator ¶
type Iterator interface { HasNext(context.Context) (bool, error) Next(context.Context) (sdk.Record, error) }
Iterator defines an Iterator interface needed for the Source.
type Source ¶
type Source struct { sdk.UnimplementedSource // contains filtered or unexported fields }
Source Neo4j Connector reads records from a Neo4j.
func (*Source) Parameters ¶
Parameters is a map of named sdk.Parameter that describe how to configure the Source.
func (*Source) Read ¶
Read returns a new sdk.Record. It can return the error sdk.ErrBackoffRetry to signal to the SDK it should call Read again with a backoff retry.
Click to show internal directories.
Click to hide internal directories.