Documentation ¶
Overview ¶
Package disk provides an implementation of the storage used in Vervet Underground that uses a local filesystem. It's not intended for production use, but as a functionally complete reference implementation that can be used to validate the other parts of the VU system.
Index ¶
- func New(path string, options ...Option) storage.Storage
- type Option
- type Storage
- func (s *Storage) Cleanup() error
- func (s *Storage) CollateVersions(ctx context.Context, serviceFilter map[string]bool) error
- func (s *Storage) GetCollatedVersionSpec(version string) ([]byte, error)
- func (s *Storage) GetObject(key string) ([]byte, error)
- func (s *Storage) GetObjectWithMetadata(key string) (*objectMeta, error)
- func (s *Storage) HasVersion(ctx context.Context, name string, version string, digest string) (bool, error)
- func (s *Storage) ListObjects(ctx context.Context, key string) ([]string, error)
- func (s *Storage) NotifyVersion(ctx context.Context, name string, version string, contents []byte, ...) error
- func (s *Storage) NotifyVersions(ctx context.Context, name string, versions []string, scrapeTime time.Time) error
- func (s *Storage) PutObject(key string, body []byte, timestamp *time.Time) error
- func (s *Storage) Version(ctx context.Context, version string) ([]byte, error)
- func (s *Storage) VersionIndex(ctx context.Context) (vervet.VersionIndex, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) CollateVersions ¶
CollateVersions aggregates versions and revisions from all the services, and produces unified versions and merged specs for all APIs.
func (*Storage) GetCollatedVersionSpec ¶
GetCollatedVersionSpec retrieves a single collated vervet.Version and returns the JSON blob.
func (*Storage) GetObjectWithMetadata ¶
func (*Storage) HasVersion ¶
func (s *Storage) HasVersion(ctx context.Context, name string, version string, digest string) (bool, error)
HasVersion implements scraper.Storage.
func (*Storage) ListObjects ¶
ListObjects gets all objects under a given directory.
func (*Storage) NotifyVersion ¶
func (s *Storage) NotifyVersion(ctx context.Context, name string, version string, contents []byte, scrapeTime time.Time, ) error
NotifyVersion implements scraper.Storage.
func (*Storage) NotifyVersions ¶
func (s *Storage) NotifyVersions(ctx context.Context, name string, versions []string, scrapeTime time.Time) error
NotifyVersions implements scraper.Storage.