context

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToGetPeerFromContext = errors.New("failed to get peer from context")
)

Functions

func GetClientIP

func GetClientIP(ctx context.Context) (string, error)

GetClientIP extracts the client IP address from the context

Parameters:

  • ctx: The context from which to extract the client IP address

Returns:

  • string: The client IP address
  • error: An error if the IP address could not be extracted

Types

This section is empty.

Jump to

Keyboard shortcuts

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