Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Close() error
- func (c *Cache) CreateAsset(asset oam.Asset) (*types.Entity, error)
- func (c *Cache) CreateEdge(edge *types.Edge) (*types.Edge, error)
- func (c *Cache) CreateEdgeProperty(edge *types.Edge, property oam.Property) (*types.EdgeTag, error)
- func (c *Cache) CreateEdgeTag(edge *types.Edge, input *types.EdgeTag) (*types.EdgeTag, error)
- func (c *Cache) CreateEntity(input *types.Entity) (*types.Entity, error)
- func (c *Cache) CreateEntityProperty(entity *types.Entity, property oam.Property) (*types.EntityTag, error)
- func (c *Cache) CreateEntityTag(entity *types.Entity, input *types.EntityTag) (*types.EntityTag, error)
- func (c *Cache) DeleteEdge(id string) error
- func (c *Cache) DeleteEdgeTag(id string) error
- func (c *Cache) DeleteEntity(id string) error
- func (c *Cache) DeleteEntityTag(id string) error
- func (c *Cache) FindEdgeById(id string) (*types.Edge, error)
- func (c *Cache) FindEdgeTagById(id string) (*types.EdgeTag, error)
- func (c *Cache) FindEdgeTagsByContent(prop oam.Property, since time.Time) ([]*types.EdgeTag, error)
- func (c *Cache) FindEntitiesByContent(asset oam.Asset, since time.Time) ([]*types.Entity, error)
- func (c *Cache) FindEntitiesByType(atype oam.AssetType, since time.Time) ([]*types.Entity, error)
- func (c *Cache) FindEntityById(id string) (*types.Entity, error)
- func (c *Cache) FindEntityTagById(id string) (*types.EntityTag, error)
- func (c *Cache) FindEntityTagsByContent(prop oam.Property, since time.Time) ([]*types.EntityTag, error)
- func (c *Cache) GetDBType() string
- func (c *Cache) GetEdgeTags(edge *types.Edge, since time.Time, names ...string) ([]*types.EdgeTag, error)
- func (c *Cache) GetEntityTags(entity *types.Entity, since time.Time, names ...string) ([]*types.EntityTag, error)
- func (c *Cache) IncomingEdges(entity *types.Entity, since time.Time, labels ...string) ([]*types.Edge, error)
- func (c *Cache) OutgoingEdges(entity *types.Entity, since time.Time, labels ...string) ([]*types.Edge, error)
- func (c *Cache) StartTime() time.Time
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) CreateAsset ¶
CreateAsset implements the Repository interface.
func (*Cache) CreateEdge ¶
CreateEdge implements the Repository interface.
func (*Cache) CreateEdgeProperty ¶
CreateEdgeProperty implements the Repository interface.
func (*Cache) CreateEdgeTag ¶
CreateEdgeTag implements the Repository interface.
func (*Cache) CreateEntity ¶
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 ¶
DeleteEdge implements the Repository interface.
func (*Cache) DeleteEdgeTag ¶
DeleteEdgeTag implements the Repository interface.
func (*Cache) DeleteEntity ¶
DeleteEntity implements the Repository interface.
func (*Cache) DeleteEntityTag ¶
DeleteEntityTag implements the Repository interface.
func (*Cache) FindEdgeById ¶
FindEdgeById implements the Repository interface.
func (*Cache) FindEdgeTagById ¶
FindEdgeTagById implements the Repository interface.
func (*Cache) FindEdgeTagsByContent ¶ added in v0.15.0
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
FindEntitiesByContent implements the Repository interface.
func (*Cache) FindEntitiesByType ¶
FindEntitiesByType implements the Repository interface.
func (*Cache) FindEntityById ¶
FindEntityById implements the Repository interface.
func (*Cache) FindEntityTagById ¶
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) 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.