Help us shape the future of Go! Take the 2026 Go Developer Survey

variable

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerID          = "$server_id"
	RouteID           = "$route_id"
	ServiceID         = "$service_id"
	RemoteAddr        = "$remote_addr"
	Host              = "$host"
	Time              = "$time"
	ReceivedSize      = "$received_size"
	SendSize          = "$send_size"
	Status            = "$status"
	Request           = "$request"
	RequestInfo       = "$request_info"
	RequestProtocol   = "$request_protocol"
	RequestMethod     = "$request_method"
	RequestURI        = "$request_uri"
	RequestPath       = "$request_path"
	RequestPathAlias  = "$request_path_alias"
	RequestBody       = "$request_body"
	Duration          = "$duration"
	LogTime           = "$log_time"
	Upstream          = "$upstream"
	UpstreamID        = "$upstream_id"
	UpstreamURI       = "$upstream_uri"
	UpstreamMethod    = "$upstream_method"
	UpstreamProtocol  = "$upstream_protocol"
	UpstreamPath      = "$upstream_path"
	UpstreamPathAlias = "$upstream_path_alias"
	UpstreamAddr      = "$upstream_addr"
	UpstreamDuration  = "$upstream_duration"
	UpstreamStatus    = "$upstream_status"
	TraceID           = "$trace_id"
	Allow             = "$allow"
	ClientIP          = "$client_ip"
	UserAgent         = "$user_agent"
	TargetTimeout     = "target_timeout"

	// grpc
	GRPCStatus  = "$grpc_status"
	GRPCMessage = "$grpc_message"

	B  = 1
	KB = 1024 * B
	MB = 1024 * KB
	GB = 1024 * MB
)

Variables

This section is empty.

Functions

func Get

func Get(key string, c *app.RequestContext) (val any, found bool)

func GetBool

func GetBool(key string, c *app.RequestContext) bool

func GetFloat32

func GetFloat32(key string, c *app.RequestContext) float32

func GetFloat64

func GetFloat64(key string, c *app.RequestContext) float64

func GetInt32

func GetInt32(key string, c *app.RequestContext) int32

func GetInt64

func GetInt64(key string, c *app.RequestContext) int64

func GetString

func GetString(key string, c *app.RequestContext) string

func IsDirective

func IsDirective(key string) bool

Types

type ReqInfo

type ReqInfo struct {
	ServerID    string
	Host        []byte
	Path        []byte
	Protocol    string
	Method      []byte
	Querystring []byte
}

Jump to

Keyboard shortcuts

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