Documentation
¶
Index ¶
- Variables
- func NewDestination() sdk.Destination
- func NewSource() sdk.Source
- type Config
- type Destination
- type DestinationConfig
- type Position
- type Source
- func (s *Source) Ack(ctx context.Context, position opencdc.Position) error
- func (s *Source) Config() sdk.SourceConfig
- func (s *Source) Open(ctx context.Context, sdkPos opencdc.Position) (err error)
- func (s *Source) Read(ctx context.Context) (opencdc.Record, error)
- func (s *Source) Teardown(ctx context.Context) error
- type SourceConfig
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Connector = sdk.Connector{ NewSpecification: sdk.YAMLSpecification(specs, version), NewSource: NewSource, NewDestination: NewDestination, }
Functions ¶
func NewDestination ¶
func NewDestination() sdk.Destination
Types ¶
type Config ¶
type Config struct {
// The URL of the ActiveMQ Artemis broker.
URL string `json:"url" validate:"required"`
// The username to use when connecting to the broker.
User string `json:"user" validate:"required"`
// The password to use when connecting to the broker.
Password string `json:"password" validate:"required"`
// The name of the STOMP destination.
Destination string `json:"destination" validate:"required"`
// The maximum amount of time between the
// client sending heartbeat notifications from the server.
SendTimeoutHeartbeat time.Duration `json:"sendTimeoutHeartbeat" default:"2s"`
// The minimum amount of time between the client expecting to receive
// heartbeat notifications from the server.
RecvTimeoutHeartbeat time.Duration `json:"recvTimeoutHeartbeat" default:"2s"`
TLS TLSConfig `json:"tls"`
}
type Destination ¶
type Destination struct {
sdk.UnimplementedDestination
// contains filtered or unexported fields
}
func (*Destination) Config ¶
func (d *Destination) Config() sdk.DestinationConfig
type DestinationConfig ¶
type DestinationConfig struct {
Config
sdk.DefaultDestinationMiddleware
// The routing type of the destination. It can be either ANYCAST or
// MULTICAST, with ANYCAST being the default.
// Maps to the "destination-type" header in the STOMP SEND frame.
DestinationType string `json:"destinationType" default:"ANYCAST" validation:"inclusion=ANYCAST|MULTICAST"`
// The "destination" header in the STOMP SEND frame. Useful when using
// ANYCAST.
DestinationHeader string `json:"destinationHeader"`
}
type Position ¶
type Position struct {
MessageID string `json:"message_id"`
Destination string `json:"destination"`
}
func (Position) ToSdkPosition ¶
type Source ¶
type Source struct {
sdk.UnimplementedSource
// contains filtered or unexported fields
}
func (*Source) Config ¶
func (s *Source) Config() sdk.SourceConfig
type SourceConfig ¶
type SourceConfig struct {
Config
sdk.DefaultSourceMiddleware
// The size of the consumer window.
// It maps to the "consumer-window-size" header in the STOMP SUBSCRIBE frame.
ConsumerWindowSize string `json:"consumerWindowSize" default:"-1"`
// The subscription type. It can be either ANYCAST or MULTICAST, with
// ANYCAST being the default.
// Maps to the "subscription-type" header in the STOMP SUBSCRIBE frame.
SubscriptionType string `json:"subscriptionType" default:"ANYCAST" validation:"inclusion=ANYCAST|MULTICAST"`
}
type TLSConfig ¶
type TLSConfig struct {
// Flag to enable or disable TLS.
Enabled bool `json:"enabled" default:"false"`
// The path to the client key file.
ClientKeyPath string `json:"clientKeyPath"`
// The path to the client certificate file.
ClientCertPath string `json:"clientCertPath"`
// The path to the CA certificate file.
CaCertPath string `json:"caCertPath"`
// Flag to disable server certificate verification.
InsecureSkipVerify bool `json:"insecureSkipVerify" default:"false"`
}
Click to show internal directories.
Click to hide internal directories.