Documentation ¶
Overview ¶
Package files declares the FileStore interface and implements a single in-memory FileStore
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("file data not found")
ErrNotFound is an error indicating that a requested file's data could not be found in a FileStore.
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore interface { // FileData returns the data for the file described by the given path and // digest. Returns a NotFound error if the file data could not be found. FileData(path, digest string) ([]byte, error) }
FileStore refers to an open Kythe file storage server.
type InMemoryStore ¶
InMemoryStore is a FileStore that serves files based on an in-memory map from digest to file contents.
func (InMemoryStore) AddData ¶
func (s InMemoryStore) AddData(files ...*apb.FileData) error
AddData adds each FileData to the InMemoryStore based on their digests.
func (InMemoryStore) ClearData ¶
func (s InMemoryStore) ClearData()
ClearData removes all file data contained within the InMemoryStore.
Click to show internal directories.
Click to hide internal directories.