relay

package
v6.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package relay contains the basic implementation of the Relay application. Currently, this is simply a thin wrapper around the core code. In the future, it may contain additional logic that is not included in the Enterprise application (for instance, an endpoint handler that is replaced by a different handler in Enterprise).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactoryFunc

type ClientFactoryFunc func(sdkKey config.SDKKey, config ld.Config) (*ld.LDClient, error)

ClientFactoryFunc is a function that can be used with NewRelay to specify custom behavior when Relay needs to create a Go SDK client instance.

type Relay

type Relay struct {
	http.Handler
	// contains filtered or unexported fields
}

Relay relays endpoints to and from the LaunchDarkly service

func NewRelay

func NewRelay(c config.Config, loggers ldlog.Loggers, clientFactory ClientFactoryFunc) (*Relay, error)

NewRelay creates a new Relay given a configuration and a method to create a client.

If any metrics exporters are enabled in c.MetricsConfig, it also registers those in OpenCensus.

The clientFactory parameter can be nil and is only needed if you want to customize how Relay creates the Go SDK client instance.

func (*Relay) Close

func (r *Relay) Close() error

Close shuts down components created by the Relay Proxy.

This includes dropping all connections to the LaunchDarkly services and to SDK clients, closing database connections if any, and stopping all Relay port listeners, goroutines, and OpenCensus exporters.

Directories

Path Synopsis
Package version exists only to hold the current version string for Relay, which is updated by the release script.
Package version exists only to hold the current version string for Relay, which is updated by the release script.

Jump to

Keyboard shortcuts

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