Add support for streaming usage stats back to the calling process

This commit is contained in:
Dane Everitt
2019-08-17 13:19:56 -07:00
parent a1987f3aef
commit c8e6e29abc
5 changed files with 133 additions and 3 deletions

View File

@@ -48,6 +48,8 @@ type Server struct {
Filesystem *Filesystem `json:"-"`
Resources *ResourceUsage `json:"resources"`
// Server cache used to store frequently requested information in memory and make
// certain long operations return faster. For example, FS disk space usage.
Cache *cache.Cache `json:"-"`
@@ -203,6 +205,7 @@ func FromConfiguration(data []byte, cfg *config.SystemConfiguration) (*Server, e
Configuration: cfg,
Server: s,
}
s.Resources = &ResourceUsage{}
return s, nil
}