# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/dumqo6a
【Go Web 開發】基於 IP 限流**
上一篇文章我們介紹了全侷限流,當您希望嚴格對 API 的請求總速率進行限制,並且不關心請求來自何處時,使用全侷限流器可能很有用。但通常更常見的是爲每個客戶端單獨設置一個限流器,這樣可以防止單個客戶端發出太多請求,影響其他客戶端。一種簡單的實現方法是創建一個 map 來爲每個客戶端創建一個限流器映射,使用每個客戶端的 IP 地址作爲 map 的鍵。當一個新客戶端向 API 發出請求時,我們將初始化一 ⌘ Read more