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.
|
// environment, as well as any providers that are loaded.
|
||||||
Config Meta
|
Config Meta
|
||||||
|
|
||||||
documents usync.Locker[map[string] *Document]
|
documents usync.Monitor[map[string] *Document]
|
||||||
funcMap template.FuncMap
|
funcMap template.FuncMap
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init must be called before utilizng the environment.
|
// Init must be called before utilizng the environment.
|
||||||
func (this *Environment) Init (ctx context.Context) error {
|
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)
|
this.funcMap = make(template.FuncMap)
|
||||||
for _, provider := range this.Providers {
|
for _, provider := range this.Providers {
|
||||||
if provider, ok := provider.(ConfigProcessor); ok {
|
if provider, ok := provider.(ConfigProcessor); ok {
|
||||||
|
|||||||
@ -41,7 +41,7 @@ type Handler struct {
|
|||||||
TrustXForwardedFor bool
|
TrustXForwardedFor bool
|
||||||
TrustCFConnectingIP bool
|
TrustCFConnectingIP bool
|
||||||
|
|
||||||
rateLimitMap usync.Locker[map[string] rateLimitEntry]
|
rateLimitMap usync.Monitor[map[string] rateLimitEntry]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Handler) Init (ctx context.Context) error {
|
func (this *Handler) Init (ctx context.Context) error {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user