jitsu_sdk

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const FullSyncChunkSize = 1000
View Source
const IdField = "$id"
View Source
const LatestVersion = "latest"
View Source
const RecordTimestampDst = "_record_timestamp"
View Source
const RecordTimestampSrc = "$recordTimestamp"

Variables

View Source
var ErrSDKSourceCancelled = errors.New("Source runner was cancelled.")

Functions

func NewSdkSource

func NewSdkSource(ctx context.Context, sourceConfig *base.SourceConfig, collection *base.Collection) (base.Driver, error)

NewSdkSource returns SdkSource driver and 1. writes json files (config, catalog, state) if string/raw json was provided 2. runs discover and collects catalog.json

func TestSdkSource

func TestSdkSource(sourceConfig *base.SourceConfig) error

TestSdkSource tests sdk source connection (runs validator) if docker has been ready otherwise returns errNotReady

Types

type Condition

type Condition struct {
	Field  string      `mapstructure:"field" json:"field,omitempty"`
	Value  interface{} `mapstructure:"value" json:"value,omitempty"`
	Clause string      `mapstructure:"clause" json:"clause,omitempty"`
}

type DeleteRecords

type DeleteRecords struct {
	PartitionTimestamp string `mapstructure:"partitionTimestamp" json:"partitionTimestamp,omitempty"`
	Granularity        string `mapstructure:"granularity" json:"granularity,omitempty"`
}

type Row

type Row struct {
	Type    string      `json:"type"`
	Message interface{} `json:"message,omitempty"`
}

Row is a dto for sdk source output row representation

type SdkSource

type SdkSource struct {
	base.AbstractCLIDriver
	// contains filtered or unexported fields
}

SdkSource is an SdkSource CLI driver

func (*SdkSource) Close

func (s *SdkSource) Close() (multiErr error)

Close kills all runners and returns errors if occurred

func (*SdkSource) Delete

func (s *SdkSource) Delete() error

func (*SdkSource) GetDriversInfo

func (s *SdkSource) GetDriversInfo() *base.DriversInfo

GetDriversInfo returns telemetry information about the driver

func (*SdkSource) IsClosed

func (s *SdkSource) IsClosed() bool

func (*SdkSource) Load

func (s *SdkSource) Load(config string, state string, taskLogger logging.TaskLogger, dataConsumer base.CLIDataConsumer, taskCloser base.CLITaskCloser) error

func (*SdkSource) Ready

func (s *SdkSource) Ready() (bool, error)

Ready returns true if catalog is discovered

func (*SdkSource) ReplaceTables

func (s *SdkSource) ReplaceTables() bool

func (*SdkSource) Type

func (s *SdkSource) Type() string

type SdkSourceRunner

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

func (*SdkSourceRunner) Close

func (s *SdkSourceRunner) Close() error

func (*SdkSourceRunner) GetOrRotateChunk

func (s *SdkSourceRunner) GetOrRotateChunk(taskLogger logging.TaskLogger, dataConsumer base.CLIDataConsumer, currentChunk *base.CLIOutputRepresentation, chunkNumber int, forceCreate bool, finalChunk bool) (newChunk *base.CLIOutputRepresentation, newChunkNumber int, err error)

func (*SdkSourceRunner) Load

func (s *SdkSourceRunner) Load(taskLogger logging.TaskLogger, dataConsumer base.CLIDataConsumer, state string) (err error)

func (*SdkSourceRunner) String

func (s *SdkSourceRunner) String() string

Jump to

Keyboard shortcuts

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