destination

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDestination

func NewDestination() sdk.Destination

NewDestination returns an instance of sdk.Destination

Types

type Destination

type Destination struct {
	sdk.UnimplementedDestination
	// contains filtered or unexported fields
}

func (*Destination) Configure

func (d *Destination) Configure(ctx context.Context, cfg map[string]string) error

Configure sets up the destination by validating and parsing the config

func (*Destination) Open

func (d *Destination) Open(ctx context.Context) error

Open creates a connection to redis and validates the type to key using Type <key> command

func (*Destination) Parameters

func (d *Destination) Parameters() map[string]sdk.Parameter

Parameters returns a map of named Parameters that describe how to configure the Source.

func (*Destination) Teardown

func (d *Destination) Teardown(_ context.Context) error

Teardown is called by conduit server to stop the destination connector the graceful shutdown is performed in this function

func (*Destination) Write

func (d *Destination) Write(ctx context.Context, rec []sdk.Record) (int, error)

Write receives the record to be written and based on the mode either publishes to PUB/SUB channel or add as key-value pair to stream using XADD, the id of the newly added key is generated automatically

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL