utils

package
v4.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 10 Imported by: 20

Documentation

Index

Constants

View Source
const (
	IPV4 string = "tcp4"
	IPV6 string = "tcp6"
)

Variables

View Source
var (
	// OtelTracerNameKey is OpenTelemetry context key
	OtelTracerNameKey = &ContextKey{name: "tracer_name"} //nolint:gochecknoglobals

	// PsrContextKey is a context key. It can be used in the http attributes
	// immutable
	PsrContextKey = &ContextKey{"psr_attributes"} //nolint:gochecknoglobals
)

Functions

func CreateListener

func CreateListener(address string) (net.Listener, error)

CreateListener

CreateListener crates socket listener based on DSN definition.

func ExecuteFromUser

func ExecuteFromUser(cmd *exec.Cmd, u string) error

ExecuteFromUser may work only if run RR under root user

func IsolateProcess

func IsolateProcess(cmd *exec.Cmd)

IsolateProcess change gpid for the process to avoid bypassing signals to php processes.

func SetChecker

func SetChecker(_ []byte)

Types

type ContextKey

type ContextKey struct {
	// contains filtered or unexported fields
}

func (*ContextKey) String

func (ck *ContextKey) String() string

Jump to

Keyboard shortcuts

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