Documentation
¶
Index ¶
- type Config
- type Service
- func (s *Service) Close() error
- func (s *Service) Create(_ context.Context, req *pb.CreateRequest) (*pb.CreateReply, error)
- func (s *Service) Delete(_ context.Context, req *pb.DeleteRequest) (*pb.DeleteReply, error)
- func (s *Service) Find(_ context.Context, req *pb.FindRequest) (*pb.FindReply, error)
- func (s *Service) FindByID(_ context.Context, req *pb.FindByIDRequest) (*pb.FindByIDReply, error)
- func (s *Service) GetDBInfo(ctx context.Context, req *pb.GetDBInfoRequest) (*pb.GetDBInfoReply, error)
- func (s *Service) Has(_ context.Context, req *pb.HasRequest) (*pb.HasReply, error)
- func (s *Service) Listen(req *pb.ListenRequest, server pb.API_ListenServer) error
- func (s *Service) NewCollection(_ context.Context, req *pb.NewCollectionRequest) (*pb.NewCollectionReply, error)
- func (s *Service) NewDB(ctx context.Context, req *pb.NewDBRequest) (*pb.NewDBReply, error)
- func (s *Service) NewDBFromAddr(ctx context.Context, req *pb.NewDBFromAddrRequest) (*pb.NewDBReply, error)
- func (s *Service) ReadTransaction(stream pb.API_ReadTransactionServer) error
- func (s *Service) Save(_ context.Context, req *pb.SaveRequest) (*pb.SaveReply, error)
- func (s *Service) WriteTransaction(stream pb.API_WriteTransactionServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶ added in v0.1.12
type Service struct {
// contains filtered or unexported fields
}
Service is a gRPC service for a DB manager.
func NewService ¶ added in v0.1.12
NewService starts and returns a new service with the given threadservice. The threadnet is *not* managed by the server.
func (*Service) Create ¶ added in v0.1.12
func (s *Service) Create(_ context.Context, req *pb.CreateRequest) (*pb.CreateReply, error)
Create adds a new instance of a collection to a db.
func (*Service) Delete ¶ added in v0.1.12
func (s *Service) Delete(_ context.Context, req *pb.DeleteRequest) (*pb.DeleteReply, error)
func (*Service) FindByID ¶ added in v0.1.12
func (s *Service) FindByID(_ context.Context, req *pb.FindByIDRequest) (*pb.FindByIDReply, error)
func (*Service) GetDBInfo ¶ added in v0.1.12
func (s *Service) GetDBInfo(ctx context.Context, req *pb.GetDBInfoRequest) (*pb.GetDBInfoReply, error)
GetDBInfo returns db addresses and keys.
func (*Service) Listen ¶ added in v0.1.12
func (s *Service) Listen(req *pb.ListenRequest, server pb.API_ListenServer) error
Listen returns a stream of instances, trigged by a local or remote state change.
func (*Service) NewCollection ¶ added in v0.1.12
func (s *Service) NewCollection(_ context.Context, req *pb.NewCollectionRequest) (*pb.NewCollectionReply, error)
NewCollection registers a JSON schema with a db.
func (*Service) NewDB ¶ added in v0.1.12
func (s *Service) NewDB(ctx context.Context, req *pb.NewDBRequest) (*pb.NewDBReply, error)
NewDB adds a new db into the manager.
func (*Service) NewDBFromAddr ¶ added in v0.1.12
func (s *Service) NewDBFromAddr(ctx context.Context, req *pb.NewDBFromAddrRequest) (*pb.NewDBReply, error)
NewDBFromAddr adds a new db into the manager from an existing address.
func (*Service) ReadTransaction ¶ added in v0.1.12
func (s *Service) ReadTransaction(stream pb.API_ReadTransactionServer) error
func (*Service) WriteTransaction ¶ added in v0.1.12
func (s *Service) WriteTransaction(stream pb.API_WriteTransactionServer) error
Click to show internal directories.
Click to hide internal directories.