diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-06-06 15:25:02 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-06-08 02:29:17 -0400 |
commit | 469542518c4bb4db00774734c9cb257cd0050076 (patch) | |
tree | ed42f78dbc593102fc9b027962c465153e7d36d0 /svc/cache.go | |
parent | 3fe7510b7617780e6bcd7bd9a5575f11f59b6e15 (diff) | |
download | getwtxt-469542518c4bb4db00774734c9cb257cd0050076.tar.gz |
moved type declarations into respective files
Diffstat (limited to 'svc/cache.go')
-rw-r--r-- | svc/cache.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/svc/cache.go b/svc/cache.go index fb6a9ab..db427db 100644 --- a/svc/cache.go +++ b/svc/cache.go @@ -5,9 +5,25 @@ import ( "io/ioutil" "log" "os" + "sync" "time" ) +// RemoteRegistries holds a list of remote registries to +// periodically scrape for new users. The remote registries +// must have been added via POST like a user. +type RemoteRegistries struct { + Mu sync.RWMutex + List []string +} + +type staticAssets struct { + index []byte + indexMod time.Time + css []byte + cssMod time.Time +} + func cacheTimer() bool { confObj.Mu.RLock() answer := time.Since(confObj.LastCache) > confObj.CacheInterval |