httpserver

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

The `httpserver` task implements a server which can serve requests over HTTP, HTTPS and FCGI

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWithPlugin added in v1.0.48

func NewWithPlugin(p Plugin) (*httpserver, error)

Create a new logger task with provider of other tasks

Types

type Plugin added in v1.0.48

type Plugin struct {
	task.Plugin
	Listen_  types.String   `json:"listen,omitempty"`  // Address or path for binding HTTP server
	TLS_     *TLS           `json:"tls,omitempty"`     // TLS parameters, or nil if not using TLS (ignored for file sockets)
	Timeout_ types.Duration `json:"timeout,omitempty"` // Read timeout on HTTP requests (ignored for file sockets)
	Owner_   types.String   `json:"owner,omitempty"`   // Owner of the socket file (ignored for network sockets)
	Group_   types.String   `json:"group,omitempty"`   // Owner Group of the socket file (ignored for network sockets)
	Router_  types.Task     `json:"router,omitempty"`  // The router object which serves the gateways, optional.
}

func WithLabel added in v1.1.3

func WithLabel(label string) Plugin

func (Plugin) Group added in v1.1.1

func (p Plugin) Group() (int, error)

func (Plugin) Listen added in v1.0.48

func (p Plugin) Listen() string

func (Plugin) Mode added in v1.1.1

func (p Plugin) Mode() os.FileMode

func (Plugin) Name added in v1.0.48

func (p Plugin) Name() string

func (Plugin) New added in v1.0.48

func (p Plugin) New(ctx context.Context, provider iface.Provider) (iface.Task, error)

Create a new logger task with provider of other tasks

func (Plugin) Owner added in v1.1.1

func (p Plugin) Owner() (int, error)

func (Plugin) Router added in v1.0.48

func (p Plugin) Router() plugin.Router

func (Plugin) TLS added in v1.0.48

func (p Plugin) TLS() (*tls.Config, error)

func (Plugin) Timeout added in v1.0.48

func (p Plugin) Timeout() time.Duration

func (Plugin) WithListen added in v1.1.3

func (p Plugin) WithListen(listen string) Plugin

type TLS added in v1.0.48

type TLS struct {
	Key_  types.String `json:"key"`  // Path to TLS Private Key
	Cert_ types.String `json:"cert"` // Path to TLS Certificate
}

Directories

Path Synopsis
Package fcgi implements the FastCGI protocol.
Package fcgi implements the FastCGI protocol.
router package implements a http.Handler and the ability to register routes on a gateway
router package implements a http.Handler and the ability to register routes on a gateway
static package implements a http.Handler for serving static files
static package implements a http.Handler for serving static files
tokenauth package implements authentication tokens for HTTP servers
tokenauth package implements authentication tokens for HTTP servers
The `util` package provides utility methods for decoding request parameters and bodies, and providing responses over HTTP
The `util` package provides utility methods for decoding request parameters and bodies, and providing responses over HTTP

Jump to

Keyboard shortcuts

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