ucred

package
v0.0.0-...-288c4de Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotUnixSocket = fmt.Errorf("Connection isn't a unix socket")

ErrNotUnixSocket is returned when the underlying connection isn't a unix socket.

Functions

func GetConnFromContext

func GetConnFromContext(ctx context.Context) net.Conn

GetConnFromContext extracts the connection from the request context on a HTTP listener.

func GetCred

func GetCred(conn *net.UnixConn) (*unix.Ucred, error)

GetCred returns the credentials from the remote end of a unix socket.

func GetCredFromContext

func GetCredFromContext(ctx context.Context) (*unix.Ucred, error)

GetCredFromContext extracts the unix credentials from the request context on a HTTP listener.

Types

This section is empty.

Jump to

Keyboard shortcuts

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