factory

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyFactory

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

ProxyFactory is a factory to create reverse proxies

func NewProxyFactory

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

NewProxyFactory returns a pointer to a new instance of a ProxyFactory

func (*ProxyFactory) NewAgentProxy

func (factory *ProxyFactory) NewAgentProxy(endpoint *portainer.Endpoint) (*ProxyServer, error)

NewAgentProxy creates a new instance of ProxyServer that wrap http requests with agent headers

func (*ProxyFactory) NewEndpointProxy

func (factory *ProxyFactory) NewEndpointProxy(endpoint *portainer.Endpoint) (http.Handler, error)

NewEndpointProxy returns a new reverse proxy (filesystem based or HTTP) to an environment(endpoint) API server

func (*ProxyFactory) NewGitlabProxy

func (factory *ProxyFactory) NewGitlabProxy(gitlabAPIUri string) (http.Handler, error)

NewGitlabProxy returns a new HTTP proxy to a Gitlab API server

type ProxyServer

type ProxyServer struct {
	Port int
	// contains filtered or unexported fields
}

ProxyServer provide an extended proxy with a local server to forward requests

func (*ProxyServer) Close

func (proxy *ProxyServer) Close()

Close shuts down the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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