Functional options for NewRegistryWithDriver
Clean up calling convention for NewRegistryWithDriver to use functional arguments. This is a first step towards the refactor described in #215. I plan to add additional options in the process of moving configurable items from the App structure to the registry structure. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
ed7cc91e6f
commit
dbbcf5fe42
9 changed files with 149 additions and 47 deletions
|
@ -18,7 +18,10 @@ import (
|
|||
|
||||
func TestListener(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
registry := storage.NewRegistryWithDriver(ctx, inmemory.New(), memory.NewInMemoryBlobDescriptorCacheProvider(), true, true, false)
|
||||
registry, err := storage.NewRegistry(ctx, inmemory.New(), storage.BlobDescriptorCacheProvider(memory.NewInMemoryBlobDescriptorCacheProvider()), storage.EnableDelete, storage.EnableRedirect)
|
||||
if err != nil {
|
||||
t.Fatalf("error creating registry: %v", err)
|
||||
}
|
||||
tl := &testListener{
|
||||
ops: make(map[string]int),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue