files

package
v0.19.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

func NewReader

func NewReader(opts ...ReaderOpt) *Reader

func (*Reader) ReadFile

func (r *Reader) ReadFile(uri string) ([]byte, error)

type ReaderOpt

type ReaderOpt func(*Reader)

func WithEKSAUserAgent added in v0.15.0

func WithEKSAUserAgent(eksAComponent, version string) ReaderOpt

WithEKSAUserAgent sets the user agent for a particular eks-a component and version. component should be something like "cli", "controller", "e2e", etc. version should generally be a semver, but when not available, any string is valid.

func WithEmbedFS

func WithEmbedFS(embedFS embed.FS) ReaderOpt

func WithNonCachedProxyConfig added in v0.15.1

func WithNonCachedProxyConfig() ReaderOpt

WithNonCachedProxyConfig configures the HTTP client to read the Proxy configuration from the environment on every request instead of relying on the default package level cache (implemented in the http package with envProxyFuncValue), which is only read once. If Proxy is not configured in the client's transport, nothing is changed. This is only for testing.

func WithRootCACerts added in v0.15.1

func WithRootCACerts(certs []*x509.Certificate) ReaderOpt

WithRootCACerts configures the HTTP client's trusted CAs. Note that this will overwrite the defaults so the host's trust will be ignored. This option is only for testing.

func WithUserAgent

func WithUserAgent(userAgent string) ReaderOpt

Jump to

Keyboard shortcuts

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