package
1.8.25
Repository: https://github.com/xmplusdev/xray-core.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
Package buf provides a light-weight memory allocation mechanism.
No description provided by the author
No description provided by the author
No description provided by the author
Package crypto provides common crypto libraries for Xray.
No description provided by the author
Package dice contains common functions to generate random number.
No description provided by the author
Package errors is a drop-in replacement for Golang lib 'errors'.
No description provided by the author
No description provided by the author
Package net is a drop-in replacement to Golang's net package, with some more functionalities.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package session provides functions for sessions of incoming requests.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Close closes the obj if it is a Closable.
CreateObject creates an object by its config.
Error2 returns the err from the 2nd parameter.
GetGOBIN returns GOBIN environment variable as a string.
GetGOPATH returns GOPATH environment variable as a string.
GetModuleName returns the value of module in `go.mod` file.
GetRuntimeEnv returns the value of runtime environment variable, that is set by running following command: `go env -w key=value`.
Interrupt calls Interrupt() if object implements Interruptible interface, or Close() if the object implements Closable interface.
Must panics if err is not nil.
Must2 panics if the second parameter is not nil, otherwise returns the first parameter.
RegisterConfig registers a global config creator.

# Variables

ErrNoClue is for the situation that existing information is not enough to make a decision.

# Interfaces

Closable is the interface for objects that can release its resources.
HasType is the interface for objects that knows its type.
Interruptible is an interface for objects that can be stopped before its completion.
Runnable is the interface for objects that can start to work and stop on demand.

# Type aliases

ChainedClosable is a Closable that consists of multiple Closable objects.
ConfigCreator is a function to create an object by a config.