shad-go/distbuild/pkg/artifact/cache.go

41 lines
816 B
Go
Raw Normal View History

2020-03-10 12:08:59 +00:00
package artifact
import (
"errors"
"net/http"
"gitlab.com/slon/shad-go/distbuild/pkg/build"
)
var (
ErrNotFound = errors.New("file not found")
ErrWriteLocked = errors.New("file is locked for write")
ErrReadLocked = errors.New("file is locked for read")
)
type Cache struct{}
func NewCache(root string) (*Cache, error) {
2020-03-11 22:46:45 +00:00
return &Cache{}, nil
2020-03-10 12:08:59 +00:00
}
func (c *Cache) Range(artifactFn func(file build.ID) error) error {
panic("implement me")
}
func (c *Cache) Remove(artifact build.ID) error {
panic("implement me")
}
func (c *Cache) Create(artifact build.ID) (path string, abort, commit func(), err error) {
panic("implement me")
}
func (c *Cache) Get(file build.ID) (path string, unlock func(), err error) {
panic("implement me")
}
func NewHandler(c *Cache) http.Handler {
panic("implement me")
}