bundleServicesClient

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// ServicesClient is the Coordinator Services endpoint Client that is being
	// wrapped.
	s.ServicesClient

	// Starting from the time that the first message is added to a bundle, once
	// this delay has passed, handle the bundle.
	DelayThreshold time.Duration

	// Once a bundle has this many items, handle the bundle. Since only one
	// item at a time is added to a bundle, no bundle will exceed this
	// threshold, so it also serves as a limit.
	BundleCountThreshold int
	// contains filtered or unexported fields
}

Client is a LogDog Coordinator Services endpoint client that intercepts calls that can be batched and buffers them, sending them with the Batch RPC instead of their independent individual RPCs.

The Context and CallOption set for the first intercepted call will be used when making the batch call; all other CallOption sets will be ignored.

Bundling parameters can be controlled by modifying the Bundler prior to invoking it.

func (*Client) ArchiveStream

func (c *Client) ArchiveStream(ctx context.Context, in *s.ArchiveStreamRequest, opts ...grpc.CallOption) (
	*emptypb.Empty, error)

ArchiveStream implements ServicesClient.

func (*Client) Flush

func (c *Client) Flush()

Flush flushes the Bundler. It should be called when terminating to ensure that buffered client requests have been completed.

func (*Client) LoadStream

func (c *Client) LoadStream(ctx context.Context, in *s.LoadStreamRequest, opts ...grpc.CallOption) (
	*s.LoadStreamResponse, error)

LoadStream implements ServicesClient.

func (*Client) RegisterStream

func (c *Client) RegisterStream(ctx context.Context, in *s.RegisterStreamRequest, opts ...grpc.CallOption) (
	*s.RegisterStreamResponse, error)

RegisterStream implements ServicesClient.

func (*Client) TerminateStream

func (c *Client) TerminateStream(ctx context.Context, in *s.TerminateStreamRequest, opts ...grpc.CallOption) (
	*emptypb.Empty, error)

TerminateStream implements ServicesClient.

Jump to

Keyboard shortcuts

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