An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 4.8% dependent repos on proxy.golang.org

proxy.golang.org : github.com/CanonicalLtd/raft-http

Package rafthttp provides an extension for the github.com/hashicorp/raft package. It implements a raft.StreamLayer that a raft.NetworkTransport can use to connect to and accept connections from other raft.Transport's using HTTP/WebSocket rather than straight TCP. This is handy for applications that expose an HTTP endpoint and don't want to open an extra TCP port for handling raft-level traffic. In addition to the regular raft.StreamLayer interface, rafthttp.Layer implements extra methods to join and leave a cluster. Typical usage of this package is as follows: - Create a rafthttp.Layer object passing it: The endpoint path you chose above, which will be used to establish outbound raft.Transport connections to other raft servers over HTTP/WebSocket. The network address of the net.Listener you used to start the http.Server, which will be used by the local raft server to know its own network address. The rafthttp.Handler object you created above, which will be used to accept inbound raft.NetworkTransport connections from other raft servers over HTTP/WebSocket. A rafthttp.Dial function, which will be used to establish outbound raft.NetworkTransport connections to other raft servers over HTTP/WebSocket (the rafthttp.Layer will use it to perform HTTP requests to other servers using your chosen endpoint path). - Create a raft.Raft server using the raft.NetworkTransport created above. To cleanly shutdown the service, first shutdown your raft.Raft instance, then call the CloseStreams() method of your raft.NetworkTransport instance (to close all connections) and then stop your http.Server. Connect threed raft nodes using HTTP network layers.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/%21canonical%21ltd/raft-http
License: Apache-2.0
Latest release: about 6 years ago
First release: about 6 years ago
Namespace: github.com/CanonicalLtd
Dependent repositories: 1
Stars: 2 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago

    Loading...
    Readme
    Loading...