Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGraphSessionFactory ¶
func NewGraphSessionFactory(graph ReadOnlyGraph) routing.GraphSessionFactory
NewGraphSessionFactory constructs a new Factory which can then be used to start a new session.
func NewRoutingGraph ¶
func NewRoutingGraph(graph ReadOnlyGraph) routing.Graph
NewRoutingGraph constructs a session that which does not first start a read-only transaction and so each call on the routing.Graph will create a new transaction.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory implements the routing.GraphSessionFactory and can be used to start a session with a ReadOnlyGraph.
func (*Factory) NewGraphSession ¶
NewGraphSession will produce a new Graph to use for a path-finding session. It returns the Graph along with a call-back that must be called once Graph access is complete. This call-back will close any read-only transaction that was created at Graph construction time.
NOTE: This is part of the routing.GraphSessionFactory interface.
type ReadOnlyGraph ¶
type ReadOnlyGraph interface { // NewPathFindTx returns a new read transaction that can be used for a // single path finding session. Will return nil if the graph cache is // enabled. NewPathFindTx() (kvdb.RTx, error) // contains filtered or unexported methods }
ReadOnlyGraph is a graph extended with a call to create a new read-only transaction that can then be used to make further queries to the graph.