Documentation
¶
Index ¶
- Constants
- Variables
- type Creator
- type Deletor
- type Driver
- type File
- func (f *File) Create(idx *v1.WatcherDetails) error
- func (f *File) Delete(id string) (*v1.WatcherDetails, error)
- func (f *File) Get(id string) (*v1.WatcherDetails, error)
- func (f *File) GetInfo(p string) (*v1.WatcherDetails, error)
- func (f *File) List() ([]*v1.WatcherDetails, error)
- func (f *File) Name() string
- func (f *File) Update(idx *v1.WatcherDetails) error
- type GCS
- func (g *GCS) Create(idx *v1.WatcherDetails) error
- func (g *GCS) Delete(id string) (watcher *v1.WatcherDetails, err error)
- func (g *GCS) Get(id string) (*v1.WatcherDetails, error)
- func (g *GCS) GetInfo(p string) (*v1.WatcherDetails, error)
- func (g *GCS) List() ([]*v1.WatcherDetails, error)
- func (g *GCS) Name() string
- func (g *GCS) Update(idx *v1.WatcherDetails) error
- type Queryor
- type StoreDriverError
- type Updator
Constants ¶
const (
FileDriverName = "File"
)
const (
GCSDriverName = "GCS"
)
Variables ¶
var ( //ErrIndexNotFound indicates that an index is not found ErrIndexNotFound = errors.New("index: not found") // ErrIndexExists indicates that a release already exists. ErrIndexExists = errors.New("index: already exists") // ErrDeletingIndex indicates that a release already exists. ErrDeletingIndex = errors.New("index: failed to delete") // ErrDeletingIndex indicates that a release already exists. ErrUnknown = errors.New("unknown failure") )
Functions ¶
This section is empty.
Types ¶
type Creator ¶
type Creator interface {
Create(idx *v1.WatcherDetails) error
}
// Creator is the interface that wraps the Create method. // // Create stores the index or returns ErrIndexExists // if an identical index already exists.
type Deletor ¶
type Deletor interface {
Delete(string) (*v1.WatcherDetails, error)
}
// Delete is the interface that wraps the Delete method. // // Delete remove the index or returns ErrIndexNotFound // if
type Driver ¶
Driver is the interface composed of Creator, Updator, interfaces. It defines the behavior for storing, updating, the watcher index from some underlying storage mechanism, e.g. gcs, local disk.
type File ¶
type File struct {
// contains filtered or unexported fields
}
type GCS ¶
type GCS struct { Client *gcp.HTTPClient // contains filtered or unexported fields }
type Queryor ¶
type Queryor interface { Get(string) (*v1.WatcherDetails, error) GetInfo(string) (*v1.WatcherDetails, error) // Get(key string) (*index.Watch, error) List() ([]*v1.WatcherDetails, error) }
Queryor is the interface that wraps the Get and List methods.
Get returns the index named by key or returns ErrIndexNotFound if the index does not exist.
List returns the set of all index that satisfy the filter predicate.
Query returns the set of all index that match the provided label set.
type StoreDriverError ¶
func (*StoreDriverError) Error ¶
func (e *StoreDriverError) Error() string
func (*StoreDriverError) Unwrap ¶
func (e *StoreDriverError) Unwrap() error
type Updator ¶
type Updator interface {
Update(idx *v1.WatcherDetails) error
}
Updator is the interface that wraps the Update method.
Update updates an existing index or returns ErrIndexNotFound if the index does not exist.