cache

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EdgeCache

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

func NewEdgeCache

func NewEdgeCache(ttl time.Duration) EdgeCache

func (*EdgeCache) Delete

func (c *EdgeCache) Delete(tail string, head string)

func (*EdgeCache) Flush

func (c *EdgeCache) Flush()

func (*EdgeCache) GetAdjacent

func (c *EdgeCache) GetAdjacent(tail string) (map[string]float32, bool)

func (*EdgeCache) GetWeight

func (c *EdgeCache) GetWeight(tail string, head string) (float32, bool)

func (*EdgeCache) Set

func (c *EdgeCache) Set(tail string, head string, value float32)

type GraphCache

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

func NewGraphCache

func NewGraphCache(ttl time.Duration) GraphCache

func (*GraphCache) DumpEdge

func (c *GraphCache) DumpEdge(edge model.Edge)

func (*GraphCache) DumpVertex

func (c *GraphCache) DumpVertex(vertex model.Vertex)

func (*GraphCache) Flush

func (c *GraphCache) Flush()

func (*GraphCache) Load

func (c *GraphCache) Load(query model.LoadQuery) model.Graph

func (*GraphCache) LoadVertex

func (c *GraphCache) LoadVertex(key string) (model.Vertex, bool)

type ValueVertex

type ValueVertex struct {
	K string
	V interface{}
}

func (*ValueVertex) Key

func (v *ValueVertex) Key() string

func (*ValueVertex) Value

func (v *ValueVertex) Value() interface{}

type VertexCache

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

func NewVertexCache

func NewVertexCache(ttl time.Duration) VertexCache

func (*VertexCache) Delete

func (c *VertexCache) Delete(key string)

func (*VertexCache) Flush

func (c *VertexCache) Flush()

func (*VertexCache) Get

func (c *VertexCache) Get(key string) (model.Vertex, bool)

func (*VertexCache) Set

func (c *VertexCache) Set(key string, vertex model.Vertex)

Jump to

Keyboard shortcuts

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