proxy

package
v0.0.0-...-4560a53 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Zlib Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager represents a service used to manage proxies to environments (endpoints) and extensions.

func NewManager

func NewManager(dataStore dataservices.DataStore, signatureService portainer.DigitalSignatureService, tunnelService portainer.ReverseTunnelService, clientFactory *dockerclient.ClientFactory, kubernetesClientFactory *cli.ClientFactory, kubernetesTokenCacheManager *kubernetes.TokenCacheManager, gitService portainer.GitService) *Manager

NewManager initializes a new proxy Service

func (*Manager) CreateAgentProxyServer

func (manager *Manager) CreateAgentProxyServer(endpoint *portainer.Endpoint) (*factory.ProxyServer, error)

CreateAgentProxyServer creates a new HTTP reverse proxy based on environment(endpoint) properties and and adds it to the registered proxies. It can also be used to create a new HTTP reverse proxy and replace an already registered proxy.

func (*Manager) CreateAndRegisterEndpointProxy

func (manager *Manager) CreateAndRegisterEndpointProxy(endpoint *portainer.Endpoint) (http.Handler, error)

CreateAndRegisterEndpointProxy creates a new HTTP reverse proxy based on environment(endpoint) properties and and adds it to the registered proxies. It can also be used to create a new HTTP reverse proxy and replace an already registered proxy.

func (*Manager) CreateGitlabProxy

func (manager *Manager) CreateGitlabProxy(url string) (http.Handler, error)

CreateGitlabProxy creates a new HTTP reverse proxy that can be used to send requests to the Gitlab API

func (*Manager) DeleteEndpointProxy

func (manager *Manager) DeleteEndpointProxy(endpointID portainer.EndpointID)

DeleteEndpointProxy deletes the proxy associated to a key and cleans the k8s environment(endpoint) client cache. DeleteEndpointProxy is currently only called for edge connection clean up and when endpoint is updated

func (*Manager) GetEndpointProxy

func (manager *Manager) GetEndpointProxy(endpoint *portainer.Endpoint) http.Handler

GetEndpointProxy returns the proxy associated to a key

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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