consistentbackend

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsistentBackendClient

type ConsistentBackendClient struct {
	// contains filtered or unexported fields
}

ConsistentBackendClient is a client which utilizes a dynamic source of backends and a consistent hashring implementation for consistently calling the same backend for the same request.

func NewConsistentBackendClient

func NewConsistentBackendClient(
	resolverConfig *EndpointResolverConfig,
	endpointConfig *EndpointConfig,
	fallback *FallbackEndpointConfig,
) (*ConsistentBackendClient, error)

NewConsistentBackendClient creates an instance of the smart client with the specified configuration.

func (*ConsistentBackendClient) DispatchCheck

func (*ConsistentBackendClient) DispatchExpand

func (*ConsistentBackendClient) DispatchLookup

func (*ConsistentBackendClient) Start

func (cbc *ConsistentBackendClient) Start(ctx context.Context)

Start starts the process which will dynamically update backend membership continually. Stop this service by canceling the context.

type EndpointConfig

type EndpointConfig struct {
	// contains filtered or unexported fields
}

EndpointConfig contains configuration for establishing connections with a specific backend service.

func NewEndpointConfig

func NewEndpointConfig(serviceName, dnsName, token, caCertPath string) *EndpointConfig

NewEndpointConfig configures TLS protected backend connections.

func NewEndpointConfigNoTLS

func NewEndpointConfigNoTLS(serviceName, dnsName, token string) *EndpointConfig

NewEndpointConfigNoTLS configures plaintext backend connections.

type EndpointResolverConfig

type EndpointResolverConfig struct {
	// contains filtered or unexported fields
}

EndpointResolverConfig contains configuration for establishing a connection to a dynamic endpoint resolver service.

func NewEndpointResolver

func NewEndpointResolver(resolverEndpoint, caCertPath string) *EndpointResolverConfig

NewEndpointResolver configures a TLS protected endpoint resolver connection.

func NewEndpointResolverNoTLS

func NewEndpointResolverNoTLS(resolverEndpoint string) *EndpointResolverConfig

NewEndpointResolverNoTLS configures a plaintext endpoint resolver connection.

type FallbackEndpointConfig

type FallbackEndpointConfig struct {
	// contains filtered or unexported fields
}

FallbackEndpointConfig contains configuration for a static fallback endpoint to be used when no resolved endpoints are available.

func NewFallbackEndpoint

func NewFallbackEndpoint(endpoint, token, caCertPath string) *FallbackEndpointConfig

NewFallbackEndpoint configures a TLS protected fallback endpoint connection.

func NewFallbackEndpointNoTLS

func NewFallbackEndpointNoTLS(endpoint, token string) *FallbackEndpointConfig

NewFallbackEndpointNoTLS configures a plaintext fallback endpoint connection.

func NoFallbackEndpoint

func NoFallbackEndpoint() *FallbackEndpointConfig

NoFallbackEndpoint disables the fallback backend option.

Jump to

Keyboard shortcuts

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