cache

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCacheStore

func NewCacheStore(keyFn cache.KeyFunc) cache.Indexer

NewCacheStore creates an Indexer store with the given key function

Types

type WorkspaceCache

type WorkspaceCache struct {
	Client              workspaceClient.WorkspaceInterface
	Store               cache.Indexer
	HasSynced           cache.InformerSynced
	DefaultNodeSelector string
}

func NewFake

func NewFake(c workspaceClient.WorkspaceInterface, store cache.Indexer, defaultNodeSelector string) *WorkspaceCache

NewFake is used for testing purpose only

func NewWorkspaceCache

func NewWorkspaceCache(workspaces cache.SharedIndexInformer, client workspaceClient.WorkspaceInterface, defaultNodeSelector string) *WorkspaceCache

NewWorkspaceCache returns a non-initialized WorkspaceCache. The cache needs to be run to begin functioning

func (*WorkspaceCache) GetWorkspace

func (p *WorkspaceCache) GetWorkspace(name string) (*workspaceapi.Workspace, error)

func (*WorkspaceCache) Run

func (c *WorkspaceCache) Run(stopCh <-chan struct{})

Run waits until the cache has synced.

func (*WorkspaceCache) Running

func (c *WorkspaceCache) Running() bool

Running determines if the cache is initialized and running

Jump to

Keyboard shortcuts

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