Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilSDKPosition occurs when trying to parse a nil [sdk.Position]. // It's just a sentinel error for the [parsePosition] function. ErrNilSDKPosition = errors.New("nil sdk position") )
Functions ¶
This section is empty.
Types ¶
type Position ¶
type Position struct { Mode PositionMode `json:"mode"` // LastProcessedValue is a value of the last processed element by the snapshot capture. // This value is used if the mode is snapshot. LastProcessedValue any `json:"lastProcessedValue"` // MaxElement is a max value of an ordering property at the start of a snapshot. // This value is used if the mode is snapshot. MaxElement any `json:"maxElement,omitempty"` }
Position is an iterator position.
func ParsePosition ¶
ParsePosition converts an sdk.Position into a [position].
func (*Position) MarshalSDKPosition ¶
MarshalSDKPosition marshals the underlying [position] into a sdk.Position as JSON bytes.
type PositionMode ¶
type PositionMode string
PositionMode defines the [position] mode.
const ( ModeSnapshot PositionMode = "snapshot" ModeSnapshotPolling PositionMode = "snapshot_polling" )
The available position modes are listed below.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot implements a snapshot logic for the connector.
func NewPollingSnapshot ¶
func NewPollingSnapshot(ctx context.Context, params SnapshotParams) (*Snapshot, error)
NewPollingSnapshot creates a new instance of the Snapshot iterator prepared for polling.
func NewSnapshot ¶
func NewSnapshot(ctx context.Context, params SnapshotParams) (*Snapshot, error)
NewSnapshot creates a new instance of the Snapshot.
type SnapshotParams ¶
type SnapshotParams struct { Driver neo4j.DriverWithContext OrderingProperty string KeyProperties []string EntityType config.EntityType EntityLabels []string BatchSize int DatabaseName string Position *Position }
SnapshotParams is incoming params for the NewSnapshot function.
Click to show internal directories.
Click to hide internal directories.