httphandler

package
v0.0.7-beta Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InboundHandler

type InboundHandler struct {
	*handlers.InboundHandler
}

func NewInboundHandler

func NewInboundHandler(gn string, fn *string, pb *int32, dw *float32, kv *map[string]string) (*InboundHandler, error)

NewInboundHandler returns a new InboundHandler

func (*InboundHandler) GuardHandler

func (h *InboundHandler) GuardHandler(next http.Handler) http.Handler

GuardHandler implements HTTP handler (middleware) for adding a Stanza Guard to an HTTP Server

func (*InboundHandler) GuardHandlerFunction

func (h *InboundHandler) GuardHandlerFunction(next func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request)

GuardHandlerFunc implements HTTP func(w, r) middleware for adding a Stanza Guard to an HTTP Server

func (*InboundHandler) HTTPServerStatus

func (h *InboundHandler) HTTPServerStatus(code int) (codes.Code, string)

HTTPServerStatus returns a span status code and message for an HTTP status code value returned by a server. Status codes in the 400-499 range are not returned as errors.

func (*InboundHandler) Start

type OutboundHandler

type OutboundHandler struct {
	*handlers.OutboundHandler
}

func NewOutboundHandler

func NewOutboundHandler(gn string, fn *string, pb *int32, dw *float32, kv *map[string]string) (*OutboundHandler, error)

NewOutboundHandler returns a new OutboundHandler

func (*OutboundHandler) Get

func (h *OutboundHandler) Get(ctx context.Context, url string) (*http.Response, error)

Get wraps a HTTP GET request

func (*OutboundHandler) Post

func (h *OutboundHandler) Post(ctx context.Context, url string, body io.Reader) (*http.Response, error)

Post wraps a HTTP POST request

func (*OutboundHandler) Request

func (h *OutboundHandler) Request(ctx context.Context, httpMethod, url string, body io.Reader) (*http.Response, error)

Request wraps a HTTP request of the given HTTP method

Jump to

Keyboard shortcuts

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