Git Product home page Git Product logo

raft-grpc-transport's Introduction

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

raft-grpc-transport's People

Contributors

jille avatar rledisez avatar selljamhere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

raft-grpc-transport's Issues

Migrate off JSON

JSON is obviously not the right choice.

I was thinking about it, but didn't find a perfect decision yet. Many of the modern codecs (like Gob and msgpack) seem to include a structure definition at the beginning of the data, which isn't ideal for this case.

Maybe we should just redefine all the structs in protobuf, that's definitely the fastest+cleanest, but I wonder how that's gonna work when hashicorp/raft adds a new field and we will notice in a painful way that it's missing. Maybe an assertion at startup that encodes/decodes a message and checks it's byte-equal?

Security vulnerabilities in the project

The following security vulnerabilities were discovered during security scans using the trivy tool, would you please to trouble to fix them?
1

CVE-2021-43565 golang.org/x/crypto 0.0.0-20210921155107-089bfa567519 ->0.0.0-20211202192323-5770296d904e

2

CVE-2021-3121 github.com/gogo/protobuf 1.1.1 -> 1.3.2

3

CVE-2022-27191 golang.org/x/crypto 0.0.0-20210921155107-089bfa567519 -> 0.0.0-20220314234659-1baeb1ce4c0b

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.