cache

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New(cache, database repository.Repository, freq time.Duration) (*Cache, error)

func (*Cache) Close

func (c *Cache) Close() error

Close implements the Repository interface.

func (*Cache) CreateAsset

func (c *Cache) CreateAsset(asset oam.Asset) (*types.Entity, error)

CreateAsset implements the Repository interface.

func (*Cache) CreateEdge

func (c *Cache) CreateEdge(edge *types.Edge) (*types.Edge, error)

CreateEdge implements the Repository interface.

func (*Cache) CreateEdgeProperty

func (c *Cache) CreateEdgeProperty(edge *types.Edge, property oam.Property) (*types.EdgeTag, error)

CreateEdgeProperty implements the Repository interface.

func (*Cache) CreateEdgeTag

func (c *Cache) CreateEdgeTag(edge *types.Edge, input *types.EdgeTag) (*types.EdgeTag, error)

CreateEdgeTag implements the Repository interface.

func (*Cache) CreateEntity

func (c *Cache) CreateEntity(input *types.Entity) (*types.Entity, error)

CreateEntity implements the Repository interface.

func (*Cache) CreateEntityProperty

func (c *Cache) CreateEntityProperty(entity *types.Entity, property oam.Property) (*types.EntityTag, error)

CreateEntityProperty implements the Repository interface.

func (*Cache) CreateEntityTag

func (c *Cache) CreateEntityTag(entity *types.Entity, input *types.EntityTag) (*types.EntityTag, error)

CreateEntityTag implements the Repository interface.

func (*Cache) DeleteEdge

func (c *Cache) DeleteEdge(id string) error

DeleteEdge implements the Repository interface.

func (*Cache) DeleteEdgeTag

func (c *Cache) DeleteEdgeTag(id string) error

DeleteEdgeTag implements the Repository interface.

func (*Cache) DeleteEntity

func (c *Cache) DeleteEntity(id string) error

DeleteEntity implements the Repository interface.

func (*Cache) DeleteEntityTag

func (c *Cache) DeleteEntityTag(id string) error

DeleteEntityTag implements the Repository interface.

func (*Cache) FindEdgeById

func (c *Cache) FindEdgeById(id string) (*types.Edge, error)

FindEdgeById implements the Repository interface.

func (*Cache) FindEdgeTagById

func (c *Cache) FindEdgeTagById(id string) (*types.EdgeTag, error)

FindEdgeTagById implements the Repository interface.

func (*Cache) FindEdgeTagsByContent added in v0.15.0

func (c *Cache) FindEdgeTagsByContent(prop oam.Property, since time.Time) ([]*types.EdgeTag, error)

FindEdgeTagsByContent implements the Repository interface. TODO: Consider adding a check for the last time the cache was updated

func (*Cache) FindEntitiesByContent added in v0.17.0

func (c *Cache) FindEntitiesByContent(asset oam.Asset, since time.Time) ([]*types.Entity, error)

FindEntitiesByContent implements the Repository interface.

func (*Cache) FindEntitiesByType

func (c *Cache) FindEntitiesByType(atype oam.AssetType, since time.Time) ([]*types.Entity, error)

FindEntitiesByType implements the Repository interface.

func (*Cache) FindEntityById

func (c *Cache) FindEntityById(id string) (*types.Entity, error)

FindEntityById implements the Repository interface.

func (*Cache) FindEntityTagById

func (c *Cache) FindEntityTagById(id string) (*types.EntityTag, error)

FindEntityTagById implements the Repository interface.

func (*Cache) FindEntityTagsByContent added in v0.15.0

func (c *Cache) FindEntityTagsByContent(prop oam.Property, since time.Time) ([]*types.EntityTag, error)

FindEntityTagsByContent implements the Repository interface. TODO: Consider adding a check for the last time the cache was updated

func (*Cache) GetDBType

func (c *Cache) GetDBType() string

GetDBType implements the Repository interface.

func (*Cache) GetEdgeTags

func (c *Cache) GetEdgeTags(edge *types.Edge, since time.Time, names ...string) ([]*types.EdgeTag, error)

GetEdgeTags implements the Repository interface.

func (*Cache) GetEntityTags

func (c *Cache) GetEntityTags(entity *types.Entity, since time.Time, names ...string) ([]*types.EntityTag, error)

GetEntityTags implements the Repository interface.

func (*Cache) IncomingEdges

func (c *Cache) IncomingEdges(entity *types.Entity, since time.Time, labels ...string) ([]*types.Edge, error)

IncomingEdges implements the Repository interface.

func (*Cache) OutgoingEdges

func (c *Cache) OutgoingEdges(entity *types.Entity, since time.Time, labels ...string) ([]*types.Edge, error)

OutgoingEdges implements the Repository interface.

func (*Cache) StartTime

func (c *Cache) StartTime() time.Time

StartTime returns the time that the cache was created.

Jump to

Keyboard shortcuts

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