pep

package
v0.0.0-...-c1db8db Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPTransportForSchemeAndTLS

func GetHTTPTransportForSchemeAndTLS(scheme string, servicesTLS *tls.Config) (*http.Transport, error)

GetHTTPTransportForSchemeAndTLS returns an HTTP transport based on the provided scheme and TLS configuration. Parameters:

  • scheme: The URI scheme ("http" or "https").
  • servicesTLS: A pointer to the TLS configuration for services.

Returns:

  • *http.Transport: An HTTP transport configured based on the scheme and TLS settings.
  • error: An error if the scheme is unsupported.

Types

type PEP

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

Policy Enforcement Point (PEP) struct defining the main HTTP handler for the frontend HTTP server

func NewPEP

func NewPEP(config *configs.Config, dataPlaneLogger *log.Logger) (*PEP, error)

NewPEP creates a new Policy Enforcement Point (PEP) instance using the provided configuration and logger. It initializes services based on the configuration and returns the PEP instance. Parameters:

  • config: A pointer to the configuration struct holding PEP settings and service configurations.
  • dataPlaneLogger: A pointer to the logger instance for data plane logging.

Returns:

  • *PEP: A pointer to the created PEP instance.
  • error: An error if any occurred during initialization.

func (*PEP) ServeHTTP

func (pep *PEP) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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