Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
BytesToString converts byte slice to a string without memory allocation.
Note it may break if the implementation of string or slice header changes in the future go versions.
func CeilToPowerOfTwo ¶
CeilToPowerOfTwo returns the least power of two integer value greater than or equal to n.
func FloorToPowerOfTwo ¶
FloorToPowerOfTwo returns the greatest power of two integer value less than or equal to n.
func IsPowerOfTwo ¶
IsPowerOfTwo reports whether given integer is a power of two.
func StringToBytes ¶
StringToBytes converts string to a byte slice without memory allocation.
Note it may break if the implementation of string or slice header changes in the future go versions.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package logging provides logging functionality for gnet server, it sets up a default logger (powered by go.uber.org/zap) which is about to be used by gnet server, it also allows users to replace the default logger with their customized logger by just implementing the `Logger` interface and assign it to the functional option `Options.Logger`, pass it to `gnet.Serve` method.
|
Package logging provides logging functionality for gnet server, it sets up a default logger (powered by go.uber.org/zap) which is about to be used by gnet server, it also allows users to replace the default logger with their customized logger by just implementing the `Logger` interface and assign it to the functional option `Options.Logger`, pass it to `gnet.Serve` method. |
queue
Package queue delivers an implementation of lock-free concurrent queue based on the algorithm presented by Maged M. Michael and Michael L. Scot.
|
Package queue delivers an implementation of lock-free concurrent queue based on the algorithm presented by Maged M. Michael and Michael L. Scot. |
Package socket provides functions that return fd and net.Addr based on given the protocol and address with a SO_REUSEPORT option set to the socket.
|
Package socket provides functions that return fd and net.Addr based on given the protocol and address with a SO_REUSEPORT option set to the socket. |
Click to show internal directories.
Click to hide internal directories.