# README
neo-grpc
proto
gRPC .proto file specifies API of machbase-neomachrpc
reference implementation of gRPC client of machbase-neo with helper functions.driver
implmenetation of go sql/driver based gRPC
For Gophers
Install
go get -u github.com/machbase/neo-grpc
How to use
import "github.com/machbase/neo-grpc/machrpc"
cli := machrpc.NewClient(
machrpc.WithServer("127.0.0.1:5655"),
machrpc.WithCertificate("/path/to/client_key.pem", "/path/to/client_cert.pem", "/path/to/server_cert.pem"),
machrpc.WithQueryTimeout(5 * time.Second)
)
if err := cli.Connect(); err != nil {
panic(err)
}
defer cli.Disconnect()
sqlText := "insert into example (name, time, value) values (?, ?, ?)"
cli.Exec(sqlText, "tag-name", time.Now(), 3.1415)
For gRPC Developers
Settings for VSCode
.vscode/settings.json
{
"protoc": {
"options": [
"--proto_path=./proto"
]
}
}
protobuf compiler
- linux
sudo apt install -y protobuf-compiler
- macOS
brew install protobuf
- protoc-gen-go plugin
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# Packages
No description provided by the author
No description provided by the author
package machrpc is a refrence implementation of client that interwork with machbase-neo server via gRPC.
No description provided by the author
No description provided by the author
No description provided by the author