Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// CloseConn closes the gRPC client connection.
CloseConn(ctx context.Context) error
// IsReady checks if the udsource connection is ready.
IsReady(ctx context.Context, in *emptypb.Empty) (bool, error)
// ReadFn reads messages from the udsource.
ReadFn(ctx context.Context, req *sourcepb.ReadRequest, datumCh chan<- *sourcepb.ReadResponse) error
// AckFn acknowledges messages from the udsource.
AckFn(ctx context.Context, req *sourcepb.AckRequest) (*sourcepb.AckResponse, error)
// PendingFn returns the number of pending messages from the udsource.
PendingFn(ctx context.Context, req *emptypb.Empty) (*sourcepb.PendingResponse, error)
// PartitionsFn returns the list of partitions from the udsource.
PartitionsFn(ctx context.Context, req *emptypb.Empty) (*sourcepb.PartitionsResponse, error)
}
Client contains methods to call a gRPC client.
func New ¶
func New(ctx context.Context, serverInfo *serverinfo.ServerInfo, inputOptions ...sdkclient.Option) (Client, error)
func NewFromClient ¶
func NewFromClient(ctx context.Context, srcClient sourcepb.SourceClient, inputOptions ...sdkclient.Option) (Client, error)
NewFromClient creates a new client object from the grpc client. This is used for testing.
Click to show internal directories.
Click to hide internal directories.