system

package
v1.24.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServeContext added in v1.23.0

func ListenAndServeContext(ctx context.Context, listen string, tls *tls.Config, handler http.Handler) error

func ListenAndServeContextGRPCAndHTTP added in v1.23.0

func ListenAndServeContextGRPCAndHTTP(ctx context.Context, listen string, tls *tls.Config, httphandler http.Handler, grpchandler http.Handler) error

func ListenAndServeGRPCContext added in v1.23.0

func ListenAndServeGRPCContext(ctx context.Context, listen string, grpcServer *grpc.Server) error

Types

type Options

type Options struct {
	Listen   string `json:"listen,omitempty" description:"listen address"`
	Locale   string `json:"locale,omitempty" description:"default locale for site"`
	CAFile   string `json:"caFile,omitempty" description:"ca file path"`
	CertFile string `json:"certFile,omitempty" description:"cert file path"`
	KeyFile  string `json:"keyFile,omitempty" description:"key file path"`
}

func NewDefaultOptions

func NewDefaultOptions() *Options

func (*Options) IsTLSConfigEnabled

func (o *Options) IsTLSConfigEnabled() bool

func (*Options) TLSConfigOrNull added in v1.23.0

func (o *Options) TLSConfigOrNull() *tls.Config

func (*Options) ToTLSConfig

func (o *Options) ToTLSConfig() (*tls.Config, error)

type TLS added in v1.23.8

type TLS struct {
	CertFile           string `json:"certFile,omitempty"`
	KeyFile            string `json:"keyFile,omitempty"`
	CAFile             string `json:"caFile,omitempty"`
	ClientAuth         bool   `json:"clientAuth,omitempty"`
	InsecureSkipVerify bool   `json:"insecureSkipVerify,omitempty"`
}

func NewDefaultTLS added in v1.23.8

func NewDefaultTLS() *TLS

func (TLS) ToTLSConfig added in v1.23.8

func (o TLS) ToTLSConfig() (*tls.Config, error)

Jump to

Keyboard shortcuts

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