cache

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	GetAsset(a oam.Asset) (*types.Asset, bool)
	GetAssetsByType(t oam.AssetType) ([]*types.Asset, bool)
	SetAsset(a *types.Asset)
	GetRelations(r *types.Relation) ([]*types.Relation, bool)
	GetRelationsByType(rtype string) ([]*types.Relation, bool)
	SetRelation(r *types.Relation)
	Close()
}

func NewOAMCache

func NewOAMCache(c Cache) Cache

type OAMCache

type OAMCache struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*OAMCache) Close

func (c *OAMCache) Close()

func (*OAMCache) GetAsset

func (c *OAMCache) GetAsset(a oam.Asset) (*types.Asset, bool)

func (*OAMCache) GetAssetsByType

func (c *OAMCache) GetAssetsByType(t oam.AssetType) ([]*types.Asset, bool)

func (*OAMCache) GetRelations

func (c *OAMCache) GetRelations(r *types.Relation) ([]*types.Relation, bool)

func (*OAMCache) GetRelationsByType

func (c *OAMCache) GetRelationsByType(rtype string) ([]*types.Relation, bool)

func (*OAMCache) SetAsset

func (c *OAMCache) SetAsset(a *types.Asset)

func (*OAMCache) SetRelation

func (c *OAMCache) SetRelation(r *types.Relation)

Jump to

Keyboard shortcuts

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