# 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/dm4mqeq
通過 SingleFlight 模式學習 Go 併發編程**
最近接觸到微服務框架go-zero,翻看了整個框架代碼,發現結構清晰、代碼簡潔,所以決定閱讀源碼學習下,本次閱讀的源碼位於core/syncx/singleflight.go。在go-zero中SingleFlight的作用是:將併發請求合併成一個請求,以減少對下層服務的壓力。應用場景----查詢緩存時,合併請求,提升服務性能。假設有一個 IP 查詢的服務,每次用戶請求先在緩存中查詢一個 IP 的 ⌘ Read more