matching

package
v1.25.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultTimeout is the max timeout for regular calls
	DefaultTimeout = time.Minute * debug.TimeoutMultiplier
	// DefaultLongPollTimeout is the max timeout for long poll calls
	DefaultLongPollTimeout = time.Minute * 5 * debug.TimeoutMultiplier
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(
	timeout time.Duration,
	longPollTimeout time.Duration,
	clients common.ClientCache,
	metricsHandler metrics.Handler,
	logger log.Logger,
	lb LoadBalancer,
) matchingservice.MatchingServiceClient

NewClient creates a new history service gRPC client

func NewMetricClient

func NewMetricClient(
	client matchingservice.MatchingServiceClient,
	metricsHandler metrics.Handler,
	logger log.Logger,
	throttledLogger log.Logger,
) matchingservice.MatchingServiceClient

NewMetricClient creates a new instance of matchingservice.MatchingServiceClient that emits metrics

func NewRetryableClient added in v0.3.14

func NewRetryableClient(client matchingservice.MatchingServiceClient, policy backoff.RetryPolicy, isRetryable backoff.IsRetryable) matchingservice.MatchingServiceClient

NewRetryableClient creates a new instance of matchingservice.MatchingServiceClient with retry policy

Types

type LoadBalancer added in v0.7.0

type LoadBalancer interface {
	// PickWritePartition returns the task queue partition for adding
	// an activity or workflow task. The input is the name of the
	// original task queue (with no partition info). When forwardedFrom
	// is non-empty, this call is forwardedFrom from a child partition
	// to a parent partition in which case, no load balancing should be
	// performed
	PickWritePartition(
		taskQueue *tqid.TaskQueue,
	) *tqid.NormalPartition

	// PickReadPartition returns the task queue partition to send a poller to.
	// Input is name of the original task queue as specified by caller. When
	// forwardedFrom is non-empty, no load balancing should be done.
	PickReadPartition(
		taskQueue *tqid.TaskQueue,
	) *pollToken
}

LoadBalancer is the interface for implementers of component that distributes add/poll api calls across available task queue partitions when possible

func NewLoadBalancer added in v0.7.0

func NewLoadBalancer(
	namespaceIDToName func(id namespace.ID) (namespace.Name, error),
	dc *dynamicconfig.Collection,
) LoadBalancer

NewLoadBalancer returns an instance of matching load balancer that can help distribute api calls across task queue partitions

Jump to

Keyboard shortcuts

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