tcp

package
v10.340.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Proxy maintains state for proxies connections from listen to backend.

func NewTCPProxy

func NewTCPProxy(
	c collector.EventCollector,
	puID string,
	certificate *tls.Certificate,
	caPool *x509.CertPool,
	agentVersion semver.Version,
	mark int,
) *Proxy

NewTCPProxy creates a new instance of proxy reate a new instance of Proxy

func (*Proxy) InitiatePing

InitiatePing initiates the ping request

func (*Proxy) RunNetworkServer

func (p *Proxy) RunNetworkServer(
	ctx context.Context,
	listener net.Listener,
) error

RunNetworkServer implements enforcer.Enforcer interface

func (*Proxy) ShutDown

func (p *Proxy) ShutDown() error

ShutDown shuts down the server.

func (*Proxy) UpdateSecrets

func (p *Proxy) UpdateSecrets(
	cert *tls.Certificate,
	caPool *x509.CertPool,
	s secrets.Secrets,
	certPEM string,
	keyPEM string,
)

UpdateSecrets updates the secrets of the connections.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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