Improve performance, logging

This commit is contained in:
Daniel
2019-05-10 11:57:51 +02:00
parent e72ed023db
commit 16db10b84b
9 changed files with 282 additions and 129 deletions

View File

@@ -1,6 +1,7 @@
package profile
import (
"context"
"net"
"sync"
@@ -27,7 +28,7 @@ type Set struct {
}
// NewSet returns a new profile set with given the profiles.
func NewSet(id string, user, stamp *Profile) *Set {
func NewSet(ctx context.Context, id string, user, stamp *Profile) *Set {
new := &Set{
id: id,
profiles: [4]*Profile{
@@ -37,7 +38,7 @@ func NewSet(id string, user, stamp *Profile) *Set {
nil, // Default
},
}
activateProfileSet(new)
activateProfileSet(ctx, new)
new.Update(status.SecurityLevelFortress)
return new
}