Documentation ¶
Index ¶
- Variables
- func AttachPositionIndex(p sdk.Position, index uint32) sdk.Position
- func NewSource() sdk.Source
- func NewSourceWithListener(lis net.Listener) sdk.Source
- func Specification() sdk.Specification
- type Config
- type MTLSConfig
- type Position
- type Queue
- 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, _ sdk.Position) 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: nil, }
Connector combines all constructors for each plugin in one struct.
Functions ¶
func NewSourceWithListener ¶
NewSourceWithListener for testing purposes.
func Specification ¶
func Specification() sdk.Specification
Specification returns the connector's specification.
Types ¶
type Config ¶
type Config struct { // url to gRPC server URL string `json:"url" validate:"required"` // mTLS configurations. MTLS MTLSConfig `json:"mtls"` }
Config has the generic parameters needed for a gRPC server
type MTLSConfig ¶
type MTLSConfig struct { // the server certificate path. ServerCertPath string `json:"server.certPath"` // the server private key path. ServerKeyPath string `json:"server.keyPath"` // the root CA certificate path. CACertPath string `json:"ca.certPath"` // option to disable mTLS secure connection, set it to `true` for an insecure connection. Disabled bool `json:"disabled" default:"false"` }
func (*MTLSConfig) ParseMTLSFiles ¶
func (mc *MTLSConfig) ParseMTLSFiles() (tls.Certificate, *x509.CertPool, error)
ParseMTLSFiles parses and validates mTLS params values, returns the parsed server certificate, and CA certificate pool, and an error if the parsing fails
type Position ¶
func ToRecordPosition ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue represents a simple FIFO queue
type Source ¶
type Source struct { sdk.UnimplementedSource // contains filtered or unexported fields }
type SourceConfig ¶
type SourceConfig struct {
Config
}
func (SourceConfig) Parameters ¶
func (SourceConfig) Parameters() map[string]sdk.Parameter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.