httpserver

package
v1.0.48 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: Apache-2.0 Imports: 16 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

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

Create a new logger task with provider of other tasks

Types

type Plugin

type Plugin struct {
	task.Plugin
	Router_  types.Task     `json:"router,omitempty"` // The router object which serves the gateways
	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
	Timeout_ types.Duration `hcl:"timeout,optional"`  // Read timeout on HTTP requests
	// contains filtered or unexported fields
}

func (Plugin) Listen

func (p Plugin) Listen() string

func (Plugin) Name

func (p Plugin) Name() string

func (Plugin) New

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) Router

func (p Plugin) Router(ctx context.Context, provider iface.Provider) plugin.Router

func (Plugin) TLS

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

func (Plugin) Timeout

func (p Plugin) Timeout() time.Duration

type TLS

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.

Jump to

Keyboard shortcuts

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