Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cache): based on JSON #398

Merged
merged 38 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c5e36a8
refactor(docker_conf): rename and remove unnecessary options
knqyf263 Feb 18, 2020
ab732a3
feat(rpc): define new API
knqyf263 Feb 18, 2020
7eea5a8
fix(cli): change default timeout
knqyf263 Feb 18, 2020
15a22c3
fix(import): fix package names
knqyf263 Feb 18, 2020
208b7dc
refactor(vulnerability): remove old mock
knqyf263 Feb 18, 2020
3ced448
refactor(utils): remove un-needed functions
knqyf263 Feb 18, 2020
6719c1f
feat(cache): implement cache communicating with a server
knqyf263 Feb 18, 2020
7924697
refactor(scan): separate scan function as local scanner
knqyf263 Feb 18, 2020
c02cd87
test(scanner): add tests for ScanImage
knqyf263 Feb 18, 2020
677b1d1
refactor(scan): remove unused options
knqyf263 Feb 18, 2020
910047c
test(vulnerability): generate mock
knqyf263 Feb 18, 2020
1eda5a8
refactor(server): split a file
knqyf263 Feb 18, 2020
b938ff4
feat(server): implement new RPC server
knqyf263 Feb 18, 2020
31237ac
feat(client): implement new RPC client
knqyf263 Feb 18, 2020
8b78034
fix(cache): use new cache interface
knqyf263 Feb 18, 2020
6e64e14
fix(standalone): use new scanner
knqyf263 Feb 18, 2020
cdcf869
fix(client): use new scanner
knqyf263 Feb 18, 2020
3afb268
fix(server): pass cache
knqyf263 Feb 18, 2020
f85e2b8
test(integration): make sure an error is not nil before calling the m…
knqyf263 Feb 18, 2020
6fe8060
fix(mod): update dependencies
knqyf263 Feb 18, 2020
12952ea
test(integration): ensure the image load finishes
knqyf263 Feb 18, 2020
703a2d8
chore(mod): update dependencies
knqyf263 Feb 19, 2020
4886cff
feat(docker): support DOCKER_HOST and DOCKER_CERT_PATH
knqyf263 Feb 19, 2020
f13a6e4
refactor(rpc): remove old client
knqyf263 Feb 19, 2020
3612dd9
feat(server): support old API for backward compatibility
knqyf263 Feb 19, 2020
570e894
fix(server): check a schema version of JSON cache
knqyf263 Feb 19, 2020
69db850
fix(rpc): add a version to packages
knqyf263 Feb 19, 2020
9078aea
feat(rpc): add PutImage
knqyf263 Feb 21, 2020
d30907e
test: rename expectations
knqyf263 Feb 21, 2020
fd6af16
refactor(cache): rename LayerCache to ImageCache
knqyf263 Feb 21, 2020
1e7760f
refactor: rename ImageInfo to ImageReference
knqyf263 Feb 21, 2020
43b209e
fix(applier): pass image_id to ApplyLayer
knqyf263 Feb 21, 2020
8bb63c0
feat(cache): handle image cache
knqyf263 Feb 21, 2020
2dd6bab
chore(mod): update dependencies
knqyf263 Feb 21, 2020
4ee45ce
refactor(server): pass only config
knqyf263 Feb 21, 2020
f0ae709
feat(cli): add -removed-pkgs option
knqyf263 Feb 21, 2020
8b1ee9f
Merge branch 'master' into json_cache
knqyf263 Feb 27, 2020
0debb97
refactor(err): wrap errors
knqyf263 Feb 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(rpc): add PutImage
  • Loading branch information
knqyf263 committed Feb 21, 2020
commit 9078aea2c73f4cb1fc1104e7bada5bc5954c6c70
6 changes: 3 additions & 3 deletions pkg/rpc/server/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
dbFile "github.com/aquasecurity/trivy/pkg/db"
"github.com/aquasecurity/trivy/pkg/log"
"github.com/aquasecurity/trivy/pkg/utils"
rpcCache "github.com/aquasecurity/trivy/rpc/cache"
"github.com/aquasecurity/trivy/rpc/detector"
rpcDetector "github.com/aquasecurity/trivy/rpc/detector"
rpcLayer "github.com/aquasecurity/trivy/rpc/layer"
rpcScanner "github.com/aquasecurity/trivy/rpc/scanner"
)

Expand Down Expand Up @@ -63,8 +63,8 @@ func ListenAndServe(addr string, c config.Config, fsCache cache.FSCache) error {
scanHandler := rpcScanner.NewScannerServer(initializeScanServer(fsCache), nil)
mux.Handle(rpcScanner.ScannerPathPrefix, withToken(withWaitGroup(scanHandler), c.Token, c.TokenHeader))

layerHandler := rpcLayer.NewLayerServer(NewLayerServer(fsCache), nil)
mux.Handle(rpcLayer.LayerPathPrefix, withToken(withWaitGroup(layerHandler), c.Token, c.TokenHeader))
layerHandler := rpcCache.NewCacheServer(NewCacheServer(fsCache), nil)
mux.Handle(rpcCache.CachePathPrefix, withToken(withWaitGroup(layerHandler), c.Token, c.TokenHeader))

// osHandler is for backward compatibility
osHandler := rpcDetector.NewOSDetectorServer(initializeOspkgServer(), nil)
Expand Down
Loading