thttp

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSocketRoundTripper

func NewSocketRoundTripper(path string) http.RoundTripper

NewSocketRoundTripper creates a http.RoundTripper using a unix domain socket

func NewSocketTransport

func NewSocketTransport(path string) *http.Transport

NewSocketTransport creates an http transport that listens to the "unix" protocol. I.e. requests must be of the form "unix://path".

Types

type SocketRoundtripper

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

SocketRoundtripper defines an http.RoundTripper that uses a unix domain socket as an endpoint.

func (SocketRoundtripper) RoundTrip

func (s SocketRoundtripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip dials the unix domain socket, sends the request and processes the response.

Jump to

Keyboard shortcuts

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