store

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceID

func ResourceID(namespace, name string) string

Types

type MemoryStore

type MemoryStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMemoryStore

func NewMemoryStore() *MemoryStore

func (*MemoryStore) Add

func (s *MemoryStore) Add(resource *Resource)

func (*MemoryStore) Delete

func (s *MemoryStore) Delete(resourceID string)

func (*MemoryStore) Get

func (s *MemoryStore) Get(resourceID string) (*Resource, error)

func (*MemoryStore) List

func (s *MemoryStore) List(namespace string) []*Resource

func (*MemoryStore) UpSert

func (s *MemoryStore) UpSert(resource *Resource)

func (*MemoryStore) Update

func (s *MemoryStore) Update(resource *Resource) error

func (*MemoryStore) UpdateStatus

func (s *MemoryStore) UpdateStatus(resource *Resource) error

type Resource

type Resource struct {
	Source            string
	ResourceID        string
	ResourceVersion   int64
	Namespace         string
	DeletionTimestamp *metav1.Time
	Spec              unstructured.Unstructured
	Status            ResourceStatus
}

func NewResource

func NewResource(namespace, name string, resourceVersion int64) *Resource

func (*Resource) GetDeletionTimestamp

func (r *Resource) GetDeletionTimestamp() *metav1.Time

func (*Resource) GetResourceVersion

func (r *Resource) GetResourceVersion() string

func (*Resource) GetUID

func (r *Resource) GetUID() kubetypes.UID

type ResourceStatus

type ResourceStatus struct {
	Conditions []metav1.Condition
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL