httpserver

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPServer

func NewHTTPServer(hostPort string, manager ClientConfigManager, mFactory metrics.Factory) *http.Server

NewHTTPServer creates a new server that hosts an HTTP/JSON endpoint for clients to query for sampling strategies and baggage restrictions.

Types

type ClientConfigManager

type ClientConfigManager interface {
	GetSamplingStrategy(serviceName string) (*sampling.SamplingStrategyResponse, error)
	GetBaggageRestrictions(serviceName string) ([]*baggage.BaggageRestriction, error)
}

ClientConfigManager decides: 1) which sampling strategy a given service should be using 2) which baggage restrictions a given service should be using.

func NewCollectorProxy

func NewCollectorProxy(svc string, channel *tchannel.Channel, mFactory metrics.Factory) ClientConfigManager

NewCollectorProxy implements Manager by proxying the requests to collector.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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