forked from ahamidi/conduit-connector-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdestination.go
42 lines (33 loc) · 813 Bytes
/
destination.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package connector
import (
"context"
sdk "github.com/conduitio/conduit-connector-sdk"
)
type Destination struct {
sdk.UnimplementedDestination
config DestinationConfig
}
func NewDestination() sdk.Destination {
return &Destination{}
}
func (d *Destination) Configure(ctx context.Context, cfg map[string]string) error {
sdk.Logger(ctx).Info().Msg("Configuring a Destination connector...")
config, err := ParseDestinationConfig(cfg)
if err != nil {
return err
}
d.config = config
return nil
}
func (d *Destination) Open(ctx context.Context) error {
return nil
}
func (d *Destination) Write(ctx context.Context, record sdk.Record) error {
return nil
}
func (d *Destination) Flush(context.Context) error {
return nil
}
func (d *Destination) Teardown(ctx context.Context) error {
return nil
}