matching

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 14 Imported by: 11 modules, 10 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultTimeout is the default timeout used to make calls
	DefaultTimeout = time.Minute
	// DefaultLongPollTimeout is the long poll default timeout used to make calls
	DefaultLongPollTimeout = time.Minute * 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	matchingserviceclient.Interface
}

Client is the interface exposed by matching service client

func NewClient

func NewClient(
	timeout time.Duration,
	longPollTimeout time.Duration,
	clients common.ClientCache,
	lb LoadBalancer,
) Client

NewClient creates a new history service TChannel client

func NewMetricClient

func NewMetricClient(client Client, metricsClient metrics.Client) Client

NewMetricClient creates a new instance of Client that emits metrics

func NewRetryableClient added in v0.3.14

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

NewRetryableClient creates a new instance of Client with retry policy

type LoadBalancer added in v0.7.0

type LoadBalancer interface {
	// PickWritePartition returns the task list partition for adding
	// an activity or decision task. The input is the name of the
	// original task list (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(
		domainID string,
		taskList shared.TaskList,
		taskListType int,
		forwardedFrom string,
	) string

	// PickReadPartition returns the task list partition to send a poller to.
	// Input is name of the original task list as specified by caller. When
	// forwardedFrom is non-empty, no load balancing should be done.
	PickReadPartition(
		domainID string,
		taskList shared.TaskList,
		taskListType int,
		forwardedFrom string,
	) string
}

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

func NewLoadBalancer added in v0.7.0

func NewLoadBalancer(
	domainIDToName func(string) (string, error),
	dc *dynamicconfig.Collection,
) LoadBalancer

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

Jump to

Keyboard shortcuts

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