access

package
v0.0.0-...-e809a50 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteHeader

func WriteHeader(ctx *context.Context, header *Header)

Types

type H

type H interface {
	Marshal() ([]byte, error)
	Unmarshal(data []byte) error
	TraceID() string
}
type Header struct {
	TraceID string `json:"trace_id"`
	Version int    `json:"version"` // 头版本
}

Header 公共头

func ReadHeader

func ReadHeader(ctx context.Context) *Header

func (*Header) Marshal

func (h *Header) Marshal() ([]byte, error)

func (*Header) Unmarshal

func (h *Header) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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