peerstore

package
v0.37.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a thread-safe store for peer connections.

func NewConnStore

func NewConnStore() *Store

func (*Store) AddPeerConn

func (s *Store) AddPeerConn(pubKey string, conn *peer.Conn) bool

func (*Store) AllowedIP

func (s *Store) AllowedIP(pubKey string) (net.IP, bool)

func (*Store) AllowedIPs

func (s *Store) AllowedIPs(pubKey string) (string, bool)

func (*Store) PeerConn

func (s *Store) PeerConn(pubKey string) (*peer.Conn, bool)

func (*Store) PeersPubKey

func (s *Store) PeersPubKey() []string

func (*Store) Remove

func (s *Store) Remove(pubKey string) (*peer.Conn, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳