|
1234567891011121314151617181920212223242526272829303132333435363738 |
- package graph
-
- import (
- "github.com/cayleygraph/cayley"
- cg "github.com/cayleygraph/cayley/graph"
- )
-
- type Server interface {
- Run()
- }
-
- func NewServer() Server {
- return &server{
- backend: "bolt",
- }
- }
-
- type server struct {
- path string
- backend string
-
- store *cayley.Handle
- }
-
- func (srv *server) open() error {
- cg.InitQuadStore(srv.backend, srv.path, nil)
-
- store, err := cayley.NewGraph(srv.backend, srv.path, nil)
- if err != nil {
- return err
- }
- srv.store = store
- return nil
- }
-
- func (srv *server) Run() {
- // noop
- }
|