You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
830 B

  1. /*
  2. grpcdb is the distribution of Tendermint's db.DB instances using
  3. the gRPC transport to decouple local db.DB usages from applications,
  4. to using them over a network in a highly performant manner.
  5. grpcdb allows users to initialize a database's server like
  6. they would locally and invoke the respective methods of db.DB.
  7. Most users shouldn't use this package, but should instead use
  8. remotedb. Only the lower level users and database server deployers
  9. should use it, for functionality such as:
  10. ln, err := net.Listen("tcp", "0.0.0.0:0")
  11. srv := grpcdb.NewServer()
  12. defer srv.Stop()
  13. go func() {
  14. if err := srv.Serve(ln); err != nil {
  15. t.Fatalf("BindServer: %v", err)
  16. }
  17. }()
  18. or
  19. addr := ":8998"
  20. go func() {
  21. if err := grpcdb.ListenAndServe(addr); err != nil {
  22. log.Fatalf("BindServer: %v", err)
  23. }
  24. }()
  25. */
  26. package grpcdb