server

package
v0.0.0-...-5fa5d10 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CERT_FILE               string = "CERT_FILE"
	KEY_FILE                string = "KEY_FILE"
	HTTPS_ENABLED           string = "HTTPS_ENABLED"
	HTTP_ADDRESS            string = "HTTP_ADDRESS"
	HTTP_PORT               string = "HTTP_PORT"
	READ_TIMEOUT            string = "READ_TIMEOUT"
	WRITE_TIMEOUT           string = "WRITE_TIMEOUT"
	CERTIFICATE_SERVER_NAME string = "CERTIFICATE_SERVER_NAME"
	CLIENT_AUTH_TYPE        string = "CLIENT_AUTH_TYPE"
	CA_CERTIFICATE          string = "CA_CERTIFICATE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	CertFile              string
	KeyFile               string
	Address               string
	Port                  string
	CertificateServerName string
	HttpsEnabled          bool
	ReadTimeout           time.Duration
	WriteTimeout          time.Duration
	ClientAuthType        string
	CaCertificate         string
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) FromEnvs

func (c *Configuration) FromEnvs(envs map[string]string)

type Server

type Server struct {
	sync.WaitGroup
	sync.RWMutex
	*http.Server
}

func New

func New() *Server

func (*Server) Configure

func (s *Server) Configure(c *Configuration) error

Jump to

Keyboard shortcuts

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