Fix mutexes
This commit is contained in:
parent
b508ee07c9
commit
21e7aa1222
@ -14,7 +14,7 @@ import (
|
||||
|
||||
type (
|
||||
service struct {
|
||||
l sync.Mutex
|
||||
l *sync.Mutex
|
||||
logger *zap.Logger
|
||||
|
||||
// service will flush values on TRUE or just reload on FALSE
|
||||
@ -35,6 +35,7 @@ const (
|
||||
// It acts as a caching layer
|
||||
func Service(ctx context.Context, logger *zap.Logger, repository *repository) (svc *service) {
|
||||
svc = &service{
|
||||
l: &sync.Mutex{},
|
||||
f: make(chan bool),
|
||||
|
||||
logger: logger.Named("permissions"),
|
||||
|
||||
@ -15,7 +15,7 @@ import (
|
||||
|
||||
type (
|
||||
service struct {
|
||||
l sync.Mutex
|
||||
l *sync.Mutex
|
||||
logger *zap.Logger
|
||||
|
||||
c AutomationServiceConfig
|
||||
@ -70,6 +70,7 @@ func Service(c AutomationServiceConfig) (svc *service) {
|
||||
logger: c.Logger.Named("automation"),
|
||||
|
||||
c: c,
|
||||
l: &sync.Mutex{},
|
||||
|
||||
makeToken: c.TokenMaker,
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user