client

package
v0.0.0-...-74c185a Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 18 Imported by: 3

Documentation

Overview

Package client GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithHttpClient

func ContextWithHttpClient(ctx context.Context, c *http.Client) context.Context

func ContextWithRoundTripperCreator

func ContextWithRoundTripperCreator(ctx context.Context, newRoundTripper RoundTripperCreateFunc) context.Context

func GetShortConnClientContext

func GetShortConnClientContext(ctx context.Context, httpTransports ...HttpTransport) *http.Client

func HttpClientFromContext

func HttpClientFromContext(ctx context.Context) *http.Client

func RoundTripperCreatorFromContext

func RoundTripperCreatorFromContext(ctx context.Context) func() http.RoundTripper

Types

type Client

type Client struct {
	Endpoint       string `flag:""`
	NewError       func() error
	HttpTransports []HttpTransport
}

func (*Client) Do

func (c *Client) Do(ctx context.Context, req any, metas ...courier.Metadata) courier.Result

func (Client) RuntimeDoc

func (v Client) RuntimeDoc(names ...string) ([]string, bool)

type HttpTransport

type HttpTransport = func(rt http.RoundTripper) http.RoundTripper

func HttpTransportFunc

func HttpTransportFunc(round func(request *http.Request, next RoundTrip) (*http.Response, error)) HttpTransport

type RoundTrip

type RoundTrip = func(request *http.Request) (*http.Response, error)

type RoundTripperCreateFunc

type RoundTripperCreateFunc = func() http.RoundTripper

Jump to

Keyboard shortcuts

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