Documentation ¶
Index ¶
- Variables
- func NewDestination() sdk.Destination
- func NewSource() sdk.Source
- func Specification() sdk.Specification
- type Config
- type Destination
- func (d *Destination) Configure(_ context.Context, cfg map[string]string) error
- func (d *Destination) Open(ctx context.Context) (err error)
- func (d *Destination) Parameters() map[string]sdk.Parameter
- func (d *Destination) Teardown(ctx context.Context) error
- func (d *Destination) Write(ctx context.Context, records []sdk.Record) (int, error)
- type DestinationConfig
- type Position
- type Source
- func (s *Source) Ack(ctx context.Context, position sdk.Position) error
- func (s *Source) Configure(ctx context.Context, cfg map[string]string) error
- func (s *Source) Open(ctx context.Context, pos sdk.Position) (err error)
- func (s *Source) Parameters() map[string]sdk.Parameter
- func (s *Source) Read(ctx context.Context) (sdk.Record, error)
- func (s *Source) Teardown(ctx context.Context) error
- type SourceConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Connector = sdk.Connector{ NewSpecification: Specification, NewSource: NewSource, 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 Config ¶
type Config struct { // URL of the Pulsar instance to connect to. URL string `json:"url" validate:"required"` // Topic specifies the Pulsar topic used by the connector. Topic string `json:"topic" validate:"required"` // ConnectionTimeout specifies the duration for which the client will // attempt to establish a connection before timing out. ConnectionTimeout time.Duration `json:"connectionTimeout"` // OperationTimeout is the duration after which an operation is considered // to have timed out. OperationTimeout time.Duration `json:"operationTimeout"` // MaxConnectionsPerBroker limits the number of connections to each broker. MaxConnectionsPerBroker int `json:"maxConnectionsPerBroker"` // MemoryLimitBytes sets the memory limit for the client in bytes. // If the limit is exceeded, the client may start to block or fail operations. MemoryLimitBytes int64 `json:"memoryLimitBytes"` // EnableTransaction determines if the client should support transactions. EnableTransaction bool `json:"enableTransaction"` // TLSKeyFilePath sets the path to the TLS key file TLSKeyFilePath string `json:"tlsKeyFilePath"` // TLSCertificateFile sets the path to the TLS certificate file TLSCertificateFile string `json:"tlsCertificateFile"` // TLSTrustCertsFilePath sets the path to the trusted TLS certificate file TLSTrustCertsFilePath string `json:"tlsTrustCertsFilePath"` // TLSAllowInsecureConnection configures whether the internal Pulsar client accepts untrusted TLS certificate from broker (default: false) TLSAllowInsecureConnection bool `json:"tlsAllowInsecureConnection"` // TLSValidateHostname configures whether the Pulsar client verifies the validity of the host name from broker (default: false) TLSValidateHostname bool `json:"tlsValidateHostname"` // contains filtered or unexported fields }
type Destination ¶
type Destination struct { sdk.UnimplementedDestination // contains filtered or unexported fields }
func (*Destination) Parameters ¶
func (d *Destination) Parameters() map[string]sdk.Parameter
type DestinationConfig ¶
type DestinationConfig struct {
Config
}
func (DestinationConfig) Parameters ¶
func (DestinationConfig) Parameters() map[string]sdk.Parameter
type Position ¶
type Position struct { MessageID []byte `json:"messageID"` SubscriptionName string `json:"subscriptionName"` }
func (Position) ToSDKPosition ¶
type Source ¶
type Source struct { sdk.UnimplementedSource // contains filtered or unexported fields }
type SourceConfig ¶
type SourceConfig struct { Config // SubscriptionName is the name of the subscription to be used for // consuming messages. SubscriptionName string `json:"subscriptionName"` }
func (SourceConfig) Parameters ¶
func (SourceConfig) Parameters() map[string]sdk.Parameter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.