Documentation
¶
Index ¶
- func IsInvalidConfig(err error) bool
- type Config
- type Storage
- func (s *Storage) Boot(ctx context.Context) error
- func (s *Storage) Delete(ctx context.Context, k microstorage.K) error
- func (s *Storage) Exists(ctx context.Context, k microstorage.K) (bool, error)
- func (s *Storage) List(ctx context.Context, k microstorage.K) ([]microstorage.KV, error)
- func (s *Storage) Put(ctx context.Context, kv microstorage.KV) error
- func (s *Storage) Search(ctx context.Context, k microstorage.K) (microstorage.KV, error)
- type TPOConfig
- type TPRConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type Config ¶
type Config struct {
K8sClient kubernetes.Interface
Logger micrologger.Logger
// TPR is the third party resource where data objects are stored.
TPR TPRConfig
// TPOName is the third party object used to store data. This object
// will be created inside a third party resource specified by TPR. If
// the object already exists it will be reused. It is safe to run
// multiple Storage instances using the same TPO.
TPO TPOConfig
}
func DefaultConfig ¶
func DefaultConfig() Config
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func New ¶
New creates an uninitialized instance of Storage. It is required to call Boot functions before running any RW operations.
func (*Storage) Boot ¶
Boot initializes the Storage by ensuring Kubernetes resources used by the Storage are in place. It is safe to call Boot more than once.
func (*Storage) List ¶
func (s *Storage) List(ctx context.Context, k microstorage.K) ([]microstorage.KV, error)
func (*Storage) Search ¶
func (s *Storage) Search(ctx context.Context, k microstorage.K) (microstorage.KV, error)
Click to show internal directories.
Click to hide internal directories.