about summary refs log tree commit diff
path: root/tools/nixery/server/builder/state.go
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-10-03T11·49+0100
committerVincent Ambo <github@tazj.in>2019-10-03T12·21+0100
commit43a642435b653d04d730de50735d310f1f1083eb (patch)
treef401510a150ed177add1adfb3bc737e1d9a1562b /tools/nixery/server/builder/state.go
parent313e5d08f12f4c8573e9347f7f04493ab99b5abf (diff)
feat(server): Reimplement local manifest cache backed by files
Implements a local manifest cache that uses the temporary directory to
cache manifest builds.

This is necessary due to the size of manifests: Keeping them entirely
in-memory would quickly balloon the memory usage of Nixery, unless
some mechanism for cache eviction is implemented.
Diffstat (limited to 'tools/nixery/server/builder/state.go')
-rw-r--r--tools/nixery/server/builder/state.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/nixery/server/builder/state.go b/tools/nixery/server/builder/state.go
deleted file mode 100644
index 1c7f58821b6b..000000000000
--- a/tools/nixery/server/builder/state.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package builder
-
-import (
-	"cloud.google.com/go/storage"
-	"github.com/google/nixery/config"
-	"github.com/google/nixery/layers"
-)
-
-// State holds the runtime state that is carried around in Nixery and
-// passed to builder functions.
-type State struct {
-	Bucket *storage.BucketHandle
-	Cache  LocalCache
-	Cfg    config.Config
-	Pop    layers.Popularity
-}
-
-func NewState(bucket *storage.BucketHandle, cfg config.Config) State {
-	return State{
-		Bucket: bucket,
-		Cfg:    cfg,
-		Cache:  NewCache(),
-	}
-}