added metadata helper tool
This commit is contained in:
parent
29293532a6
commit
28232d976b
299 changed files with 161208 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ import (
|
|||
|
||||
type FS struct {
|
||||
log logr.Logger
|
||||
done chan struct{}
|
||||
cancel func()
|
||||
NoCache http.Handler
|
||||
src string
|
||||
|
|
@ -45,6 +46,7 @@ func NewFS(quota int64, max int, src, dst, metadata string, log logr.Logger) (fs
|
|||
|
||||
fs = &FS{
|
||||
log: log,
|
||||
done: make(chan struct{}),
|
||||
cancel: cancel,
|
||||
NoCache: http.FileServer(http.Dir(src)),
|
||||
src: src,
|
||||
|
|
@ -249,6 +251,7 @@ func (fs *FS) CacheStatus(name string) int {
|
|||
|
||||
func (fs *FS) Close() {
|
||||
fs.cancel()
|
||||
<-fs.done
|
||||
}
|
||||
|
||||
func dirEmpty(name string) (bool, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue