httprcv

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receiver

type Receiver struct {
	Name        string
	Host        string
	Ports       []int
	TLSPorts    []int
	TLSCertPath string
	TLSKeyPath  string
	IPHeader    string
	Storage     app.Storage
}

Receiver represents the HTTP protocol receiver.

func (*Receiver) Addr

func (r *Receiver) Addr(port int) string

Addr returns an address in the format expected by http.Server.

func (*Receiver) ListenAndServe

func (r *Receiver) ListenAndServe(err chan error)

ListenAndServe sets the necessary conditions for the underlying http.Server to serve the HTTP and/or the HTTPS server for each configured port.

Any errors are returned via the received channel.

Jump to

Keyboard shortcuts

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