store

package
v0.0.0-...-6a882ce Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 *api.Resource)

func (*MemoryStore) Delete

func (s *MemoryStore) Delete(resourceID string)

func (*MemoryStore) Get

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

func (*MemoryStore) List

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

func (*MemoryStore) ListAll

func (s *MemoryStore) ListAll() []*api.Resource

func (*MemoryStore) MarkAsDeleting

func (s *MemoryStore) MarkAsDeleting(resourceID string)

func (*MemoryStore) UpSert

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

func (*MemoryStore) Update

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

func (*MemoryStore) UpdateStatus

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

type Store

type Store interface {
	// Add adds a resource to the store
	Add(resource *api.Resource)
	// Get retrieves a resource from the store
	Get(resourceID string) (*api.Resource, error)
	// Update updates a resource in the store
	Update(resource *api.Resource) error
	// UpSert updates or inserts a resource into the store
	UpSert(resource *api.Resource)
	// UpdateStatus updates the status of a resource in the store
	UpdateStatus(resource *api.Resource) error
	// MarkAsDeleting marks a resource as deleting in the store
	MarkAsDeleting(resourceID string)
	// Delete deletes a resource from the store
	Delete(resourceID string)
	// List lists all resources in the store
	List(namespace string) []*api.Resource
	// ListAll lists all resources in the store
	ListAll() []*api.Resource
}

Jump to

Keyboard shortcuts

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