Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RussellLuo/slidingwindow
/ types & classes
Types & classes
20 in github.com/RussellLuo/slidingwindow
⨍
Functions
67
◇
Types & classes
20
Struct
BlockingSynchronizer
BlockingSynchronizer does synchronization in a blocking mode and consumes no extra goroutine. It's recommended to use BlockingSynchronizer in low-con
synchronizer.go:76
Interface
Datastore
Datastore represents the central datastore.
synchronizer.go:9
FuncType
HandleFunc
func(SyncResponse)
window.go:60
Struct
Limiter
slidingwindow.go:34
Struct
Limiter
testutil/main.go:75
Struct
LocalWindow
LocalWindow represents a window that ignores sync behavior entirely and only stores counters in memory.
window.go:9
FuncType
MakeFunc
func() SyncRequest
window.go:59
Struct
MemDatastore
slidingwindow_test.go:93
FuncType
NewWindow
NewWindow creates a new window, and returns a function to stop the possible sync behaviour within it.
slidingwindow.go:32
Struct
NonblockingSynchronizer
NonblockingSynchronizer does synchronization in a non-blocking mode. To achieve this, it needs to spawn a goroutine to exchange data with the central
synchronizer.go:110
Struct
RedisDatastore
RedisDatastore is a reference implementation of the Redis-based datastore, which can be used directly if you happen to use go-redis.
example_syncwindow_test.go:14
Struct
RedisDatastore
testutil/main.go:38
FuncType
StopFunc
StopFunc stops the window's sync behaviour.
slidingwindow.go:28
Struct
SyncRequest
window.go:42
Struct
SyncResponse
window.go:49
Struct
SyncWindow
SyncWindow represents a window that will sync counter data to the central datastore asynchronously. Note that for the best coordination between the w
window.go:79
Interface
Synchronizer
window.go:63
Interface
Window
Window represents a fixed-window.
slidingwindow.go:9
Struct
caseArg
slidingwindow_test.go:34
Struct
syncHelper
syncHelper is a helper that will be leveraged by both BlockingSynchronizer and NonblockingSynchronizer.
synchronizer.go:20