Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 10.0% on proxy.golang.org
Top 1.9% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org

proxy.golang.org : github.com/openziti/xweb

Package xweb provides facilities to creating composable xweb.WebHandlers and http.Server's from configuration files. xweb provides customizable and extendable components to stand up multiple http.Server's listening on one or more network interfaces and ports. Each xweb.Xweb is responsible for defining configuration sections to be parsed, parsing the configuration, starting servers, and shutting down relevant server. An example implementation is included in the package: xweb.XwebImpl. This implementation should cover most use cases. In addition xweb.XwebImpl makes use of xweb.Config which is reusable component for parsing xweb.XwebImpl configuration sections. Both xweb.Xweb and xweb.Config assume that configuration will be acquired from some source and be presented as a map of interface{}-to-interface{} values. xweb.Config configuration sections allow the definition of an array of xweb.WebListener. In turn each xweb.WebListener can listen on many interface/port combinations specified by an array of xweb.BindPoint's and host many http.Handler's by defining an array of xweb.API's that are converted into xweb.WebHandler's. xweb.WebHandler's are http.Handler's with meta data and can be as complex or as simple as necessary - using other libraries or only the standard http Go capabilities. To deal with a single xweb.WebListener hosting multiple APIs as web.WebListener's, incoming requests must be forwarded to the correct xweb.WebHandler. The responsibility is handled by another configurable http.Handler called an "xweb demux handler". This handler's responsibility is to inspect incoming requests and forward them to the correct xweb.WebHandler. It is specified by an xweb.DemuxFactory and a reference implementation, xweb.PathPrefixDemuxFactory has been provided. Another way to say it: each Xweb defines a configuration section (default `web`) to define WebListener's and their hosted APIs. Each WebListener maps to one http.Server per BindPoint. No two WebListeners can have colliding BindPoint's due to port conflicts.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/openziti/xweb
Keywords: go, golang, http-server, webapi, webserver
License: Apache-2.0
Latest release: about 2 years ago
First release: about 2 years ago
Namespace: github.com/openziti
Dependent packages: 8
Dependent repositories: 1
Stars: 3 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 29 days ago

    Loading...
    Readme
    Loading...