Documentation ¶
Index ¶
- Constants
- Variables
- func NewDestination() sdk.Destination
- func Specification() sdk.Specification
- type Destination
- func (d *Destination) Configure(ctx context.Context, cfg config.Config) error
- func (d *Destination) Open(ctx context.Context) error
- func (d *Destination) Parameters() config.Parameters
- func (d *Destination) Teardown(context.Context) error
- func (d *Destination) Write(ctx context.Context, records []opencdc.Record) (int, error)
- type DestinationConfig
- type QueryBuilder
Constants ¶
View Source
const ( AuthMechanismBasic = "basic" AuthMechanismNone = "none" )
View Source
const ( DestinationConfigAuthBasicPassword = "auth.basic.password" DestinationConfigAuthBasicUsername = "auth.basic.username" DestinationConfigAuthMechanism = "auth.mechanism" DestinationConfigKeyspace = "keyspace" DestinationConfigNodes = "nodes" DestinationConfigTable = "table" )
Variables ¶
View Source
var Connector = sdk.Connector{ NewSpecification: Specification, NewSource: nil, NewDestination: NewDestination, }
Connector combines all constructors for each plugin in one struct.
Functions ¶
func NewDestination ¶
func NewDestination() sdk.Destination
func Specification ¶
func Specification() sdk.Specification
Specification returns the connector's specification.
Types ¶
type Destination ¶
type Destination struct { sdk.UnimplementedDestination // contains filtered or unexported fields }
func (*Destination) Parameters ¶
func (d *Destination) Parameters() config.Parameters
type DestinationConfig ¶
type DestinationConfig struct { // The keyspace name that has the table (similar to a database in a relational database system). Keyspace string `json:"keyspace" validate:"required"` // The table name. Table string `json:"table" validate:"required"` // Comma separated list of Cassandra nodes' addresses (at least one), ex: 127.0.0.1:9042,127.0.0.2:8080 Nodes []string `json:"nodes" validate:"required"` // Authentication mechanism used by Cassandra. AuthMechanism string `json:"auth.mechanism" validate:"inclusion=none|basic" default:"none"` // Username, only if basic auth is used. AuthUsername string `json:"auth.basic.username"` // Password, only if basic auth is used. AuthPassword string `json:"auth.basic.password"` }
func (DestinationConfig) Parameters ¶
func (DestinationConfig) Parameters() map[string]config.Parameter
type QueryBuilder ¶
type QueryBuilder struct{}
QueryBuilder builds a CQL query statement and its values from a record.
func (*QueryBuilder) BuildDeleteQuery ¶
func (q *QueryBuilder) BuildDeleteQuery(rec opencdc.Record, table string) (string, []interface{})
BuildDeleteQuery takes a record, and returns the delete query statement and values representing that record.
func (*QueryBuilder) BuildInsertQuery ¶
func (q *QueryBuilder) BuildInsertQuery(rec opencdc.Record, table string) (string, []interface{})
BuildInsertQuery takes a record, and returns the insert query statement and values representing that record.
func (*QueryBuilder) BuildUpdateQuery ¶
func (q *QueryBuilder) BuildUpdateQuery(rec opencdc.Record, table string) (string, []interface{})
BuildUpdateQuery takes a record, and returns the update query statement and values representing that record.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.