httpc

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 17

Documentation

Overview

github.com/whatap/go-api/httpc

github.com/whatap/go-api/httpc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseHttpcContext added in v0.2.0

func CloseHttpcContext(ctx *HttpcCtx)

func End

func End(httpcCtx *HttpcCtx, status int, reason string, err error) error

func GetMTrace

func GetMTrace(httpcCtx *HttpcCtx) http.Header

func Trace

func Trace(ctx context.Context, host string, port int, url string, elapsed int, status int, reason string, err error) error

Types

type HttpcCtx

type HttpcCtx struct {
	Txid        int64
	ServiceName string
	StartTime   int64
	Url         string
	Cpu         int64
	Mem         int64

	StepId int64

	TraceMtraceTraceparentValue string
	TraceMtraceCallerValue      string
	TraceMtracePoidValue        string
	TraceMtraceSpecValue        string
	TraceMtraceMcallee          int64
	// contains filtered or unexported fields
}

func NewHttpcCtx

func NewHttpcCtx() *HttpcCtx

func PoolHttpcContext added in v0.2.0

func PoolHttpcContext() *HttpcCtx

func Start

func Start(ctx context.Context, url string) (*HttpcCtx, error)

func (*HttpcCtx) Clear added in v0.2.0

func (this *HttpcCtx) Clear()

Jump to

Keyboard shortcuts

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