mem

package
v0.0.0-...-3f94a61 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PEER_GEO_NAME = "geo_lat_lng"

Variables

This section is empty.

Functions

func AddGeo

func AddGeo(label string, lat float64, lng float64) error

func CheckAllGeoValue

func CheckAllGeoValue()

func DelChannelPeerValue

func DelChannelPeerValue(key, val string) bool

func DelGeo

func DelGeo(label string) error

func DelPeer

func DelPeer(key string) error

func GetChannel

func GetChannel(key string) ([]string, bool)

获取同一资源下的Peer

func GetChannelCount

func GetChannelCount(key string) int64

func GetServerLatLang

func GetServerLatLang() (float64, float64, error)

存放服务器的经纬度

func Init

func Init() error

func Ping

func Ping() error

func PosGeo

func PosGeo(label string) (float64, float64, error)

func QueryGeo

func QueryGeo(label string, dist float64, count int) ([]redis.GeoLocation, error)

获取附近数据

func QueryGeoList

func QueryGeoList(label string, count int) ([]redis.GeoLocation, error)

获取附近数据|自动重复查找

func SetChannel

func SetChannel(key, peer string) error

设置同一资源下的Peer

func SetPeerHeartbeat

func SetPeerHeartbeat(key string, expiration time.Duration) (interface{}, error)

func SetPeerLatLang

func SetPeerLatLang(key string, lat, lng float64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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