2022-02-10 22:06:57 +00:00
|
|
|
//go:build !solution
|
2020-04-05 13:24:48 +00:00
|
|
|
|
2020-03-10 12:08:59 +00:00
|
|
|
package filecache
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"gitlab.com/slon/shad-go/distbuild/pkg/build"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrNotFound = errors.New("file not found")
|
2020-04-04 18:45:29 +00:00
|
|
|
ErrExists = errors.New("file exists")
|
2020-03-10 12:08:59 +00:00
|
|
|
ErrWriteLocked = errors.New("file is locked for write")
|
|
|
|
ErrReadLocked = errors.New("file is locked for read")
|
|
|
|
)
|
|
|
|
|
|
|
|
type Cache struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func New(rootDir string) (*Cache, error) {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Cache) Range(fileFn func(file build.ID) error) error {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Cache) Remove(file build.ID) error {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-29 20:35:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Cache) Write(file build.ID) (w io.WriteCloser, abort func() error, err error) {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Cache) Get(file build.ID) (path string, unlock func(), err error) {
|
2020-04-05 13:24:48 +00:00
|
|
|
panic("implement me")
|
2020-03-10 12:08:59 +00:00
|
|
|
}
|