Documentation
¶
Index ¶
- func MakeCountingUpdater(i *int, d time.Duration, p bool) snapshot.Updater
- func MakeInvalidCheckouter() snapshot.Checkouter
- func MakeInvalidFiler() snapshot.Filer
- func MakeInvalidFilerUpdater(updater snapshot.Updater) snapshot.Filer
- func MakeNoopCheckouter(path string) snapshot.Checkouter
- func MakeNoopFiler(path string) snapshot.Filer
- func MakeTempCheckouter(tmp *temp.TempDir) snapshot.Checkouter
- func MakeTempCheckouterFiler(tmp *temp.TempDir) snapshot.Filer
- func MakeTempFiler(tmp *temp.TempDir) snapshot.Filer
- func Module() ice.Module
- type CountingUpdater
- type FakeContents
- func (f *FakeContents) Close() error
- func (f *FakeContents) IsDir() bool
- func (f *FakeContents) IsExec() bool
- func (f *FakeContents) ReadAll() ([]byte, error)
- func (f *FakeContents) ReadAt(p []byte, off int64) (int, error)
- func (f *FakeContents) Size() int64
- func (f *FakeContents) Type() snapshot.FileType
- type FakeDir
- type FakeFile
- type FakeSnapshot
- func (s *FakeSnapshot) Id() string
- func (s *FakeSnapshot) Lstat(name string) (snapshot.FileInfo, error)
- func (s *FakeSnapshot) Open(path string) (snapshot.File, error)
- func (s *FakeSnapshot) Readdirents(name string) ([]snapshot.Dirent, error)
- func (s *FakeSnapshot) Readlink(name string) (string, error)
- func (s *FakeSnapshot) Stat(name string) (snapshot.FileInfo, error)
- type FilerFacade
- type NoopIngester
- type NoopUpdater
- type ViewServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeCountingUpdater ¶
func MakeInvalidCheckouter ¶
func MakeInvalidCheckouter() snapshot.Checkouter
Create a Checkouter that essentially does nothing, based on a static path
func MakeInvalidFilerUpdater ¶
Make invalid filer with an updater
func MakeNoopCheckouter ¶
func MakeNoopCheckouter(path string) snapshot.Checkouter
func MakeNoopFiler ¶
func MakeTempCheckouter ¶
func MakeTempCheckouter(tmp *temp.TempDir) snapshot.Checkouter
MakeTempCheckouter creates a new Checkouter that always checks out by creating a new, empty temp dir
func MakeTempCheckouterFiler ¶
Make a Filer that can Checkout() but does a noop Ingest().
func MakeTempFiler ¶
Creates a filer that copies ingested paths in and then back out for checkouts.
Types ¶
type CountingUpdater ¶
type CountingUpdater struct {
// contains filtered or unexported fields
}
func (*CountingUpdater) Unpause ¶
func (c *CountingUpdater) Unpause()
func (*CountingUpdater) Update ¶
func (c *CountingUpdater) Update() error
update waits on unpauseCh Unpause just sends to unpauseCh (which means Update() should be running when we hit unpause) WFUR should wait on an updateRunningCh, that Update() sends to.
func (*CountingUpdater) UpdateInterval ¶
func (c *CountingUpdater) UpdateInterval() time.Duration
func (*CountingUpdater) WaitForUpdateRunning ¶
func (c *CountingUpdater) WaitForUpdateRunning()
type FakeContents ¶
func NewContents ¶
func NewContents(contents string, exec bool) *FakeContents
func (*FakeContents) Close ¶
func (f *FakeContents) Close() error
func (*FakeContents) IsDir ¶
func (f *FakeContents) IsDir() bool
func (*FakeContents) IsExec ¶
func (f *FakeContents) IsExec() bool
func (*FakeContents) ReadAll ¶
func (f *FakeContents) ReadAll() ([]byte, error)
func (*FakeContents) Size ¶
func (f *FakeContents) Size() int64
func (*FakeContents) Type ¶
func (f *FakeContents) Type() snapshot.FileType
type FakeSnapshot ¶
func NewSnapshot ¶
func NewSnapshot(root *FakeDir, id string) *FakeSnapshot
func (*FakeSnapshot) Id ¶
func (s *FakeSnapshot) Id() string
func (*FakeSnapshot) Readdirents ¶
func (s *FakeSnapshot) Readdirents(name string) ([]snapshot.Dirent, error)
type FilerFacade ¶
FilerFacade creates a Filer from a Checkouter and Ingester
func MakeFilerFacade ¶
func MakeFilerFacade( checkouter snapshot.Checkouter, ingester snapshot.Ingester, updater snapshot.Updater) *FilerFacade
Make a Filer from a Checkouter and Ingester
type NoopUpdater ¶
type NoopUpdater struct{}
func (*NoopUpdater) Update ¶
func (n *NoopUpdater) Update() error
func (*NoopUpdater) UpdateInterval ¶
func (n *NoopUpdater) UpdateInterval() time.Duration
type ViewServer ¶
type ViewServer struct {
// contains filtered or unexported fields
}
ViewServer allows viewing files in a Snapshot
func NewViewServer ¶
func NewViewServer(db snapshot.DB) *ViewServer
NewViewServer creates a new ViewServer to serve snapshots in DB
func (*ViewServer) ServeHTTP ¶
func (s *ViewServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
Serve requests to View files in a Snapshot