connhelpers

package
v0.0.0-...-2f06839 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: Apache-2.0 Imports: 2 Imported by: 57

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TlsConfigForServerCerts

func TlsConfigForServerCerts(certFile string, keyFile string) (*tls.Config, error)

TlsConfigForServerCerts is a returns a simple `tls.Config` with the given server cert loaded. This is useful if you can't use `http.ListenAndServerTLS` when using a custom `net.Listener`.

func TlsConfigWithHttp2Enabled

func TlsConfigWithHttp2Enabled(config *tls.Config) (*tls.Config, error)

TlsConfigWithHttp2Enabled makes it easy to configure the given `tls.Config` to prefer H2 connections. This is useful if you can't use `http.ListenAndServerTLS` when using a custom `net.Listener`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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