Documentation ¶
Index ¶
Constants ¶
View Source
const ( SourceKafka string = "kafka" FormatJson string = "json" )
View Source
const ( OptConnectorType = "type" OptConnectorServers = "bootstrap.servers" OptConnectorTopic = "topic" OptConnectorValue = "value" OptConnectorSql = "sql" OptConnectorRel = "relkind" OptConnectorPartition = "partition" OptConnectorBufferLimit = "buffer_limit" OptConnectorTimeWindow = "time_window" )
Variables ¶
View Source
var ConnectorEssentialOpts = map[string]struct{}{ OptConnectorType: {}, }
View Source
var ConnectorEssentialTypeOpts = map[string]map[string]struct{}{ "kafka": { OptConnectorServers: {}, OptConnectorTopic: {}, OptConnectorValue: {}, }, }
View Source
var ConnectorOptConstraint = map[string]OptConstraint{ OptConnectorType: enumOpt(SourceKafka), OptConnectorServers: addressOpt, OptConnectorTopic: stringOpt, OptConnectorValue: enumOpt(FormatJson), OptConnectorSql: stringOpt, OptConnectorRel: stringOpt, OptConnectorPartition: integerOpt, OptConnectorBufferLimit: integerOpt, OptConnectorTimeWindow: integerOpt, }
Functions ¶
func KafkaSinkConnectorExecutor ¶
func KafkaSinkConnectorExecutor( logger *zap.Logger, ts taskservice.TaskService, ieFactory func() ie.InternalExecutor, attachToTask func(context.Context, uint64, taskservice.ActiveRoutine) error, ) func(context.Context, task.Task) error
Types ¶
type KafkaMoConnector ¶
type KafkaMoConnector struct {
// contains filtered or unexported fields
}
func NewKafkaMoConnector ¶
func NewKafkaMoConnector(logger *zap.Logger, options map[string]string, ie ie.InternalExecutor, buffer_limit int) (*KafkaMoConnector, error)
func (*KafkaMoConnector) Cancel ¶
func (k *KafkaMoConnector) Cancel() error
Cancel implements the taskservice.ActiveRoutine interface.
func (*KafkaMoConnector) Close ¶
func (k *KafkaMoConnector) Close() error
func (*KafkaMoConnector) Pause ¶
func (k *KafkaMoConnector) Pause() error
Pause implements the taskservice.ActiveRoutine interface.
func (*KafkaMoConnector) Resume ¶
func (k *KafkaMoConnector) Resume() error
Resume implements the taskservice.ActiveRoutine interface.
type OptConstraint ¶
type OptConstraint struct { Type OptType Validator OptValidator }
type OptValidator ¶
type SQLConverter ¶
type SQLConverter struct {
// contains filtered or unexported fields
}
func (*SQLConverter) Convert ¶
func (c *SQLConverter) Convert(ctx context.Context, obj ie.InternalExecResult) (string, error)
Click to show internal directories.
Click to hide internal directories.