utils

package
v1.49.0-cluster Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TLSConfig

func TLSConfig(certFile, keyFile, CAFile, serverName string, insecureSkipVerify bool) (*tls.Config, error)

TLSConfig creates tls.Config object from provided arguments

func Transport

func Transport(URL, certFile, keyFile, CAFile, serverName string, insecureSkipVerify bool) (*http.Transport, error)

Transport creates http.Transport object based on provided URL. Returns Transport with TLS configuration if URL contains `https` prefix

Types

type ErrGroup

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

ErrGroup accumulates multiple errors and produces single error message.

func (*ErrGroup) Add

func (eg *ErrGroup) Add(err error)

Add adds a new error to group. Isn't thread-safe.

func (*ErrGroup) Err

func (eg *ErrGroup) Err() error

Err checks if group contains at least one error.

func (*ErrGroup) Error

func (eg *ErrGroup) Error() string

Error satisfies Error interface

Jump to

Keyboard shortcuts

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