Documentation ¶
Index ¶
- Constants
- Variables
- type CDCIterator
- func (c *CDCIterator) GetChangedLeadsIDs(ctx context.Context, token string) ([]int, map[int]int, error)
- func (c *CDCIterator) GetDeletedLeadsIDs(ctx context.Context, token string) ([]int, error)
- func (c *CDCIterator) HasNext(ctx context.Context) bool
- func (c *CDCIterator) Next(ctx context.Context) (sdk.Record, error)
- func (c *CDCIterator) Stop()
- type CombinedIterator
- type Record
- type SnapshotIterator
Constants ¶
View Source
const ( ActivityTypeIDNewLead = 12 ActivityTypeIDChangeDataValue = 13 )
ActivityTypeID to capture required CDC events. For reference https://developers.marketo.com/blog/synchronizing-lead-data-changes-using-rest-api/
View Source
const ( // is the maximum number of days between two snapshots. If the gap between two snapshots is greater than this number, // API will return an error. This is limitation of the API. MaximumHoursGap = 744 // 31 days in Hours )
Variables ¶
View Source
var ErrDone = errors.New("no more records in iterator")
Functions ¶
This section is empty.
Types ¶
type CDCIterator ¶
type CDCIterator struct {
// contains filtered or unexported fields
}
func NewCDCIterator ¶
func (*CDCIterator) GetChangedLeadsIDs ¶
func (c *CDCIterator) GetChangedLeadsIDs(ctx context.Context, token string) ([]int, map[int]int, error)
returns list of changed leads ids.
func (*CDCIterator) GetDeletedLeadsIDs ¶
returns list of deleted leads ids.
func (*CDCIterator) HasNext ¶
func (c *CDCIterator) HasNext(ctx context.Context) bool
returns true if there are more records to be read from the iterator's buffer, otherwise returns false.
func (*CDCIterator) Stop ¶
func (c *CDCIterator) Stop()
type CombinedIterator ¶
type CombinedIterator struct {
// contains filtered or unexported fields
}
func NewCombinedIterator ¶
func (*CombinedIterator) Stop ¶
func (c *CombinedIterator) Stop()
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
custom Record type to handle CDC
type SnapshotIterator ¶
type SnapshotIterator struct {
// contains filtered or unexported fields
}
to handle snapshot iterator
func NewSnapshotIterator ¶
func NewSnapshotIterator(ctx context.Context, endpoint string, fields []string, client marketoclient.Client, p position.Position, initialDate time.Time) (*SnapshotIterator, error)
returns NewSnapshotIterator with supplied parameters, also initiates the pull and flush goroutines.
Click to show internal directories.
Click to hide internal directories.