Documentation ¶
Index ¶
Constants ¶
View Source
const ( RateLimitCount = "2" RateLimitExpiry = 60 * time.Second PingProcessTime = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func Count ¶
function Count - Method: GET - Description: Provides an approximate count of users who have called the /ping API, leveraging HyperLogLog. - Response 200 OK: ```json
{ "estimatedCount": 150 }
func TopUsersCallingAPI ¶
function Top. - Method: GET - Description: Returns the top 10 users based on the frequency of API calls from Redis. - Responses 200 OK: ```json
{ "topUsersCallingAPIAllTime": [ "CallingPingAPI userID:1 called 1 times", "CallingPingAPI userID:3 called 4 times" ] }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.