files
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
Types¶
typeCache¶
type Cache struct {// contains filtered or unexported fields}
Cache persists the files for template versions, and is used by dynamicparameters to deduplicate the files in memory. When any number of users opensthe workspace creation form for a given template version, it's files areloaded into memory exactly once. We hold those files until there are nolonger any open connections, and then we remove the value from the map.
funcNewFromStore¶
NewFromStore returns a file cache that will fetch files from the provideddatabase.
func (*Cache)Acquire¶
Acquire will load the fs.FS for the given file. It guarantees that parallelcalls for the same fileID will only result in one fetch, and that parallelcalls for distinct fileIDs will fetch in parallel.
Every call to Acquire must have a matching call to Release.