Change out usync.Locker for usync.Monitor
This commit is contained in:
parent
fe5be15ee6
commit
22ad9ccec5
@ -27,13 +27,13 @@ type Environment struct {
|
||||
// environment, as well as any providers that are loaded.
|
||||
Config Meta
|
||||
|
||||
documents usync.Locker[map[string] *Document]
|
||||
documents usync.Monitor[map[string] *Document]
|
||||
funcMap template.FuncMap
|
||||
}
|
||||
|
||||
// Init must be called before utilizng the environment.
|
||||
func (this *Environment) Init (ctx context.Context) error {
|
||||
this.documents = usync.NewLocker(make(map[string] *Document))
|
||||
this.documents = usync.NewMonitor(make(map[string] *Document))
|
||||
this.funcMap = make(template.FuncMap)
|
||||
for _, provider := range this.Providers {
|
||||
if provider, ok := provider.(ConfigProcessor); ok {
|
||||
|
@ -41,7 +41,7 @@ type Handler struct {
|
||||
TrustXForwardedFor bool
|
||||
TrustCFConnectingIP bool
|
||||
|
||||
rateLimitMap usync.Locker[map[string] rateLimitEntry]
|
||||
rateLimitMap usync.Monitor[map[string] rateLimitEntry]
|
||||
}
|
||||
|
||||
func (this *Handler) Init (ctx context.Context) error {
|
||||
|
Loading…
Reference in New Issue
Block a user