Discover Packages
github.com/thought-machine/please-servers
mettle
worker
package
Version:
v4.3.0+incompatible
Opens a new window with list of versions in this module.
Published: Apr 26, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 38
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, sandbox, clean, secureStorage, ...)
Types
Source Files
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Package worker implements the worker side of Mettle.
func RunForever(instanceName, requestQueue, responseQueue, name, storage, dir, cacheDir, browserURL, sandbox string , clean, secureStorage bool , timeout time .Duration , maxCacheSize int64 )
RunForever runs the worker, receiving jobs until terminated.
func RunOne(instanceName, name, storage, dir, cacheDir, sandbox string , clean, secureStorage 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.