Documentation
¶
Overview ¶
Package store provides a state storage interface and implementations for the Rune platform.
Index ¶
- func IsAlreadyExistsError(err error) bool
- func IsNotFoundError(err error) bool
- func MakeKey(resourceType types.ResourceType, namespace, name string) []byte
- func MakePrefix(resourceType types.ResourceType, namespace string) []byte
- func MakeVersionKey(resourceType types.ResourceType, namespace, name, version string) []byte
- func MakeVersionPrefix(resourceType types.ResourceType, namespace, name string) []byte
- func ParseKey(key []byte) (resourceType, namespace, name string, ok bool)
- func ParseVersionKey(key []byte) (resourceType, namespace, name, version string, ok bool)
- func ResourceTypes() []string
- func UnmarshalResource(source interface{}, target interface{}) error
- type BadgerStore
- func (s *BadgerStore) Close() error
- func (s *BadgerStore) Create(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *BadgerStore) CreateResource(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
- func (s *BadgerStore) Delete(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *BadgerStore) Get(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *BadgerStore) GetHistory(ctx context.Context, resourceType types.ResourceType, namespace string, ...) ([]HistoricalVersion, error)
- func (s *BadgerStore) GetInstanceByID(ctx context.Context, namespace string, instanceID string) (*types.Instance, error)
- func (s *BadgerStore) GetLimits() (Limits, Limits)
- func (s *BadgerStore) GetOpts() StoreOptions
- func (s *BadgerStore) GetVersion(ctx context.Context, resourceType types.ResourceType, namespace string, ...) (interface{}, error)
- func (s *BadgerStore) List(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *BadgerStore) ListAll(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
- func (s *BadgerStore) Open(path string) error
- func (s *BadgerStore) Transaction(ctx context.Context, fn func(tx Transaction) error) error
- func (s *BadgerStore) Update(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *BadgerStore) Watch(ctx context.Context, resourceType types.ResourceType, namespace string) (<-chan WatchEvent, error)
- type BadgerTransaction
- func (t *BadgerTransaction) Create(resourceType types.ResourceType, namespace string, name string, ...) error
- func (t *BadgerTransaction) Delete(resourceType types.ResourceType, namespace string, name string) error
- func (t *BadgerTransaction) Get(resourceType types.ResourceType, namespace string, name string, ...) error
- func (t *BadgerTransaction) Update(resourceType types.ResourceType, namespace string, name string, ...) error
- type EventSource
- type HistoricalVersion
- type Limits
- type MemoryStore
- func (m *MemoryStore) Close() error
- func (m *MemoryStore) Create(ctx context.Context, resourceType types.ResourceType, namespace, name string, ...) error
- func (m *MemoryStore) CreateResource(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
- func (m *MemoryStore) Delete(ctx context.Context, resourceType types.ResourceType, namespace, name string) error
- func (m *MemoryStore) EnsureNamespace(resourceType types.ResourceType, namespace string)
- func (m *MemoryStore) EnsureResourceType(resourceType types.ResourceType)
- func (m *MemoryStore) Get(ctx context.Context, resourceType types.ResourceType, namespace, name string, ...) error
- func (m *MemoryStore) GetHistory(ctx context.Context, resourceType types.ResourceType, namespace, name string) ([]HistoricalVersion, error)
- func (m *MemoryStore) GetInstanceByID(ctx context.Context, namespace, instanceID string) (*types.Instance, error)
- func (m *MemoryStore) GetOpts() StoreOptions
- func (m *MemoryStore) GetVersion(ctx context.Context, resourceType types.ResourceType, ...) (interface{}, error)
- func (m *MemoryStore) List(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (m *MemoryStore) ListAll(ctx context.Context, resourceType types.ResourceType, value interface{}) error
- func (m *MemoryStore) Open(dbPath string) error
- func (m *MemoryStore) Transaction(ctx context.Context, fn func(ctx Transaction) error) error
- func (m *MemoryStore) Update(ctx context.Context, resourceType types.ResourceType, namespace, name string, ...) error
- func (m *MemoryStore) Watch(ctx context.Context, resourceType types.ResourceType, namespace string) (<-chan WatchEvent, error)
- type MockStore
- func (m *MockStore) Close() error
- func (m *MockStore) Create(ctx context.Context, resourceType, namespace, name string, value interface{}) error
- func (m *MockStore) Delete(ctx context.Context, resourceType, namespace, name string) error
- func (m *MockStore) Get(ctx context.Context, resourceType, namespace, name string, value interface{}) error
- func (m *MockStore) GetHistory(ctx context.Context, resourceType, namespace, name string) ([]HistoricalVersion, error)
- func (m *MockStore) GetVersion(ctx context.Context, resourceType, namespace, name, version string) (interface{}, error)
- func (m *MockStore) List(ctx context.Context, resourceType, namespace string) ([]interface{}, error)
- func (m *MockStore) Open(dbPath string) error
- func (m *MockStore) Transaction(ctx context.Context, fn func(ctx Transaction) error) error
- func (m *MockStore) Update(ctx context.Context, resourceType, namespace, name string, value interface{}) error
- func (m *MockStore) Watch(ctx context.Context, resourceType, namespace string) (<-chan WatchEvent, error)
- type Store
- type StoreOptions
- type TestStore
- func (s *TestStore) Close() error
- func (s *TestStore) Create(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *TestStore) CreateInstance(ctx context.Context, instance *types.Instance) error
- func (s *TestStore) CreateResource(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
- func (s *TestStore) CreateService(ctx context.Context, service *types.Service) error
- func (s *TestStore) Delete(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *TestStore) Get(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *TestStore) GetHistory(ctx context.Context, resourceType types.ResourceType, namespace string, ...) ([]HistoricalVersion, error)
- func (s *TestStore) GetInstanceByID(ctx context.Context, namespace, id string) (*types.Instance, error)
- func (s *TestStore) GetOpts() StoreOptions
- func (s *TestStore) GetService(ctx context.Context, namespace, name string) (*types.Service, error)
- func (s *TestStore) GetVersion(ctx context.Context, resourceType types.ResourceType, namespace string, ...) (interface{}, error)
- func (s *TestStore) List(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *TestStore) ListAll(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
- func (s *TestStore) ListInstances(ctx context.Context, namespace string) ([]types.Instance, error)
- func (s *TestStore) ListServices(ctx context.Context, namespace string) ([]*types.Service, error)
- func (s *TestStore) Open(path string) error
- func (s *TestStore) Reset()
- func (s *TestStore) SetupTestData(resources map[types.ResourceType]map[string]map[string]interface{}) error
- func (s *TestStore) Transaction(ctx context.Context, fn func(tx Transaction) error) error
- func (s *TestStore) Update(ctx context.Context, resourceType types.ResourceType, namespace string, ...) error
- func (s *TestStore) Watch(ctx context.Context, resourceType types.ResourceType, namespace string) (<-chan WatchEvent, error)
- type Transaction
- type UpdateOption
- type UpdateOptions
- type WatchEvent
- type WatchEventType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAlreadyExistsError ¶
IsAlreadyExistsError checks if an error is an already exists error.
func IsNotFoundError ¶
IsNotFoundError checks if an error is a not found error.
func MakeKey ¶
func MakeKey(resourceType types.ResourceType, namespace, name string) []byte
MakeKey creates a standardized key for a resource.
func MakePrefix ¶
func MakePrefix(resourceType types.ResourceType, namespace string) []byte
MakePrefix creates a prefix for listing resources by type and namespace.
func MakeVersionKey ¶
func MakeVersionKey(resourceType types.ResourceType, namespace, name, version string) []byte
MakeVersionKey creates a standardized key for a resource version.
func MakeVersionPrefix ¶
func MakeVersionPrefix(resourceType types.ResourceType, namespace, name string) []byte
MakeVersionPrefix creates a prefix for listing resource versions.
func ParseVersionKey ¶
ParseVersionKey parses a version key into its components.
func ResourceTypes ¶
func ResourceTypes() []string
ResourceTypes returns a slice of the standard resource types used in the system.
func UnmarshalResource ¶
func UnmarshalResource(source interface{}, target interface{}) error
UnmarshalResource converts a resource interface to a target type using JSON marshaling/unmarshaling. This is useful for converting between different types that share the same JSON structure. The function handles the conversion by first marshaling the source to JSON and then unmarshaling into the target type.
Types ¶
type BadgerStore ¶
type BadgerStore struct {
// contains filtered or unexported fields
}
BadgerStore implements the Store interface using BadgerDB.
func NewBadgerStore ¶
func NewBadgerStore(logger log.Logger) *BadgerStore
NewBadgerStore creates a new BadgerDB-backed store.
func NewBadgerStoreWithOptions ¶
func NewBadgerStoreWithOptions(logger log.Logger, opts StoreOptions) *BadgerStore
NewBadgerStoreWithOptions creates a BadgerStore with options
func (*BadgerStore) Create ¶
func (s *BadgerStore) Create(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}) error
Create creates a new resource.
func (*BadgerStore) CreateResource ¶
func (s *BadgerStore) CreateResource(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
func (*BadgerStore) Delete ¶
func (s *BadgerStore) Delete(ctx context.Context, resourceType types.ResourceType, namespace string, name string) error
Delete deletes a resource.
func (*BadgerStore) Get ¶
func (s *BadgerStore) Get(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}) error
Get retrieves a resource.
func (*BadgerStore) GetHistory ¶
func (s *BadgerStore) GetHistory(ctx context.Context, resourceType types.ResourceType, namespace string, name string) ([]HistoricalVersion, error)
GetHistory retrieves historical versions of a resource.
func (*BadgerStore) GetInstanceByID ¶
func (s *BadgerStore) GetInstanceByID(ctx context.Context, namespace string, instanceID string) (*types.Instance, error)
GetInstance retrieves an instance by namespace and instanceID.
func (*BadgerStore) GetLimits ¶
func (s *BadgerStore) GetLimits() (Limits, Limits)
GetLimits returns configured limits for secrets and configs
func (*BadgerStore) GetOpts ¶
func (s *BadgerStore) GetOpts() StoreOptions
GetOpts returns the configured store options
func (*BadgerStore) GetVersion ¶
func (s *BadgerStore) GetVersion(ctx context.Context, resourceType types.ResourceType, namespace string, name string, version string) (interface{}, error)
GetVersion retrieves a specific version of a resource.
func (*BadgerStore) List ¶
func (s *BadgerStore) List(ctx context.Context, resourceType types.ResourceType, namespace string, resource interface{}) error
List retrieves all resources of a given type in a namespace.
func (*BadgerStore) ListAll ¶
func (s *BadgerStore) ListAll(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
ListAll retrieves all resources of a given type in all namespaces.
func (*BadgerStore) Open ¶
func (s *BadgerStore) Open(path string) error
Open opens the BadgerDB database.
func (*BadgerStore) Transaction ¶
func (s *BadgerStore) Transaction(ctx context.Context, fn func(tx Transaction) error) error
Transaction executes multiple operations in a single transaction.
func (*BadgerStore) Update ¶
func (s *BadgerStore) Update(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}, opts ...UpdateOption) error
Update updates an existing resource.
func (*BadgerStore) Watch ¶
func (s *BadgerStore) Watch(ctx context.Context, resourceType types.ResourceType, namespace string) (<-chan WatchEvent, error)
Watch sets up a watch for changes to resources of a given type.
type BadgerTransaction ¶
type BadgerTransaction struct {
// contains filtered or unexported fields
}
BadgerTransaction implements the Transaction interface.
func (*BadgerTransaction) Create ¶
func (t *BadgerTransaction) Create(resourceType types.ResourceType, namespace string, name string, resource interface{}) error
Create creates a resource within the transaction.
func (*BadgerTransaction) Delete ¶
func (t *BadgerTransaction) Delete(resourceType types.ResourceType, namespace string, name string) error
Delete deletes a resource within the transaction.
func (*BadgerTransaction) Get ¶
func (t *BadgerTransaction) Get(resourceType types.ResourceType, namespace string, name string, resource interface{}) error
Get retrieves a resource within the transaction.
func (*BadgerTransaction) Update ¶
func (t *BadgerTransaction) Update(resourceType types.ResourceType, namespace string, name string, resource interface{}) error
Update updates a resource within the transaction.
type EventSource ¶
type EventSource string
const ( EventSourceOrchestrator EventSource = "orchestrator" EventSourceAPI EventSource = "api" EventSourceReconciler EventSource = "reconciler" EventSourceHealthController EventSource = "health-controller" )
type HistoricalVersion ¶
type HistoricalVersion struct {
// Version is the version identifier.
Version string
// Timestamp is when this version was created.
Timestamp time.Time
// Resource is the resource data for this version.
Resource interface{}
}
HistoricalVersion represents a historical version of a resource.
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore is a simple in-memory implementation of the Store interface for testing.
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
NewMemoryStore creates a new in-memory store.
func (*MemoryStore) Create ¶
func (m *MemoryStore) Create(ctx context.Context, resourceType types.ResourceType, namespace, name string, value interface{}) error
Create creates an object in the memory store.
func (*MemoryStore) CreateResource ¶
func (m *MemoryStore) CreateResource(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
func (*MemoryStore) Delete ¶
func (m *MemoryStore) Delete(ctx context.Context, resourceType types.ResourceType, namespace, name string) error
Delete deletes an object from the memory store.
func (*MemoryStore) EnsureNamespace ¶
func (m *MemoryStore) EnsureNamespace(resourceType types.ResourceType, namespace string)
EnsureNamespace ensures that a namespace exists for a resource type
func (*MemoryStore) EnsureResourceType ¶
func (m *MemoryStore) EnsureResourceType(resourceType types.ResourceType)
EnsureResourceType ensures that a resource type exists in the store
func (*MemoryStore) Get ¶
func (m *MemoryStore) Get(ctx context.Context, resourceType types.ResourceType, namespace, name string, value interface{}) error
Get retrieves an object from the memory store.
func (*MemoryStore) GetHistory ¶
func (m *MemoryStore) GetHistory(ctx context.Context, resourceType types.ResourceType, namespace, name string) ([]HistoricalVersion, error)
func (*MemoryStore) GetInstanceByID ¶
func (m *MemoryStore) GetInstanceByID(ctx context.Context, namespace, instanceID string) (*types.Instance, error)
GetInstance retrieves an instance by ID.
func (*MemoryStore) GetOpts ¶
func (m *MemoryStore) GetOpts() StoreOptions
GetOpts returns zero-value options for memory store
func (*MemoryStore) GetVersion ¶
func (m *MemoryStore) GetVersion(ctx context.Context, resourceType types.ResourceType, namespace, name, version string) (interface{}, error)
func (*MemoryStore) List ¶
func (m *MemoryStore) List(ctx context.Context, resourceType types.ResourceType, namespace string, value interface{}) error
List lists objects from the memory store.
func (*MemoryStore) ListAll ¶
func (m *MemoryStore) ListAll(ctx context.Context, resourceType types.ResourceType, value interface{}) error
func (*MemoryStore) Open ¶
func (m *MemoryStore) Open(dbPath string) error
Open initializes the memory store.
func (*MemoryStore) Transaction ¶
func (m *MemoryStore) Transaction(ctx context.Context, fn func(ctx Transaction) error) error
func (*MemoryStore) Update ¶
func (m *MemoryStore) Update(ctx context.Context, resourceType types.ResourceType, namespace, name string, value interface{}, opts ...UpdateOption) error
Update updates an object in the memory store.
func (*MemoryStore) Watch ¶
func (m *MemoryStore) Watch(ctx context.Context, resourceType types.ResourceType, namespace string) (<-chan WatchEvent, error)
type MockStore ¶
func (*MockStore) GetHistory ¶
func (*MockStore) GetVersion ¶
func (*MockStore) Transaction ¶
type Store ¶
type Store interface {
// Open initializes and opens the store.
Open(path string) error
// Close closes the store and releases resources.
Close() error
// Create creates a new resource.
Create(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}) error
// CreateResource creates a new resource.
CreateResource(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
// Get retrieves a resource by type, namespace, and name.
Get(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}) error
// GetInstanceByID retrieves an instance by namespace and instanceID.
GetInstanceByID(ctx context.Context, namespace string, instanceID string) (*types.Instance, error)
// List retrieves all resources of a given type in a namespace.
List(ctx context.Context, resourceType types.ResourceType, namespace string, resource interface{}) error
// ListAll retrieves all resources of a given type in all namespaces.
ListAll(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
// Update updates an existing resource.
Update(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}, opts ...UpdateOption) error
// Delete deletes a resource.
Delete(ctx context.Context, resourceType types.ResourceType, namespace string, name string) error
// Watch sets up a watch for changes to resources of a given type.
Watch(ctx context.Context, resourceType types.ResourceType, namespace string) (<-chan WatchEvent, error)
// Transaction executes multiple operations in a single transaction.
Transaction(ctx context.Context, fn func(tx Transaction) error) error
// GetHistory retrieves historical versions of a resource.
GetHistory(ctx context.Context, resourceType types.ResourceType, namespace string, name string) ([]HistoricalVersion, error)
// GetVersion retrieves a specific version of a resource.
GetVersion(ctx context.Context, resourceType types.ResourceType, namespace string, name string, version string) (interface{}, error)
// GetOpts returns the store options/config in use
GetOpts() StoreOptions
}
Store defines the interface for state storage operations.
type StoreOptions ¶
type StoreOptions struct {
// Path is the directory path for Badger (if separate from Open arg)
Path string
// SecretEncryptionEnabled toggles secret at-rest encryption availability
SecretEncryptionEnabled bool
// KEKOptions configures loading the master key for wrapping secret DEKs
KEKOptions *crypto.KEKOptions
// KEKBytes is a precomputed KEK for tests
KEKBytes []byte
// Limits for secrets and configs
SecretLimits Limits
ConfigLimits Limits
}
StoreOptions configure the core store
type TestStore ¶
type TestStore struct {
// contains filtered or unexported fields
}
TestStore provides a simple in-memory implementation for testing purposes. Unlike MockStore, it doesn't require setting up expectations and is more convenient for basic tests that need a functional store.
func NewTestStoreWithOptions ¶
func NewTestStoreWithOptions(opts StoreOptions) *TestStore
NewTestStoreWithOptions creates a new TestStore instance with options
func (*TestStore) Create ¶
func (s *TestStore) Create(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}) error
Create implements the Store interface.
func (*TestStore) CreateInstance ¶
CreateInstance adds an instance to the test store
func (*TestStore) CreateResource ¶
func (*TestStore) CreateService ¶
CreateService adds a service to the test store
func (*TestStore) Delete ¶
func (s *TestStore) Delete(ctx context.Context, resourceType types.ResourceType, namespace string, name string) error
Delete implements the Store interface.
func (*TestStore) Get ¶
func (s *TestStore) Get(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}) error
Get implements the Store interface.
func (*TestStore) GetHistory ¶
func (s *TestStore) GetHistory(ctx context.Context, resourceType types.ResourceType, namespace string, name string) ([]HistoricalVersion, error)
GetHistory implements the Store interface.
func (*TestStore) GetInstanceByID ¶
func (s *TestStore) GetInstanceByID(ctx context.Context, namespace, id string) (*types.Instance, error)
GetInstance retrieves an instance from the test store
func (*TestStore) GetOpts ¶
func (s *TestStore) GetOpts() StoreOptions
GetOpts returns test store options
func (*TestStore) GetService ¶
GetService retrieves a service from the test store
func (*TestStore) GetVersion ¶
func (s *TestStore) GetVersion(ctx context.Context, resourceType types.ResourceType, namespace string, name string, version string) (interface{}, error)
GetVersion implements the Store interface.
func (*TestStore) List ¶
func (s *TestStore) List(ctx context.Context, resourceType types.ResourceType, namespace string, resource interface{}) error
List implements the Store interface.
func (*TestStore) ListAll ¶
func (s *TestStore) ListAll(ctx context.Context, resourceType types.ResourceType, resource interface{}) error
ListAll retrieves all resources of a given type in all namespaces.
func (*TestStore) ListInstances ¶
ListInstances returns all instances in a namespace
func (*TestStore) ListServices ¶
ListServices returns all services in a namespace
func (*TestStore) SetupTestData ¶
func (s *TestStore) SetupTestData(resources map[types.ResourceType]map[string]map[string]interface{}) error
SetupTestData adds predefined test data to the store
func (*TestStore) Transaction ¶
Transaction implements the Store interface.
func (*TestStore) Update ¶
func (s *TestStore) Update(ctx context.Context, resourceType types.ResourceType, namespace string, name string, resource interface{}, opts ...UpdateOption) error
Update implements the Store interface.
func (*TestStore) Watch ¶
func (s *TestStore) Watch(ctx context.Context, resourceType types.ResourceType, namespace string) (<-chan WatchEvent, error)
Watch implements the Store interface.
type Transaction ¶
type Transaction interface {
// Create creates a new resource within the transaction.
Create(resourceType types.ResourceType, namespace string, name string, resource interface{}) error
// Get retrieves a resource within the transaction.
Get(resourceType types.ResourceType, namespace string, name string, resource interface{}) error
// Update updates a resource within the transaction.
Update(resourceType types.ResourceType, namespace string, name string, resource interface{}) error
// Delete deletes a resource within the transaction.
Delete(resourceType types.ResourceType, namespace string, name string) error
}
Transaction represents a store transaction.
type UpdateOption ¶
type UpdateOption func(*UpdateOptions)
UpdateOption is a function that configures update options
func WithHealthController ¶
func WithHealthController() UpdateOption
WithHealthController marks an update as originating from the health controller
func WithOrchestrator ¶
func WithOrchestrator() UpdateOption
WithOrchestrator marks an update as originating from the orchestrator
func WithReconciler ¶
func WithReconciler() UpdateOption
WithReconciler marks an update as originating from the reconciler
func WithSource ¶
func WithSource(source EventSource) UpdateOption
WithSource adds a source identifier to an update operation
type UpdateOptions ¶
type UpdateOptions struct {
// Source identifies the origin of an update
Source EventSource
}
UpdateOptions contains settings for update operations
func ParseUpdateOptions ¶
func ParseUpdateOptions(opts ...UpdateOption) UpdateOptions
ParseUpdateOptions builds an UpdateOptions struct from a list of option functions
type WatchEvent ¶
type WatchEvent struct {
// Type is the type of event (created, updated, deleted).
Type WatchEventType
// ResourceType is the type of resource affected.
ResourceType types.ResourceType
// Namespace is the namespace of the resource.
Namespace string
// Name is the name of the resource.
Name string
// Resource is the resource data.
Resource interface{}
// Source identifies who triggered this change (empty for external changes)
Source EventSource
}
WatchEvent represents a change to a resource.
type WatchEventType ¶
type WatchEventType string
WatchEventType defines the type of watch event.
const ( // WatchEventCreated indicates a resource was created. WatchEventCreated WatchEventType = "CREATED" // WatchEventUpdated indicates a resource was updated. WatchEventUpdated WatchEventType = "UPDATED" // WatchEventDeleted indicates a resource was deleted. WatchEventDeleted WatchEventType = "DELETED" )