cache

package
v1.1.34 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {

	// Cache management related methods
	HasLoadedPersistedCache() bool
	SaveCache()
	Flush()

	// API Service cache related methods
	AddAPIService(resource *v1.ResourceInstance) error
	GetAPIServiceCache() cache.Cache
	GetAPIServiceKeys() []string
	GetAPIServiceWithAPIID(apiID string) *v1.ResourceInstance
	GetAPIServiceWithPrimaryKey(primaryKey string) *v1.ResourceInstance
	GetAPIServiceWithName(apiName string) *v1.ResourceInstance
	GetAPIServiceInstanceCount(apiName string) int
	GetTeamsIDsInAPIServices() []string
	DeleteAPIService(apiID string) error

	// API service instance cache related methods
	AddAPIServiceInstance(resource *v1.ResourceInstance)
	GetAPIServiceInstanceKeys() []string
	GetAPIServiceInstanceByID(id string) (*v1.ResourceInstance, error)
	GetAPIServiceInstanceByName(apiName string) (*v1.ResourceInstance, error)
	DeleteAPIServiceInstance(id string) error
	DeleteAllAPIServiceInstance()
	ListAPIServiceInstances() []*v1.ResourceInstance

	// Category cache related methods
	AddCategory(resource *v1.ResourceInstance)
	GetCategoryCache() cache.Cache
	GetCategoryKeys() []string
	GetCategory(name string) *v1.ResourceInstance
	GetCategoryWithTitle(title string) *v1.ResourceInstance
	DeleteCategory(name string) error

	// Team and ACL related cache methods
	GetTeamCache() cache.Cache
	AddTeam(team *defs.PlatformTeam)
	GetTeamByName(name string) *defs.PlatformTeam
	GetTeamByID(id string) *defs.PlatformTeam
	GetDefaultTeam() *defs.PlatformTeam
	SetAccessControlList(acl *v1.ResourceInstance)
	GetAccessControlList() *v1.ResourceInstance
	DeleteAccessControlList() error

	// AccessRequestDefinition cache related methods
	AddAccessRequestDefinition(resource *v1.ResourceInstance)
	GetAccessRequestDefinitionKeys() []string
	GetAccessRequestDefinitionByName(name string) (*v1.ResourceInstance, error)
	GetAccessRequestDefinitionByID(id string) (*v1.ResourceInstance, error)
	DeleteAccessRequestDefinition(id string) error

	// CredentialRequestDefinition cache related methods
	AddCredentialRequestDefinition(resource *v1.ResourceInstance)
	GetCredentialRequestDefinitionKeys() []string
	GetCredentialRequestDefinitionByName(name string) (*v1.ResourceInstance, error)
	GetCredentialRequestDefinitionByID(id string) (*v1.ResourceInstance, error)
	DeleteCredentialRequestDefinition(id string) error
	ListCredentialRequestDefinitions() []*v1.ResourceInstance

	// Watch Sequence cache related methods
	AddSequence(watchTopicName string, sequenceID int64)
	GetSequence(watchTopicName string) int64

	// ManagedApplication cache related methods
	GetManagedApplicationCacheKeys() []string
	AddManagedApplication(resource *v1.ResourceInstance)
	GetManagedApplication(id string) *v1.ResourceInstance
	GetManagedApplicationByName(name string) *v1.ResourceInstance
	DeleteManagedApplication(id string) error

	// AccessRequest cache related methods
	GetAccessRequestCacheKeys() []string
	AddAccessRequest(resource *v1.ResourceInstance)
	GetAccessRequestByAppAndAPI(managedAppName, remoteAPIID, remoteAPIStage string) *v1.ResourceInstance
	GetAccessRequest(id string) *v1.ResourceInstance
	DeleteAccessRequest(id string) error

	GetWatchResourceCacheKeys(group, kind string) []string
	AddWatchResource(resource *v1.ResourceInstance)
	GetWatchResourceByKey(key string) *v1.ResourceInstance
	GetWatchResourceByID(group, kind, id string) *v1.ResourceInstance
	GetWatchResourceByName(group, kind, name string) *v1.ResourceInstance
	DeleteWatchResource(group, kind, id string) error

	ApplyResourceReadLock()
	ReleaseResourceReadLock()
}

Manager - interface to manage agent resource

func NewAgentCacheManager

func NewAgentCacheManager(cfg config.CentralConfig, persistCacheEnabled bool) Manager

NewAgentCacheManager - Create a new agent cache manager

Jump to

Keyboard shortcuts

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