Documentation ¶
Index ¶
- Constants
- func AddDate(mode string) time.Time
- func ConvertByteToHex(input []byte) []string
- func ConvertByteToString(input []byte) string
- func ConvertHexToByte(input []string) []byte
- func DecodeLocation(latitude float64) float64
- func FailOnError(err error, msg string)
- func FormatDate(time time.Time) string
- func GenerateIsoDate(dateTime string) time.Time
- func GetDate(format ...string) (string, error)
- func GetDateDiff(t time.Time) int64
- func GetDateWithFormat(format ...string) string
- func GetDeviceImei(input []byte) string
- func GetDistance(p1 []float64, p2 []float64) float64
- func GetIranLocation() (*time.Location, error)
- func GetLocalizedTime() time.Time
- func GetPackageSn(input []byte) string
- func GetPackageSnInNumber(input []byte) int
- func GetRemoteAddr(remoteAddr string) string
- func InitLogger(filePath string) (*zap.Logger, error)
- func IsConcox(packet []byte) bool
- func IsLogin(packet []byte) bool
- func IsOnlineRequest(packet []byte) bool
- func LeftPad2Len(s string, padStr string, overallLen int) string
- func Rad(x float64) float64
- func Round(num float64) int
- func SortArray(array [][]byte) [][]byte
- func SplitPackage(input []byte, array [][]byte) [][]byte
- func ToFixed(num float64, precision int) float64
- type WriteSyncer
Constants ¶
View Source
const ( ConstDefaultDateFormat = "2006-01-02 15:04:05" RedisDevices = "devices" RedisLocations = "locations" RedisOnlines = "onlines" RedisHeartBeat = "heart_beats" RedisX3InGt = "X3InGt" RedisGtInX3 = "GtInX3" RedisLocationList = "locList" RedisLbsLocation = "lbs_locations" )
Variables ¶
This section is empty.
Functions ¶
func ConvertByteToHex ¶
func ConvertByteToString ¶
func ConvertHexToByte ¶
func DecodeLocation ¶
func FailOnError ¶
func FormatDate ¶
func GenerateIsoDate ¶
func GetDateDiff ¶
func GetDateWithFormat ¶
func GetDeviceImei ¶
func GetDistance ¶
func GetIranLocation ¶
func GetLocalizedTime ¶
func GetPackageSn ¶
func GetPackageSnInNumber ¶
func GetRemoteAddr ¶
func IsOnlineRequest ¶
func SplitPackage ¶
Types ¶
type WriteSyncer ¶
func (WriteSyncer) Sync ¶
func (ws WriteSyncer) Sync() error
Directories ¶
Path | Synopsis |
---|---|
devices
|
|
internal/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. |
internal/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.
|
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. |
pkg/logging
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. |
Click to show internal directories.
Click to hide internal directories.