tls

package
v0.0.0-...-8e6f2e6 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TLSCertKey is the key for tls certificates in a TLS secert.
	TLSCertKey = "tls.crt"
	// TLSPrivateKeyKey is the key for the private key field in a TLS secret.
	TLSPrivateKeyKey = "tls.key"
)

Variables

View Source
var (
	DefaultTransport *http.Transport = &http.Transport{
		Dial: (&net.Dialer{
			Timeout:   5 * time.Second,
			KeepAlive: 20 * time.Second,
		}).Dial,
	}

	// just like https://apollo.com/configfiles/json/apolloId/default
	ApolloUrl = utils.EnvDefault("ApolloUrl", "")
)

Functions

func HttpGet

func HttpGet(ctx context.Context, url string, header map[string]string) (respBody []byte, err error)

func HttpPost

func HttpPost(ctx context.Context, url string, body []byte) (respBody []byte, err error)

Types

type ApplySecret

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

Jump to

Keyboard shortcuts

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