mirror of
https://github.com/status-im/status-go.git
synced 2025-01-11 07:07:24 +00:00
c61a4000d8
Implement activity.Scheduler to serialize and limit the number of calls on the activity service. This way we protect form inefficient parallel queries and easy support async and rate limiting based on the API requirements. Refactor the activity APIs async and use the Scheduler for managing the activity service calls configured with one of the two rules: cancel ignore. Updates status-desktop #11170
26 lines
479 B
Go
26 lines
479 B
Go
// +build appengine appenginevm
|
|
|
|
package jsonparser
|
|
|
|
import (
|
|
"strconv"
|
|
)
|
|
|
|
// See fastbytes_unsafe.go for explanation on why *[]byte is used (signatures must be consistent with those in that file)
|
|
|
|
func equalStr(b *[]byte, s string) bool {
|
|
return string(*b) == s
|
|
}
|
|
|
|
func parseFloat(b *[]byte) (float64, error) {
|
|
return strconv.ParseFloat(string(*b), 64)
|
|
}
|
|
|
|
func bytesToString(b *[]byte) string {
|
|
return string(*b)
|
|
}
|
|
|
|
func StringToBytes(s string) []byte {
|
|
return []byte(s)
|
|
}
|