Discover Packages
github.com/thought-machine/please-servers
mettle
worker
package
Version:
v5.1.1+incompatible
Opens a new window with list of versions in this module.
Published: May 30, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 41
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Overview
Index
Constants
Variables
Functions
RunForever(instanceName, requestQueue, responseQueue, name, storage, dir, cacheDir, ..., ...)
RunOne(instanceName, name, storage, dir, cacheDir, cacheSrcDir, sandbox, tokenFile, ...)
Types
type Cache
NewCache(root, src, copy)
(c) MustStoreAll(instanceName, targets, storage, secureStorage, tokenFile, minDiskSpace)
(c) Retrieve(key, dest, mode)
(c) StoreAll(instanceName, targets, storage, secureStorage, tokenFile, minDiskSpace)
Source Files
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Package worker implements the worker side of Mettle.
func RunForever(...)
func RunOne(...) error
type Cache
func (c *Cache) MustStoreAll(instanceName string, targets []string, storage string, secureStorage bool, ...)
func (c *Cache) Retrieve(key, dest string, mode os.FileMode) bool
func (c *Cache) StoreAll(instanceName string, targets []string, storage string, secureStorage bool, ...) error
func RunForever(instanceName, requestQueue, responseQueue, name, storage, dir, cacheDir, cacheSrcDir, browserURL, sandbox, lucidity, tokenFile string , clean, secureStorage, cacheCopy bool , timeout time .Duration , maxCacheSize, minDiskSpace int64 )
RunForever runs the worker, receiving jobs until terminated.
func RunOne(instanceName, name, storage, dir, cacheDir, cacheSrcDir, sandbox, tokenFile string , clean, secureStorage, cacheCopy bool , timeout time .Duration , hash string , size int64 ) error
RunOne runs one single request, returning any error received.
A Cache implements a filesystem-based blob cache.
Since all the blobs are keyed by hash we don't have to worry about invalidation.
In normal use the server never writes it; we prefill a selected artifact list offline.
NewCache returns a new cache instance.
MustStoreAll is like StoreAll but dies on errors.
Retrieve copies a blob from the cache to the given location.
It returns true if retrieved.
StoreAll reads the given file and stores all the blobs it finds into the cache.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.