http

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Head(url string) (resp *http.Response, err error)
	Get(url string) (resp *http.Response, err error)
	Post(url, contentType string, body io.Reader) (resp *http.Response, err error)
	PostForm(url string, data url.Values) (resp *http.Response, err error)
	Do(req *http.Request) (*http.Response, error)
}

type CompletedConfig

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

func (CompletedConfig) New

func (c CompletedConfig) New() (func() Client, error)

New creates a new server which logically combines the handling chain with the passed server. The handler chain in particular can be difficult as it starts delgating. New usually called after Complete

func (CompletedConfig) Validate added in v0.0.13

func (c CompletedConfig) Validate() error

Validate checks Config.

type Config

type Config struct {
	HttpClient     *http.Client
	KerberosConfig *kerberos.Config
	Validator      *validator.Validate
}

Config Code borrowed from https://github.com/kubernetes/kubernetes call chains: NewConfig -> Complete -> [Validate] -> New|Apply

func NewConfig

func NewConfig() *Config

NewConfig returns a Config struct with the default values

func (*Config) Complete

func (o *Config) Complete() CompletedConfig

Complete fills in any fields not set that are required to have valid data and can be derived from other fields. If you're going to ApplyOptions, do that first. It's mutating the receiver.

Jump to

Keyboard shortcuts

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