Skip to content

ZTO-Express/raft-grpc-transport

 
 

Repository files navigation

raft-grpc-transport

Godoc

This library provides a Transport for https://github.com/hashicorp/raft over gRPC.

One benefit of this is that gRPC is easy to multiplex over a single port.

Usage

// ...
tm := transport.New(raft.ServerAddress(myAddress), []grpc.DialOption{grpc.WithInsecure()})
s := grpc.NewServer()
tm.Register(s)
r, err := raft.NewRaft(..., tm.Transport())
// ...

Want more example code? Check out main.go at https://github.com/Jille/raft-grpc-example

About

Make hashicorp/raft communicate over gRPC

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.3%
  • Makefile 0.7%