store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package store provides a self-managing CRD store and implements background CRD discovery. It can provide the last known good state of a store related to a specific module at any time. Information can change in subsequent calls as more schemas are discovered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is the CRD store.

func New

func New(onNoCRDSources func(dir string)) *Store

New creates a new store. The onNoCRDSources callback is called when no CRD sources are found for a directory. It may be nil.

func (*Store) GetSchema

func (s *Store) GetSchema(modulePath string) *resource.Schemas

GetSchema returns the known schema related to the specified module directory.

func (*Store) ProcessFile

func (s *Store) ProcessFile(path string)

ProcessFile processes an added or changed file.

func (*Store) ProcessNewDir

func (s *Store) ProcessNewDir(path string)

ProcessNewDir reprocesses the cache when a new directory is created, since it may be a new source root that the user introduced.

func (*Store) ProcessPathDeletion

func (s *Store) ProcessPathDeletion(path string)

ProcessPathDeletion processes file or directory deletion events at the supplied path.

func (*Store) RegisterOpenDir

func (s *Store) RegisterOpenDir(modulePath string)

RegisterOpenDir registers a module directory as a candidate for schema discovery.

func (*Store) Start

func (s *Store) Start(ctx context.Context)

Start starts background processing of the store that ends when the supplied context is canceled.

Jump to

Keyboard shortcuts

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