common

package
v3.0.0-...-1f68d82 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CGOEnabled = true
	CGOHint    = "enabled"
)

Variables

View Source
var CRLF = []byte("\r\n")

Functions

func Cause

func Cause(cause string, err error) error

func GetSecond

func GetSecond[T any](_ any, r T) T

func Must

func Must[T any](s T, err error) T

func Must0

func Must0(err error)

func MustOK

func MustOK[T any](s T, ok bool) T

func Unwrap

func Unwrap(err error) error

func UnwrapReader

func UnwrapReader(reader io.Reader) io.Reader

func UnwrapWriter

func UnwrapWriter(writer io.Writer) io.Writer

Types

type HasInnerError

type HasInnerError interface {
	Unwrap() error
}

type WrappedReader

type WrappedReader interface {
	io.Reader
	UpstreamReader() io.Reader
}

type WrappedWriter

type WrappedWriter interface {
	io.Writer
	UpstreamWriter() io.Writer
}

Directories

Path Synopsis
Package network contains all protocols for remote connection used by ZBProxy.
Package network contains all protocols for remote connection used by ZBProxy.
Package proxyprotocol partially implements PROXY protocol proposed by HAProxy, aiming at high-performance integration with the rest of ZBProxy.
Package proxyprotocol partially implements PROXY protocol proposed by HAProxy, aiming at high-performance integration with the rest of ZBProxy.

Jump to

Keyboard shortcuts

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