MCPcopy Create free account

hub / github.com/RussellLuo/slidingwindow / types & classes

Types & classes20 in github.com/RussellLuo/slidingwindow

StructBlockingSynchronizer
BlockingSynchronizer does synchronization in a blocking mode and consumes no extra goroutine. It's recommended to use BlockingSynchronizer in low-con
synchronizer.go:76
InterfaceDatastore
Datastore represents the central datastore.
synchronizer.go:9
FuncTypeHandleFunc
func(SyncResponse)
window.go:60
StructLimiter
slidingwindow.go:34
StructLimiter
testutil/main.go:75
StructLocalWindow
LocalWindow represents a window that ignores sync behavior entirely and only stores counters in memory.
window.go:9
FuncTypeMakeFunc
func() SyncRequest
window.go:59
StructMemDatastore
slidingwindow_test.go:93
FuncTypeNewWindow
NewWindow creates a new window, and returns a function to stop the possible sync behaviour within it.
slidingwindow.go:32
StructNonblockingSynchronizer
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
StructRedisDatastore
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
StructRedisDatastore
testutil/main.go:38
FuncTypeStopFunc
StopFunc stops the window's sync behaviour.
slidingwindow.go:28
StructSyncRequest
window.go:42
StructSyncResponse
window.go:49
StructSyncWindow
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
InterfaceSynchronizer
window.go:63
InterfaceWindow
Window represents a fixed-window.
slidingwindow.go:9
StructcaseArg
slidingwindow_test.go:34
StructsyncHelper
syncHelper is a helper that will be leveraged by both BlockingSynchronizer and NonblockingSynchronizer.
synchronizer.go:20