Categorygithub.com/openziti/xweb/v2
modulepackage
2.1.1
Repository: https://github.com/openziti/xweb.git
Documentation: pkg.go.dev

# README

xweb

xweb allows Golang HTTP handlers to be registered with bindings that allow each API to be exposed via YAML configuration. The configuration can expose each API multiple times over different ports, network interfaces, and with the same root identity (x509 certificates) or separate ones. xweb allows Web APIs to be written once and then composed via configuratoin for exposure on publicly reachable network interfaces or not depending on the deployment model desired.

A great use case is development environments where all the APIs would be exposed on a single host/container vs a production environment that would expose each API differently based on sensitivity/security/access.

More to Come!

# Packages

No description provided by the author

# Functions

HandlerFromRequestContext us a utility function to retrieve a ApiHandler reference, that the demux http.Handler deferred to, during downstream http.Handler processing from the http.Request context.
No description provided by the author
NewRegistryMap creates a new RegistryMap.
NewServer creates a new Server from a ServerConfig.
ServerContextFromRequestContext is a utility function to retrieve a *ServerContext reference from the http.Request that provides access to XWeb configuration like BindPointConfig, ServerConfig, and InstanceConfig values.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ReverseTlsVersionMap is a map of TLS version identifiers to configuration strings.
TlsVersionMap is a map of configuration strings to TLS version identifiers.

# Structs

ApiConfig represents some "api" or "site" by binding name.
BindPointConfig represents the interface:port address of where a http.Server should listen for a ServerConfig and the public address that should be used to address it.
No description provided by the author
No description provided by the author
InstanceConfig is the root configuration options necessary to start numerous http.Server instances.
InstanceImpl is a basic implementation of Instance.
IsHandledDemuxFactory is a DemuxFactory that routes http.Request requests to a specific ApiHandler by delegating to the ApiHandler's IsHandled function.
Options is the shared options for a ServerConfig.
PathPrefixDemuxFactory is a DemuxFactory that routes http.Request requests to a specific ApiHandler from a set of ApiHandler's by URL path prefixes.
RegistryMap is a basic Registry implementation backed by a simple mapping of binding (string) to ApiHandlerFactory instances.
Server represents all the http.Server's and http.Handler's necessary to run a single xweb.ServerConfig.
ServerConfig is the configuration that will eventually be used to create a xweb.Server (which in turn houses all the components necessary to run multiple http.Server's).
No description provided by the author
TimeoutOptions represents http timeout options.
TlsVersionOptions represents TLS version options.

# Interfaces

ApiBinding is an interface defines the minimum operations necessary to convert configuration into a ApiHandler by some ApiHandlerFactory.
ApiHandler is an interface that is a http.Handler with options, binding, and information for a specific ApiConfig that was generated from a ApiHandlerFactory.
The ApiHandlerFactory interface generates ApiHandler instances.
No description provided by the author
DefaultHttpHandlerProvider is an interface that allows different levels of xweb's components: Instance, ServerConfig, Server.
DemuxFactory generates a http.Handler that interrogates a http.Request and routes them to ApiHandler instances.
No description provided by the author
Instance implements config.Subconfig to allow Instance implementations to be used during the normal component startup and configuration phase.
Registry describes a registry of binding to ApiHandlerFactory registrations.

# Type aliases

No description provided by the author