Skip to content

Commit 4d2e36a

Browse files
committed
Add status badges
Every repo needs them. Signed-off-by: David Bond <davidsbond93@gmail.com>
1 parent f678080 commit 4d2e36a

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# whisper
22

3+
[![go](https://github.com/davidsbond/whisper/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/davidsbond/whisper/actions/workflows/go.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/davidsbond/whisper.svg)](https://pkg.go.dev/github.com/davidsbond/whisper) ![GitHub License](https://img.shields.io/github/license/davidsbond/whisper)
4+
35
A gRPC-based gossip protocol
46

57
## About
68

79
`whisper` is a go package providing a simple gossip protocol mechanism that allows peers within a network to discover
8-
each other and share metadata. It utilises UDP and ECDH for fast and secure convergence. It is heavily inspired by
9-
[HashiCorp Serf](https://github.com/hashicorp/serf) and [Wireguard](https://www.wireguard.com/).
10+
each other and share metadata. It utilises UDP and ECDH for fast and secure convergence. It is inspired by technologies
11+
such as [HashiCorp Serf](https://github.com/hashicorp/serf) and [Wireguard](https://www.wireguard.com/).
12+
13+
Whisper aims to provide a foundation for building distributed systems where automatic discovery of new nodes is
14+
applicable, with an emphasis on keeping information about your peers secure.
1015

1116
### Joining
1217

@@ -101,16 +106,16 @@ within the network.
101106
```go
102107
// The PeerStore interface describes types that can persist peer data.
103108
PeerStore interface {
104-
// FindPeer should return the peer.Peer whose identifier matches the one provided. It should return
105-
// store.ErrPeerNotFound if a matching peer does not exist.
106-
FindPeer(ctx context.Context, id uint64) (peer.Peer, error)
107-
// SavePeer should persist the given peer.Peer.
108-
SavePeer(ctx context.Context, peer peer.Peer) error
109-
// ListPeers should return all peers within the store.
110-
ListPeers(ctx context.Context) ([]peer.Peer, error)
111-
// RemovePeer should remove a peer from the store. It should return store.ErrPeerNotFound if a matching
112-
// peer does not exist.
113-
RemovePeer(ctx context.Context, id uint64) error
109+
// FindPeer should return the peer.Peer whose identifier matches the one provided. It should return
110+
// store.ErrPeerNotFound if a matching peer does not exist.
111+
FindPeer(ctx context.Context, id uint64) (peer.Peer, error)
112+
// SavePeer should persist the given peer.Peer.
113+
SavePeer(ctx context.Context, peer peer.Peer) error
114+
// ListPeers should return all peers within the store.
115+
ListPeers(ctx context.Context) ([]peer.Peer, error)
116+
// RemovePeer should remove a peer from the store. It should return store.ErrPeerNotFound if a matching
117+
// peer does not exist.
118+
RemovePeer(ctx context.Context, id uint64) error
114119
}
115120
```
116121

0 commit comments

Comments
 (0)