summaryrefslogtreecommitdiff
path: root/lib/caching/cache.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-27 21:04:59 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-27 21:04:59 -0600
commit5cc3e73ee38cdd11b7dcadcfa045924cc974351a (patch)
treed27d1612abac32cb1aeca75cf224e8b792b3c6ce /lib/caching/cache.go
parent5b57069df62182b23d5db38180df345fc3c86a85 (diff)
wip
Diffstat (limited to 'lib/caching/cache.go')
-rw-r--r--lib/caching/cache.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/caching/cache.go b/lib/caching/cache.go
index 002a7ea..37565f9 100644
--- a/lib/caching/cache.go
+++ b/lib/caching/cache.go
@@ -54,11 +54,11 @@ type Cache[K comparable, V any] interface {
Flush(context.Context)
}
-// FuncSource implements Source. Load calls the function, and Flush
+// SourceFunc implements Source. Load calls the function, and Flush
// is a no-op.
-type FuncSource[K comparable, V any] func(context.Context, K, *V)
+type SourceFunc[K comparable, V any] func(context.Context, K, *V)
-var _ Source[int, string] = FuncSource[int, string](nil)
+var _ Source[int, string] = SourceFunc[int, string](nil)
-func (fn FuncSource[K, V]) Load(ctx context.Context, k K, v *V) { fn(ctx, k, v) }
-func (fn FuncSource[K, V]) Flush(context.Context, *V) {}
+func (fn SourceFunc[K, V]) Load(ctx context.Context, k K, v *V) { fn(ctx, k, v) }
+func (fn SourceFunc[K, V]) Flush(context.Context, *V) {}