def

package
v0.0.0-...-b26f218 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogServer     = "server"
	LogGRPCCode   = "grpcCode"
	LogRemote     = "remote"
	LogHost       = "host"
	LogPort       = "port"
	LogHTTPMethod = "httpMethod"
	LogHTTPStatus = "httpStatus"
	LogFunc       = "func"
	LogUserID     = "userID"
	LogHandler    = "handler"
)

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx Ctx) (remoteIP string)

FromContext returns all values which might be stored in context using NewContext* functions of this package.

func Init

func Init()

Types

type Ctx

type Ctx = context.Context

func NewContextWithRemoteIP

func NewContextWithRemoteIP(ctx Ctx, remoteIP string) Ctx

NewContextWithRemoteIP creates and returns new context containing given remoteIP.

Jump to

Keyboard shortcuts

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