proxymanager

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2024 Paulo Almeida <almeidapaulopt@gmail.com> SPDX-License-Identifier: MIT

SPDX-FileCopyrightText: 2024 Paulo Almeida <almeidapaulopt@gmail.com> SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	Config *proxyconfig.Config
	URL    *url.URL
	// contains filtered or unexported fields
}

Proxy struct is a struct that contains all the information needed to run a proxy.

func NewProxy added in v1.4.0

func NewProxy(log zerolog.Logger,
	pcfg *proxyconfig.Config,
	proxyProvider proxyproviders.Provider,
	targetprovider targetproviders.TargetProvider,
) (*Proxy, error)

NewProxy function is a function that creates a new proxy.

func (*Proxy) Close added in v1.4.0

func (proxy *Proxy) Close()

Close method is a method that initiate proxy close procedure.

func (*Proxy) GetAuthURL added in v1.4.0

func (proxy *Proxy) GetAuthURL() string

func (*Proxy) GetState added in v1.4.0

func (proxy *Proxy) GetState() proxyconfig.ProxyState

func (*Proxy) GetURL added in v1.4.0

func (proxy *Proxy) GetURL() string

func (*Proxy) Start added in v1.4.0

func (proxy *Proxy) Start()

type ProxyList added in v0.4.0

type ProxyList map[string]*Proxy

type ProxyManager

type ProxyManager struct {
	Proxies ProxyList

	TargetProviders TargetProviderList
	ProxyProviders  ProxyProviderList
	// contains filtered or unexported fields
}

ProxyManager struct stores data that is required to manage all proxies

func NewProxyManager

func NewProxyManager(logger zerolog.Logger) *ProxyManager

NewProxyManager function creates a new ProxyManager.

func (*ProxyManager) HandleContainerEvent

func (pm *ProxyManager) HandleContainerEvent(event targetproviders.TargetEvent)

HandleContainerEvent method handles events from a targetprovider

func (*ProxyManager) Start added in v1.0.0

func (pm *ProxyManager) Start()

Start method starts the ProxyManager.

func (*ProxyManager) StopAllProxies added in v1.0.0

func (pm *ProxyManager) StopAllProxies()

StopAllProxies method shuts down all proxies.

func (*ProxyManager) WatchEvents added in v1.0.0

func (pm *ProxyManager) WatchEvents()

WatchEvents method watches for events from all target providers.

type ProxyProviderList added in v1.0.0

type ProxyProviderList map[string]proxyproviders.Provider

type TargetProviderList added in v1.0.0

type TargetProviderList map[string]targetproviders.TargetProvider

Jump to

Keyboard shortcuts

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