Documentation ¶
Index ¶
- Constants
- func NewSource() sdk.Source
- type Config
- type Iterator
- type Source
- func (s *Source) Ack(ctx context.Context, position sdk.Position) error
- func (s *Source) Configure(_ context.Context, cfg map[string]string) (err 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(_ context.Context) error
Constants ¶
View Source
const ( // ConfigKeyPollingPeriod is a config name for a polling period. ConfigKeyPollingPeriod = "pollingPeriod" // ConfigKeyBufferSize is a config name for a buffer size. ConfigKeyBufferSize = "bufferSize" // ConfigKeyExtraProperties is a config name for a extra properties. ConfigKeyExtraProperties = "extraProperties" // 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 // PollingPeriod is the duration that defines a period of polling // new items if CDC is not available for a resource. PollingPeriod time.Duration `key:"pollingPeriod" validate:"gte=0"` // BufferSize is the buffer size for consumed items. // It will also be used as a limit when retrieving items from the HubSpot API. BufferSize int `key:"bufferSize" validate:"gte=1,lte=100"` // ExtraProperties holds a list of HubSpot resource properties to include // in addition to the default. If any of the specified properties are not present // on the requested HubSpot resource, they will be ignored. // Only CRM resources support this. ExtraProperties []string `key:"extraProperties"` // Snapshot determines whether or not the connector will take a snapshot // of the entire collection before starting CDC mode. Snapshot bool `key:"snapshot"` }
Config holds source-specific configurable values.
type Iterator ¶
type Iterator interface { HasNext(ctx context.Context) (bool, error) Next(ctx context.Context) (sdk.Record, error) Stop() }
Iterator defines an Iterator interface needed for the Source.
type Source ¶
type Source struct { sdk.UnimplementedSource // contains filtered or unexported fields }
Source is a HubSpot source plugin.
func (*Source) Parameters ¶
Parameters is a map of named sdk.Parameter that describe how to configure the Source.
func (*Source) Read ¶
Read fetches a new record from an iterator. If there's no record the method will return the sdk.ErrBackoffRetry.
Click to show internal directories.
Click to hide internal directories.