source

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDirectory

func WithDirectory(directory string) func(*Client)

func WithGRPCConnection

func WithGRPCConnection(userConn *grpc.ClientConn) func(*Client)

func WithLogger

func WithLogger(logger zerolog.Logger) func(*Client)

func WithNoSentry

func WithNoSentry() func(*Client)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client

func NewClient

func NewClient(ctx context.Context, registrySpec specs.Registry, path string, version string, opts ...ClientOption) (*Client, error)

NewClient connect to gRPC server running source plugin and returns a new Client

func (*Client) GetDynamicTables

func (c *Client) GetDynamicTables(ctx context.Context) (schema.Tables, error)

func (*Client) GetMetrics

func (c *Client) GetMetrics(ctx context.Context) (*source.Metrics, error)

func (*Client) GetTables

func (c *Client) GetTables(ctx context.Context) ([]*schema.Table, error)

func (*Client) Init

func (c *Client) Init(ctx context.Context, spec specs.Source) error

func (*Client) Name

func (c *Client) Name(ctx context.Context) (string, error)

func (*Client) Sync

func (c *Client) Sync(ctx context.Context, res chan<- []byte) error

Sync start syncing for the source client per the given spec and returning the results in the given channel. res is marshaled schema.Resource. We are not unmarshalling this for performance reasons as usually this is sent over-the-wire anyway to a source plugin

func (*Client) Terminate

func (c *Client) Terminate() error

Terminate is used only in conjunction with NewManagedClient. It closes the connection it created, kills the spawned process and removes the socket file.

func (*Client) Version

func (c *Client) Version(ctx context.Context) (string, error)

type ClientOption

type ClientOption func(*Client)

type FetchResultMessage

type FetchResultMessage struct {
	Resource []byte
}

Jump to

Keyboard shortcuts

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