MapResponse optimalisations, peer list integration tests (#1254)

Co-authored-by: Allen <979347228@qq.com>
This commit is contained in:
Kristoffer Dalby 2023-03-06 17:50:26 +01:00 committed by GitHub
parent bb786ac8e4
commit a5562850a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 362 additions and 85 deletions

8
app.go
View file

@ -84,9 +84,11 @@ type Headscale struct {
DERPMap *tailcfg.DERPMap
DERPServer *DERPServer
aclPolicy *ACLPolicy
aclRules []tailcfg.FilterRule
sshPolicy *tailcfg.SSHPolicy
aclPolicy *ACLPolicy
aclRules []tailcfg.FilterRule
aclPeerCacheMapRW sync.RWMutex
aclPeerCacheMap map[string]map[string]struct{}
sshPolicy *tailcfg.SSHPolicy
lastStateChange *xsync.MapOf[string, time.Time]