goVirtualHost

package
v1.19.0-go1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT, MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CertKeyFileCountNotMatch = errors.New("certificate file count and key file count not match")
View Source
var CertificateNotFound = errors.New("certificate not found for TLS listens")
View Source
var ConflictIPAddress = errors.New("conflict IP address")
View Source
var ConflictTLSMode = errors.New("cannot serve for both Plain and TLS mode")
View Source
var DuplicatedAddressHostname = errors.New("duplicated address and hostname")
View Source
var MissingCertFile = errors.New("missing certificate file")
View Source
var MissingCertFileAndKeyFile = errors.New("missing certificate file and key file")
View Source
var MissingKeyFile = errors.New("missing key file")

Functions

func CertsKeysToPairs added in v1.19.0

func CertsKeysToPairs(certFiles, keyFiles []string) (certKeyFilePairs [][2]string, errs []error)

func LoadCertificate added in v1.4.0

func LoadCertificate(certFile, keyFile string) (cert *tls.Certificate, err error)

func LoadCertificates added in v1.13.6

func LoadCertificates(certFiles, keyFiles []string) (certs []*tls.Certificate, errs []error)

func LoadCertificatesFromPairs added in v1.19.0

func LoadCertificatesFromPairs(certKeyFilePairs [][2]string) (certs []*tls.Certificate, errs []error)

Types

type HostInfo

type HostInfo struct {
	Listens      []string
	ListensPlain []string
	ListensTLS   []string
	CertKeyPaths [][2]string // []{ {certFile, keyFile}, ... }
	Certs        []*tls.Certificate
	HostNames    []string
	Handler      http.Handler
}

init host info

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService() *Service

func (*Service) Add

func (svc *Service) Add(info *HostInfo) (errs, warns []error)

func (*Service) Close

func (svc *Service) Close()

func (*Service) GetAccessibleURLs added in v1.13.0

func (svc *Service) GetAccessibleURLs(includeLoopback bool) [][]string

func (*Service) Open

func (svc *Service) Open() (errs []error)

func (*Service) ReloadCertificates added in v1.19.0

func (svc *Service) ReloadCertificates() (errs []error)

func (*Service) Shutdown added in v1.15.3

func (svc *Service) Shutdown(ctx context.Context)

Jump to

Keyboard shortcuts

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