apiping

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeAPIPingEndpoint

func MakeAPIPingEndpoint(service ping.Service) endpoint.Endpoint

MakeAPIPingEndpoint returns an edpoint

func MakeHTTPHandler

func MakeHTTPHandler(e endpoint.Endpoint) http.Handler

MakeHTTPHandler returns a new http handler for endpoint

Types

type Request

type Request struct {
	Num   int           `json:"num"`
	Sleep time.Duration `json:"sleep"`
}

Request Request

func (Request) TraceAttributes added in v0.6.0

func (r Request) TraceAttributes() []attribute.KeyValue

TraceAttributes will inject attributes num and sleep into the trace span.

type ResponseError

type ResponseError struct {
	Error string
}

ResponseError represents an response error

Jump to

Keyboard shortcuts

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