grpcutil

package
v2.0.0-...-c87de9c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPeerAddr

func GetPeerAddr(ctx context.Context) string

GetPeerAddr get peer addr

func GetRealAddr

func GetRealAddr(ctx context.Context) string

GetRealAddr get x-real-ip nginx config eg: "rpc_set_header X-Real-IP $remote_addr;"

func GetRealPeerAddr

func GetRealPeerAddr(ctx context.Context) string

GetRealPeerAddr returns real ip when exist, otherwise returns peer ip.

Types

This section is empty.

Jump to

Keyboard shortcuts

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