MCPcopy Index your code

hub / github.com/douglasmakey/tracking / functions

Functions18 in github.com/douglasmakey/tracking

↓ 3 callersMethodAddDriverLocation
(lng, lat float64, id string)
storages/redis.go:36
↓ 3 callersMethodRemoveDriverLocation
(id string)
storages/redis.go:43
↓ 2 callersMethodSearchDrivers
(limit int, lat, lng, r float64)
storages/redis.go:47
↓ 2 callersFunctionsendInfo
sendInfo this func is only example, you can use another services, websocket or push notification for send data to user.
tasks/search.go:110
↓ 1 callersMethodRun
Run is the function for executing the task, this task validating the request and launches another goroutine called 'doSearch' which does the search.
tasks/search.go:38
↓ 1 callersMethoddoSearch
doSearch do search of driver and close to the channel.
tasks/search.go:95
↓ 1 callersFunctionsearch
search receives lat and lng of the picking point and searches drivers about this point.
handler/handler.go:41
↓ 1 callersFunctiontracking
tracking receive the driver coord and saves the coord in redis
handler/handler.go:12
↓ 1 callersMethodvalidateRequest
validateRequest validates if the request is valid and return an error like a reason in case not.
tasks/search.go:77
FunctionCancelRequest
(w http.ResponseWriter, r *http.Request)
handler/v2/search.go:52
FunctionGetRedisClient
()
storages/redis.go:18
FunctionNewHandler
()
handler/base.go:8
FunctionNewRequestDriverTask
NewRequestDriverTask create and return a pointer to RequestDriverTask
tasks/search.go:28
FunctionSearchV2
(w http.ResponseWriter, r *http.Request)
handler/v2/search.go:15
FunctionTestHandlerSearch
(t *testing.T)
handler/handler_test.go:29
FunctionTestHandlerTracking
(t *testing.T)
handler/handler_test.go:12
Functionhealth
(w http.ResponseWriter, r *http.Request)
handler/healthcheck.go:9
Functionmain
()
main.go:10