Documentation ¶
Index ¶
- func WithDirectory(directory string) func(*Client)
- func WithGrpcConn(userConn *grpc.ClientConn) func(*Client)
- func WithLogger(logger zerolog.Logger) func(*Client)
- func WithNoSentry() func(*Client)
- type Client
- func (c *Client) Close(ctx context.Context) error
- func (c *Client) DeleteStale(ctx context.Context, tables schema.Tables, source string, timestamp time.Time) error
- func (c *Client) GetMetrics(ctx context.Context) (*destination.Metrics, error)
- func (c *Client) GetProtocolVersion(ctx context.Context) (uint64, error)
- func (c *Client) Initialize(ctx context.Context, spec specs.Destination) error
- func (c *Client) Migrate(ctx context.Context, tables []*schema.Table) error
- func (c *Client) Name(ctx context.Context) (string, error)
- func (c *Client) Terminate() error
- func (c *Client) Version(ctx context.Context) (string, error)
- func (c *Client) Write(ctx context.Context, source string, syncTime time.Time, ...) (uint64, error)
- func (c *Client) Write2(ctx context.Context, sourceSpec specs.Source, tables schema.Tables, ...) error
- type ClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDirectory ¶
func WithGrpcConn ¶
func WithGrpcConn(userConn *grpc.ClientConn) func(*Client)
func WithLogger ¶
func WithNoSentry ¶
func WithNoSentry() func(*Client)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DeleteStale ¶
func (*Client) GetMetrics ¶
func (*Client) GetProtocolVersion ¶
func (*Client) Initialize ¶
func (*Client) Terminate ¶
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) Write ¶
func (c *Client) Write(ctx context.Context, source string, syncTime time.Time, resources <-chan []byte) (uint64, error)
Write writes rows as they are received from the channel to the destination plugin. resources is marshaled schema.Resource. We are not marshalling this inside the function because usually it is already marshalled from the destination plugin.
type ClientOption ¶
type ClientOption func(*Client)
Click to show internal directories.
Click to hide internal directories.