Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisServer ¶
func NewRedisServer(host, port, pubChannel, subChannel string) *redisServer
Types ¶
type Connection ¶
Connection holds the live communication between peers Events are sent to/from peers
func Subscribe ¶
func Subscribe(ctx context.Context, redis *redisServer, ps *pubsub.PubSub, meID peer.ID, topicName string, signKey ed25519.PrivateKey) (*Connection, error)
Subscribe tries to subscribe to the PubSub topic to initiate a connection, Connection is returned on success.
func (*Connection) ListPeers ¶
func (conn *Connection) ListPeers() []peer.ID
func (*Connection) ListenEvents ¶
func (conn *Connection) ListenEvents() error
Click to show internal directories.
Click to hide internal directories.