Documentation
¶
Index ¶
- func ListenAndServeContext(ctx context.Context, listen string, tls *tls.Config, handler http.Handler) error
- func ListenAndServeContextGRPCAndHTTP(ctx context.Context, listen string, tls *tls.Config, httphandler http.Handler, ...) error
- func ListenAndServeGRPCContext(ctx context.Context, listen string, grpcServer *grpc.Server) error
- type Options
- type TLS
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)
Click to show internal directories.
Click to hide internal directories.