sample

package
v0.0.0-rc9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderType = abstract.ProviderType("sample")

Variables

This section is empty.

Functions

func NewSource

func NewSource(src *SampleSource, transferID string, logger log.Logger, registry metrics.Registry) (abstract.Source, error)

Types

type IotData

type IotData struct {
	// contains filtered or unexported fields
}

func NewIot

func NewIot(
	table string,
) *IotData

func (*IotData) TableName

func (i *IotData) TableName() abstract.TableID

func (*IotData) ToChangeItem

func (i *IotData) ToChangeItem(offset int64) abstract.ChangeItem

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func (*Provider) Activate

func (*Provider) Source

func (p *Provider) Source() (abstract.Source, error)

func (*Provider) Storage

func (p *Provider) Storage() (abstract.Storage, error)

func (*Provider) Type

func (p *Provider) Type() abstract.ProviderType

type SampleSource

type SampleSource struct {
	SampleType         string
	TableName          string
	MaxSampleData      int64
	MinSleepTime       time.Duration
	SnapshotEventCount int64
}

func RecipeSource

func RecipeSource() *SampleSource

func (*SampleSource) GetProviderType

func (s *SampleSource) GetProviderType() abstract.ProviderType

func (*SampleSource) IsSource

func (s *SampleSource) IsSource()

func (*SampleSource) Validate

func (s *SampleSource) Validate() error

func (*SampleSource) WithDefaults

func (s *SampleSource) WithDefaults()

type Source

type Source struct {
	// contains filtered or unexported fields
}

func (*Source) Run

func (s *Source) Run(sink abstract.AsyncSink) error

func (*Source) Stop

func (s *Source) Stop()

type Storage

type Storage struct {
	SampleType         string
	SnapshotEventCount int64
	TableName          string
	MaxSampleData      int64
	MinSleepTime       time.Duration
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(config *SampleSource, log log.Logger) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close()

func (*Storage) EstimateTableRowsCount

func (s *Storage) EstimateTableRowsCount(_ abstract.TableID) (uint64, error)

func (*Storage) ExactTableRowsCount

func (s *Storage) ExactTableRowsCount(_ abstract.TableID) (uint64, error)

func (*Storage) LoadTable

func (s *Storage) LoadTable(ctx context.Context, _ abstract.TableDescription, pusher abstract.Pusher) error

func (*Storage) Ping

func (s *Storage) Ping() error

func (*Storage) TableExists

func (s *Storage) TableExists(_ abstract.TableID) (bool, error)

func (*Storage) TableList

func (s *Storage) TableList(filter abstract.IncludeTableList) (abstract.TableMap, error)

func (*Storage) TableSchema

func (s *Storage) TableSchema(ctx context.Context, table abstract.TableID) (*abstract.TableSchema, error)

type StreamingData

type StreamingData interface {
	TableName() abstract.TableID
	ToChangeItem(offset int64) abstract.ChangeItem
}

type UserActivities

type UserActivities struct {
	// contains filtered or unexported fields
}

func NewUserActivities

func NewUserActivities(table string) *UserActivities

func (*UserActivities) TableName

func (u *UserActivities) TableName() abstract.TableID

func (*UserActivities) ToChangeItem

func (u *UserActivities) ToChangeItem(offset int64) abstract.ChangeItem

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL