peers

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPeerNotFound = errors.New("peer not found")
)

Functions

func NewMemoryPersistence

func NewMemoryPersistence() *memoryPersistence

func NewSQLitePersistence added in v0.0.21

func NewSQLitePersistence(db *sql.DB) sqlitePersistence

Types

type Persistence

type Persistence interface {
	Add(state.GroupID, state.PeerID) error
	GetByGroupID(group state.GroupID) ([]state.PeerID, error)
	Exists(state.GroupID, state.PeerID) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL