proxy

package
v5.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package proxy implements proxy service and controllers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(logger logging.LoggerInterface, cfg *pconf.Main) error

Start initialize in proxy mode

Types

type API

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

API bundles all components required to answer API calls from split sdks

func New

func New(options *Options) *API

New instantiates a new Server

func (*API) Start

func (s *API) Start() error

Start the Proxy service endpoints

type Options

type Options struct {
	// Logger to propagate everywhere
	Logger logging.LoggerInterface

	// Host to where incoming http connections will be listened
	Host string

	// HTTP port to use for the server
	Port int

	// APIKeys used for authenticating proxy requests
	APIKeys []string

	// ImpressionListener to forward incoming impression bulks to
	ImpressionListener impressionlistener.ImpressionBulkListener

	// Whether to do verbose logging in the gin framework
	DebugOn bool

	// used for on-demand splitchanges fetching when a requested summary is not cached
	SplitFetcher service.SplitFetcher

	// used to resolve splitChanges requests
	ProxySplitStorage storage.ProxySplitStorage

	// used to resolve segmentChanges & mySegments requests
	ProxySegmentStorage storage.ProxySegmentStorage

	// what to do with received impression bulk payloads
	ImpressionsSink tasks.DeferredRecordingTask

	// what to do with received impression count payloads
	ImpressionCountSink tasks.DeferredRecordingTask

	// what to do with received event bulk payloads
	EventsSink tasks.DeferredRecordingTask

	// what to do with incoming telemetry.config payloads
	TelemetryConfigSink tasks.DeferredRecordingTask

	// what to do with incoming telemetry.runtime payloads
	TelemetryUsageSink tasks.DeferredRecordingTask

	// used to record local metrics
	Telemetry proxyStorage.ProxyEndpointTelemetry

	Cache *gincache.Middleware
}

Options struct to set options for Proxy mode.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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