proxy

package
v0.0.0-...-7d8b796 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type URL

type URL struct {
	URL *url.URL
}

URL implements YAML.Marshaler and yaml.Unmarshaler interfaces for url.URL.

func MustNewURL

func MustNewURL(u string) *URL

MustNewURL returns new URL for the given u.

func (*URL) GetURL

func (u *URL) GetURL() *url.URL

GetURL return the underlying url.

func (*URL) IsHTTPOrHTTPS

func (u *URL) IsHTTPOrHTTPS() bool

IsHTTPOrHTTPS returns true if u is http or https

func (*URL) MarshalYAML

func (u *URL) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler interface.

func (*URL) NewDialFunc

func (u *URL) NewDialFunc(ac *promauth.Config) (fasthttp.DialFunc, error)

NewDialFunc returns dial func for the given u and ac.

func (*URL) SetFasthttpHeaders

func (u *URL) SetFasthttpHeaders(ac *promauth.Config, req *fasthttp.Request)

SetFasthttpHeaders sets headers to req according to u and ac configs.

func (*URL) SetHeaders

func (u *URL) SetHeaders(ac *promauth.Config, req *http.Request)

SetHeaders sets headers to req according to u and ac configs.

func (*URL) String

func (u *URL) String() string

String returns string representation of u.

func (*URL) UnmarshalYAML

func (u *URL) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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