Documentation
¶
Index ¶
- Constants
- Variables
- func NewFilterForEdge(parent Identifier, child Identifier) *filters.Filter
- func NewFilterForMetadata(m Metadata) (*filters.Filter, error)
- func NewFilterForTime(t time.Time) *filters.Filter
- func NewFilterForTimeSlice(t *common.TimeSlice) *filters.Filter
- func UnmarshalWSMessage(msg shttp.WSMessage) (string, interface{}, error)
- type CachedBackend
- func (c *CachedBackend) AddEdge(e *Edge) bool
- func (c *CachedBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
- func (c *CachedBackend) AddNode(n *Node) bool
- func (c *CachedBackend) DelEdge(e *Edge) bool
- func (c *CachedBackend) DelNode(n *Node) bool
- func (c *CachedBackend) GetEdge(i Identifier, t *common.TimeSlice) []*Edge
- func (c *CachedBackend) GetEdgeNodes(e *Edge, t *common.TimeSlice, parentMetadata, childMetadata Metadata) ([]*Node, []*Node)
- func (c *CachedBackend) GetEdges(t *common.TimeSlice, m Metadata) []*Edge
- func (c *CachedBackend) GetNode(i Identifier, t *common.TimeSlice) []*Node
- func (c *CachedBackend) GetNodeEdges(n *Node, t *common.TimeSlice, m Metadata) (edges []*Edge)
- func (c *CachedBackend) GetNodes(t *common.TimeSlice, m Metadata) []*Node
- func (c *CachedBackend) SetMetadata(i interface{}, metadata Metadata, t time.Time) bool
- func (c *CachedBackend) SetMode(mode int)
- func (c *CachedBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
- type DefaultGraphListener
- func (c *DefaultGraphListener) OnEdgeAdded(e *Edge)
- func (c *DefaultGraphListener) OnEdgeDeleted(e *Edge)
- func (c *DefaultGraphListener) OnEdgeUpdated(e *Edge)
- func (c *DefaultGraphListener) OnNodeAdded(n *Node)
- func (c *DefaultGraphListener) OnNodeDeleted(n *Node)
- func (d *DefaultGraphListener) OnNodeUpdated(n *Node)
- type Edge
- func (e *Edge) Decode(i interface{}) error
- func (e *Edge) GetChild() Identifier
- func (e *Edge) GetField(name string) (interface{}, bool)
- func (e *Edge) GetFieldInt64(field string) (_ int64, err error)
- func (e *Edge) GetFieldString(name string) (string, error)
- func (e *Edge) GetParent() Identifier
- func (e *Edge) Host() string
- func (e *Edge) JsonRawMessage() *json.RawMessage
- func (e *Edge) MarshalJSON() ([]byte, error)
- func (e *Edge) MatchMetadata(f Metadata) bool
- func (e *Edge) Metadata() Metadata
- func (e *Edge) String() string
- type ElasticSearchBackend
- func (b *ElasticSearchBackend) AddEdge(e *Edge) bool
- func (b *ElasticSearchBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
- func (b *ElasticSearchBackend) AddNode(n *Node) bool
- func (b *ElasticSearchBackend) DelEdge(e *Edge) bool
- func (b *ElasticSearchBackend) DelNode(n *Node) bool
- func (b *ElasticSearchBackend) GetEdge(i Identifier, t *common.TimeSlice) []*Edge
- func (b *ElasticSearchBackend) GetEdgeNodes(e *Edge, t *common.TimeSlice, parentMetadata, childMetadata Metadata) (parents []*Node, children []*Node)
- func (b *ElasticSearchBackend) GetEdges(t *common.TimeSlice, m Metadata) []*Edge
- func (b *ElasticSearchBackend) GetNode(i Identifier, t *common.TimeSlice) []*Node
- func (b *ElasticSearchBackend) GetNodeEdges(n *Node, t *common.TimeSlice, m Metadata) (edges []*Edge)
- func (b *ElasticSearchBackend) GetNodes(t *common.TimeSlice, m Metadata) []*Node
- func (b *ElasticSearchBackend) Query(obj string, tsq *TimedSearchQuery) (sr elastigo.SearchResult, _ error)
- func (b *ElasticSearchBackend) SearchEdges(tsq *TimedSearchQuery) (edges []*Edge)
- func (b *ElasticSearchBackend) SearchNodes(tsq *TimedSearchQuery) (nodes []*Node)
- func (b *ElasticSearchBackend) SetMetadata(i interface{}, m Metadata, t time.Time) bool
- func (b *ElasticSearchBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
- type Graph
- func (g *Graph) AddEdge(e *Edge) bool
- func (g *Graph) AddEventListener(l GraphEventListener)
- func (g *Graph) AddMetadata(i interface{}, k string, v interface{}) bool
- func (g *Graph) AddNode(n *Node) bool
- func (g *Graph) AreLinked(n1 *Node, n2 *Node, m Metadata) bool
- func (g *Graph) DelEdge(e *Edge)
- func (g *Graph) DelHostGraph(host string)
- func (g *Graph) DelMetadata(i interface{}, k string) bool
- func (g *Graph) DelNode(n *Node)
- func (g *Graph) GetContext() GraphContext
- func (g *Graph) GetEdge(i Identifier) *Edge
- func (g *Graph) GetEdgeNodes(e *Edge, parentMetadata, childMetadata Metadata) ([]*Node, []*Node)
- func (g *Graph) GetEdges(m Metadata) []*Edge
- func (g *Graph) GetHost() string
- func (g *Graph) GetNode(i Identifier) *Node
- func (g *Graph) GetNodeEdges(n *Node, m Metadata) []*Edge
- func (g *Graph) GetNodes(m Metadata) []*Node
- func (g *Graph) Link(n1 *Node, n2 *Node, m Metadata) *Edge
- func (g *Graph) LookupChildren(n *Node, f Metadata, em Metadata) (nodes []*Node)
- func (g *Graph) LookupFirstChild(n *Node, f Metadata) *Node
- func (g *Graph) LookupFirstNode(m Metadata) *Node
- func (g *Graph) LookupParents(n *Node, f Metadata, em Metadata) (nodes []*Node)
- func (g *Graph) LookupShortestPath(n *Node, m Metadata, em Metadata) []*Node
- func (g *Graph) MarshalJSON() ([]byte, error)
- func (g *Graph) NewEdge(i Identifier, p *Node, c *Node, m Metadata) *Edge
- func (g *Graph) NewNode(i Identifier, m Metadata, h ...string) *Node
- func (g *Graph) RemoveEventListener(l GraphEventListener)
- func (g *Graph) SetMetadata(i interface{}, m Metadata) bool
- func (g *Graph) StartMetadataTransaction(i interface{}) *MetadataTransaction
- func (g *Graph) String() string
- func (g *Graph) Unlink(n1 *Node, n2 *Node)
- func (g *Graph) WithContext(c GraphContext) (*Graph, error)
- type GraphBackend
- type GraphContext
- type GraphEventListener
- type GraphServer
- func (s *GraphServer) AddEventHandler(h GraphServerEventHandler)
- func (s *GraphServer) OnEdgeAdded(e *Edge)
- func (s *GraphServer) OnEdgeDeleted(e *Edge)
- func (s *GraphServer) OnEdgeUpdated(e *Edge)
- func (s *GraphServer) OnMessage(c *shttp.WSClient, msg shttp.WSMessage)
- func (s *GraphServer) OnNodeAdded(n *Node)
- func (s *GraphServer) OnNodeDeleted(n *Node)
- func (s *GraphServer) OnNodeUpdated(n *Node)
- type GraphServerEventHandler
- type HostNodeTIDMap
- type Identifier
- type InterfaceMetric
- type MemoryBackend
- func (m *MemoryBackend) AddEdge(e *Edge) bool
- func (m *MemoryBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
- func (m *MemoryBackend) AddNode(n *Node) bool
- func (m *MemoryBackend) DelEdge(e *Edge) bool
- func (m *MemoryBackend) DelNode(n *Node) bool
- func (m *MemoryBackend) GetEdge(i Identifier, t *common.TimeSlice) []*Edge
- func (m *MemoryBackend) GetEdgeNodes(e *Edge, t *common.TimeSlice, parentMetadata, childMetadata Metadata) ([]*Node, []*Node)
- func (m MemoryBackend) GetEdges(t *common.TimeSlice, metadata Metadata) (edges []*Edge)
- func (m *MemoryBackend) GetNode(i Identifier, t *common.TimeSlice) []*Node
- func (m *MemoryBackend) GetNodeEdges(n *Node, t *common.TimeSlice, meta Metadata) []*Edge
- func (m MemoryBackend) GetNodes(t *common.TimeSlice, metadata Metadata) (nodes []*Node)
- func (m *MemoryBackend) SetMetadata(i interface{}, meta Metadata, t time.Time) bool
- func (m *MemoryBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
- type MemoryBackendEdge
- func (e MemoryBackendEdge) GetField(name string) (interface{}, bool)
- func (e MemoryBackendEdge) GetFieldInt64(field string) (_ int64, err error)
- func (e MemoryBackendEdge) Host() string
- func (e MemoryBackendEdge) MatchMetadata(f Metadata) bool
- func (e MemoryBackendEdge) Metadata() Metadata
- func (e MemoryBackendEdge) String() string
- type MemoryBackendNode
- func (e MemoryBackendNode) GetField(name string) (interface{}, bool)
- func (e MemoryBackendNode) GetFieldInt64(field string) (_ int64, err error)
- func (e MemoryBackendNode) GetFieldString(field string) (_ string, err error)
- func (e MemoryBackendNode) Host() string
- func (e MemoryBackendNode) MatchMetadata(f Metadata) bool
- func (e MemoryBackendNode) Metadata() Metadata
- func (e MemoryBackendNode) String() string
- type Metadata
- type MetadataTransaction
- type Node
- func (n *Node) Decode(i interface{}) error
- func (e *Node) GetField(name string) (interface{}, bool)
- func (e *Node) GetFieldInt64(field string) (_ int64, err error)
- func (e *Node) GetFieldString(field string) (_ string, err error)
- func (e *Node) Host() string
- func (n *Node) JsonRawMessage() *json.RawMessage
- func (n *Node) MarshalJSON() ([]byte, error)
- func (e *Node) MatchMetadata(f Metadata) bool
- func (e *Node) Metadata() Metadata
- func (e *Node) String() string
- type OrientDBBackend
- func (o *OrientDBBackend) AddEdge(e *Edge) bool
- func (o *OrientDBBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
- func (o *OrientDBBackend) AddNode(n *Node) bool
- func (o *OrientDBBackend) DelEdge(e *Edge) bool
- func (o *OrientDBBackend) DelNode(n *Node) bool
- func (o *OrientDBBackend) GetEdge(i Identifier, t *common.TimeSlice) (edges []*Edge)
- func (o *OrientDBBackend) GetEdgeNodes(e *Edge, t *common.TimeSlice, parentMetadata, childMetadata Metadata) (parents []*Node, children []*Node)
- func (o *OrientDBBackend) GetEdges(t *common.TimeSlice, m Metadata) (edges []*Edge)
- func (o *OrientDBBackend) GetNode(i Identifier, t *common.TimeSlice) (nodes []*Node)
- func (o *OrientDBBackend) GetNodeEdges(n *Node, t *common.TimeSlice, m Metadata) (edges []*Edge)
- func (o *OrientDBBackend) GetNodes(t *common.TimeSlice, m Metadata) (nodes []*Node)
- func (o *OrientDBBackend) SetMetadata(i interface{}, m Metadata, t time.Time) bool
- func (o *OrientDBBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
- type SyncReplyMsg
- type TimedSearchQuery
Constants ¶
View Source
const ( SyncRequestMsgType = "SyncRequest" SyncReplyMsgType = "SyncReply" HostGraphDeletedMsgType = "HostGraphDeleted" NodeUpdatedMsgType = "NodeUpdated" NodeDeletedMsgType = "NodeDeleted" NodeAddedMsgType = "NodeAdded" EdgeUpdatedMsgType = "EdgeUpdated" EdgeDeletedMsgType = "EdgeDeleted" EdgeAddedMsgType = "EdgeAdded" )
View Source
const (
Namespace = "Graph"
)
Variables ¶
Functions ¶
func NewFilterForEdge ¶ added in v0.10.0
func NewFilterForEdge(parent Identifier, child Identifier) *filters.Filter
func NewFilterForMetadata ¶ added in v0.10.0
func NewFilterForTimeSlice ¶ added in v0.10.0
Types ¶
type CachedBackend ¶ added in v0.10.0
type CachedBackend struct {
// contains filtered or unexported fields
}
func NewCachedBackend ¶ added in v0.10.0
func NewCachedBackend(persistent GraphBackend) (*CachedBackend, error)
func (*CachedBackend) AddEdge ¶ added in v0.10.0
func (c *CachedBackend) AddEdge(e *Edge) bool
func (*CachedBackend) AddMetadata ¶ added in v0.10.0
func (c *CachedBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
func (*CachedBackend) AddNode ¶ added in v0.10.0
func (c *CachedBackend) AddNode(n *Node) bool
func (*CachedBackend) DelEdge ¶ added in v0.10.0
func (c *CachedBackend) DelEdge(e *Edge) bool
func (*CachedBackend) DelNode ¶ added in v0.10.0
func (c *CachedBackend) DelNode(n *Node) bool
func (*CachedBackend) GetEdge ¶ added in v0.10.0
func (c *CachedBackend) GetEdge(i Identifier, t *common.TimeSlice) []*Edge
func (*CachedBackend) GetEdgeNodes ¶ added in v0.10.0
func (*CachedBackend) GetEdges ¶ added in v0.10.0
func (c *CachedBackend) GetEdges(t *common.TimeSlice, m Metadata) []*Edge
func (*CachedBackend) GetNode ¶ added in v0.10.0
func (c *CachedBackend) GetNode(i Identifier, t *common.TimeSlice) []*Node
func (*CachedBackend) GetNodeEdges ¶ added in v0.10.0
func (*CachedBackend) GetNodes ¶ added in v0.10.0
func (c *CachedBackend) GetNodes(t *common.TimeSlice, m Metadata) []*Node
func (*CachedBackend) SetMetadata ¶ added in v0.10.0
func (c *CachedBackend) SetMetadata(i interface{}, metadata Metadata, t time.Time) bool
func (*CachedBackend) SetMode ¶ added in v0.10.0
func (c *CachedBackend) SetMode(mode int)
func (*CachedBackend) WithContext ¶ added in v0.10.0
func (c *CachedBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
type DefaultGraphListener ¶ added in v0.3.0
type DefaultGraphListener struct {
}
default implementation of a graph listener, can be used when not implementing the whole set of callbacks
func (*DefaultGraphListener) OnEdgeAdded ¶ added in v0.3.0
func (c *DefaultGraphListener) OnEdgeAdded(e *Edge)
func (*DefaultGraphListener) OnEdgeDeleted ¶ added in v0.3.0
func (c *DefaultGraphListener) OnEdgeDeleted(e *Edge)
func (*DefaultGraphListener) OnEdgeUpdated ¶ added in v0.3.0
func (c *DefaultGraphListener) OnEdgeUpdated(e *Edge)
func (*DefaultGraphListener) OnNodeAdded ¶ added in v0.3.0
func (c *DefaultGraphListener) OnNodeAdded(n *Node)
func (*DefaultGraphListener) OnNodeDeleted ¶ added in v0.3.0
func (c *DefaultGraphListener) OnNodeDeleted(n *Node)
func (*DefaultGraphListener) OnNodeUpdated ¶ added in v0.3.0
func (d *DefaultGraphListener) OnNodeUpdated(n *Node)
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
func (*Edge) GetChild ¶ added in v0.4.0
func (e *Edge) GetChild() Identifier
func (*Edge) GetFieldInt64 ¶ added in v0.10.0
func (*Edge) GetFieldString ¶ added in v0.10.0
func (*Edge) GetParent ¶ added in v0.4.0
func (e *Edge) GetParent() Identifier
func (*Edge) JsonRawMessage ¶ added in v0.4.0
func (e *Edge) JsonRawMessage() *json.RawMessage
type ElasticSearchBackend ¶ added in v0.6.0
type ElasticSearchBackend struct {
// contains filtered or unexported fields
}
func NewElasticSearchBackend ¶ added in v0.6.0
func NewElasticSearchBackendFromConfig ¶ added in v0.6.0
func NewElasticSearchBackendFromConfig() (*ElasticSearchBackend, error)
func (*ElasticSearchBackend) AddEdge ¶ added in v0.6.0
func (b *ElasticSearchBackend) AddEdge(e *Edge) bool
func (*ElasticSearchBackend) AddMetadata ¶ added in v0.6.0
func (b *ElasticSearchBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
func (*ElasticSearchBackend) AddNode ¶ added in v0.6.0
func (b *ElasticSearchBackend) AddNode(n *Node) bool
func (*ElasticSearchBackend) DelEdge ¶ added in v0.6.0
func (b *ElasticSearchBackend) DelEdge(e *Edge) bool
func (*ElasticSearchBackend) DelNode ¶ added in v0.6.0
func (b *ElasticSearchBackend) DelNode(n *Node) bool
func (*ElasticSearchBackend) GetEdge ¶ added in v0.6.0
func (b *ElasticSearchBackend) GetEdge(i Identifier, t *common.TimeSlice) []*Edge
func (*ElasticSearchBackend) GetEdgeNodes ¶ added in v0.6.0
func (*ElasticSearchBackend) GetEdges ¶ added in v0.6.0
func (b *ElasticSearchBackend) GetEdges(t *common.TimeSlice, m Metadata) []*Edge
func (*ElasticSearchBackend) GetNode ¶ added in v0.6.0
func (b *ElasticSearchBackend) GetNode(i Identifier, t *common.TimeSlice) []*Node
func (*ElasticSearchBackend) GetNodeEdges ¶ added in v0.6.0
func (*ElasticSearchBackend) GetNodes ¶ added in v0.6.0
func (b *ElasticSearchBackend) GetNodes(t *common.TimeSlice, m Metadata) []*Node
func (*ElasticSearchBackend) Query ¶ added in v0.10.0
func (b *ElasticSearchBackend) Query(obj string, tsq *TimedSearchQuery) (sr elastigo.SearchResult, _ error)
func (*ElasticSearchBackend) SearchEdges ¶ added in v0.10.0
func (b *ElasticSearchBackend) SearchEdges(tsq *TimedSearchQuery) (edges []*Edge)
func (*ElasticSearchBackend) SearchNodes ¶ added in v0.10.0
func (b *ElasticSearchBackend) SearchNodes(tsq *TimedSearchQuery) (nodes []*Node)
func (*ElasticSearchBackend) SetMetadata ¶ added in v0.6.0
func (b *ElasticSearchBackend) SetMetadata(i interface{}, m Metadata, t time.Time) bool
func (*ElasticSearchBackend) WithContext ¶ added in v0.8.0
func (b *ElasticSearchBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
type Graph ¶
func NewGraph ¶
func NewGraph(host string, backend GraphBackend) *Graph
func NewGraphFromConfig ¶ added in v0.4.0
func NewGraphFromConfig(backend GraphBackend) *Graph
func NewGraphWithContext ¶ added in v0.4.0
func NewGraphWithContext(hostID string, backend GraphBackend, context GraphContext) (*Graph, error)
func (*Graph) AddEventListener ¶
func (g *Graph) AddEventListener(l GraphEventListener)
func (*Graph) AddMetadata ¶ added in v0.2.0
func (*Graph) DelMetadata ¶ added in v0.10.0
func (*Graph) GetContext ¶ added in v0.4.0
func (g *Graph) GetContext() GraphContext
func (*Graph) GetEdge ¶
func (g *Graph) GetEdge(i Identifier) *Edge
func (*Graph) GetEdgeNodes ¶ added in v0.3.0
func (*Graph) GetNode ¶
func (g *Graph) GetNode(i Identifier) *Node
func (*Graph) GetNodeEdges ¶ added in v0.4.0
func (*Graph) LookupChildren ¶
func (*Graph) LookupFirstChild ¶ added in v0.2.0
func (*Graph) LookupParents ¶ added in v0.6.0
func (*Graph) LookupShortestPath ¶ added in v0.3.0
func (*Graph) RemoveEventListener ¶ added in v0.3.0
func (g *Graph) RemoveEventListener(l GraphEventListener)
func (*Graph) StartMetadataTransaction ¶ added in v0.3.0
func (g *Graph) StartMetadataTransaction(i interface{}) *MetadataTransaction
func (*Graph) WithContext ¶ added in v0.4.0
func (g *Graph) WithContext(c GraphContext) (*Graph, error)
type GraphBackend ¶
type GraphBackend interface {
AddNode(n *Node) bool
DelNode(n *Node) bool
GetNode(i Identifier, at *common.TimeSlice) []*Node
GetNodeEdges(n *Node, at *common.TimeSlice, m Metadata) []*Edge
AddEdge(e *Edge) bool
DelEdge(e *Edge) bool
GetEdge(i Identifier, at *common.TimeSlice) []*Edge
GetEdgeNodes(e *Edge, at *common.TimeSlice, parentMetadata, childMetadata Metadata) ([]*Node, []*Node)
AddMetadata(e interface{}, k string, v interface{}, t time.Time) bool
SetMetadata(e interface{}, m Metadata, t time.Time) bool
GetNodes(t *common.TimeSlice, m Metadata) []*Node
GetEdges(t *common.TimeSlice, m Metadata) []*Edge
WithContext(graph *Graph, context GraphContext) (*Graph, error)
}
func BackendFromConfig ¶
func BackendFromConfig() (backend GraphBackend, err error)
type GraphEventListener ¶
type GraphServer ¶ added in v0.4.0
type GraphServer struct {
shttp.DefaultWSServerEventHandler
WSServer *shttp.WSServer
Graph *Graph
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(g *Graph, server *shttp.WSServer) *GraphServer
func (*GraphServer) AddEventHandler ¶ added in v0.11.0
func (s *GraphServer) AddEventHandler(h GraphServerEventHandler)
func (*GraphServer) OnEdgeAdded ¶ added in v0.4.0
func (s *GraphServer) OnEdgeAdded(e *Edge)
func (*GraphServer) OnEdgeDeleted ¶ added in v0.4.0
func (s *GraphServer) OnEdgeDeleted(e *Edge)
func (*GraphServer) OnEdgeUpdated ¶ added in v0.4.0
func (s *GraphServer) OnEdgeUpdated(e *Edge)
func (*GraphServer) OnMessage ¶ added in v0.4.0
func (s *GraphServer) OnMessage(c *shttp.WSClient, msg shttp.WSMessage)
func (*GraphServer) OnNodeAdded ¶ added in v0.4.0
func (s *GraphServer) OnNodeAdded(n *Node)
func (*GraphServer) OnNodeDeleted ¶ added in v0.4.0
func (s *GraphServer) OnNodeDeleted(n *Node)
func (*GraphServer) OnNodeUpdated ¶ added in v0.4.0
func (s *GraphServer) OnNodeUpdated(n *Node)
type GraphServerEventHandler ¶ added in v0.11.0
type HostNodeTIDMap ¶ added in v0.9.0
func BuildHostNodeTIDMap ¶ added in v0.9.0
func BuildHostNodeTIDMap(nodes []*Node) HostNodeTIDMap
type InterfaceMetric ¶ added in v0.10.0
type InterfaceMetric struct {
RxPackets int64
TxPackets int64
RxBytes int64
TxBytes int64
RxErrors int64
TxErrors int64
RxDropped int64
TxDropped int64
Multicast int64
Collisions int64
RxLengthErrors int64
RxOverErrors int64
RxCrcErrors int64
RxFrameErrors int64
RxFifoErrors int64
RxMissedErrors int64
TxAbortedErrors int64
TxCarrierErrors int64
TxFifoErrors int64
TxHeartbeatErrors int64
TxWindowErrors int64
RxCompressed int64
TxCompressed int64
}
func (*InterfaceMetric) Add ¶ added in v0.10.0
func (im *InterfaceMetric) Add(m common.Metric) common.Metric
func (*InterfaceMetric) GetField ¶ added in v0.10.0
func (im *InterfaceMetric) GetField(field string) (int64, error)
type MemoryBackend ¶
type MemoryBackend struct {
// contains filtered or unexported fields
}
func NewMemoryBackend ¶
func NewMemoryBackend() (*MemoryBackend, error)
func (*MemoryBackend) AddEdge ¶
func (m *MemoryBackend) AddEdge(e *Edge) bool
func (*MemoryBackend) AddMetadata ¶ added in v0.2.0
func (m *MemoryBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
func (*MemoryBackend) AddNode ¶
func (m *MemoryBackend) AddNode(n *Node) bool
func (*MemoryBackend) DelEdge ¶
func (m *MemoryBackend) DelEdge(e *Edge) bool
func (*MemoryBackend) DelNode ¶
func (m *MemoryBackend) DelNode(n *Node) bool
func (*MemoryBackend) GetEdge ¶
func (m *MemoryBackend) GetEdge(i Identifier, t *common.TimeSlice) []*Edge
func (*MemoryBackend) GetEdgeNodes ¶
func (MemoryBackend) GetEdges ¶
func (m MemoryBackend) GetEdges(t *common.TimeSlice, metadata Metadata) (edges []*Edge)
func (*MemoryBackend) GetNode ¶
func (m *MemoryBackend) GetNode(i Identifier, t *common.TimeSlice) []*Node
func (*MemoryBackend) GetNodeEdges ¶
func (MemoryBackend) GetNodes ¶
func (m MemoryBackend) GetNodes(t *common.TimeSlice, metadata Metadata) (nodes []*Node)
func (*MemoryBackend) SetMetadata ¶
func (m *MemoryBackend) SetMetadata(i interface{}, meta Metadata, t time.Time) bool
func (*MemoryBackend) WithContext ¶ added in v0.8.0
func (m *MemoryBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
type MemoryBackendEdge ¶
type MemoryBackendEdge struct {
*Edge
}
func (MemoryBackendEdge) GetField ¶ added in v0.10.0
func (MemoryBackendEdge) GetFieldInt64 ¶ added in v0.10.0
func (MemoryBackendEdge) MatchMetadata ¶ added in v0.4.0
type MemoryBackendNode ¶
type MemoryBackendNode struct {
*Node
// contains filtered or unexported fields
}
func (MemoryBackendNode) GetField ¶ added in v0.10.0
func (MemoryBackendNode) GetFieldInt64 ¶ added in v0.10.0
func (MemoryBackendNode) GetFieldString ¶ added in v0.10.0
func (MemoryBackendNode) MatchMetadata ¶ added in v0.4.0
type MetadataTransaction ¶ added in v0.3.0
type MetadataTransaction struct {
Metadata Metadata
// contains filtered or unexported fields
}
func (*MetadataTransaction) AddMetadata ¶ added in v0.3.0
func (t *MetadataTransaction) AddMetadata(k string, v interface{})
func (*MetadataTransaction) Commit ¶ added in v0.3.0
func (t *MetadataTransaction) Commit()
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) GetFieldInt64 ¶ added in v0.10.0
func (*Node) GetFieldString ¶ added in v0.10.0
func (*Node) JsonRawMessage ¶ added in v0.4.0
func (n *Node) JsonRawMessage() *json.RawMessage
type OrientDBBackend ¶ added in v0.4.0
type OrientDBBackend struct {
// contains filtered or unexported fields
}
func NewOrientDBBackend ¶ added in v0.4.0
func NewOrientDBBackendFromConfig ¶ added in v0.4.0
func NewOrientDBBackendFromConfig() (*OrientDBBackend, error)
func (*OrientDBBackend) AddEdge ¶ added in v0.4.0
func (o *OrientDBBackend) AddEdge(e *Edge) bool
func (*OrientDBBackend) AddMetadata ¶ added in v0.4.0
func (o *OrientDBBackend) AddMetadata(i interface{}, k string, v interface{}, t time.Time) bool
func (*OrientDBBackend) AddNode ¶ added in v0.4.0
func (o *OrientDBBackend) AddNode(n *Node) bool
func (*OrientDBBackend) DelEdge ¶ added in v0.4.0
func (o *OrientDBBackend) DelEdge(e *Edge) bool
func (*OrientDBBackend) DelNode ¶ added in v0.4.0
func (o *OrientDBBackend) DelNode(n *Node) bool
func (*OrientDBBackend) GetEdge ¶ added in v0.4.0
func (o *OrientDBBackend) GetEdge(i Identifier, t *common.TimeSlice) (edges []*Edge)
func (*OrientDBBackend) GetEdgeNodes ¶ added in v0.4.0
func (*OrientDBBackend) GetEdges ¶ added in v0.4.0
func (o *OrientDBBackend) GetEdges(t *common.TimeSlice, m Metadata) (edges []*Edge)
func (*OrientDBBackend) GetNode ¶ added in v0.4.0
func (o *OrientDBBackend) GetNode(i Identifier, t *common.TimeSlice) (nodes []*Node)
func (*OrientDBBackend) GetNodeEdges ¶ added in v0.4.0
func (*OrientDBBackend) GetNodes ¶ added in v0.4.0
func (o *OrientDBBackend) GetNodes(t *common.TimeSlice, m Metadata) (nodes []*Node)
func (*OrientDBBackend) SetMetadata ¶ added in v0.4.0
func (o *OrientDBBackend) SetMetadata(i interface{}, m Metadata, t time.Time) bool
func (*OrientDBBackend) WithContext ¶ added in v0.8.0
func (o *OrientDBBackend) WithContext(graph *Graph, context GraphContext) (*Graph, error)
Source Files
¶
- cachedbackend.go
- elasticsearch.go
- filters.go
- graph.go
- memory.go
- message.go
- metrics.go
- orientdb.go
- server.go
Click to show internal directories.
Click to hide internal directories.