Documentation
¶
Index ¶
- Constants
- Variables
- func AdvertiseAndDiscover(ctx context.Context, h host.Host, rd *drouting.RoutingDiscovery, ...)
- func ApplyInvite(cfg config.Config, inv Invite, pskPath string) (config.Config, error)
- func BootstrapPeers(cfg *config.Config) []string
- func DHTPrefix(cfg *config.Config) string
- func EncodeInvite(inv Invite) (string, error)
- func FetchDirectory(ctx context.Context, url string, store *Store, timeout time.Duration) (int, error)
- func GossipPrefix(cfg *config.Config) string
- func LoadPSK(path string) ([]byte, error)
- func NewGossipSub(ctx context.Context, h host.Host, kdht *dht.IpfsDHT) (*pubsub.PubSub, *drouting.RoutingDiscovery, error)
- func Scope(cfg *config.Config) string
- func SetupMDNS(ctx context.Context, h host.Host, dialTimeout time.Duration) (mdns.Service, error)
- func SignNetworkCard(c *NetworkCard, priv crypto.PrivKey) error
- func VerifyNetworkCard(c *NetworkCard) error
- type Invite
- type NetworkCard
- type NetworkDiscovery
- type Store
Constants ¶
View Source
const DiscoveryTopic = "plural-star:discovery:networks"
View Source
const GlobalScope = "global"
View Source
const NetworkDBDefault = "./networks.db"
Variables ¶
View Source
var DefaultBootstrapPeers = []string{
"/dns4/pluralstar.dedyn.io/tcp/4001/p2p/12D3KooWL4A25M2sWt1HoFY3r8hWn2idbc4yVdsdBqpFitRTNyfz",
}
Functions ¶
func AdvertiseAndDiscover ¶
func ApplyInvite ¶
func BootstrapPeers ¶
func EncodeInvite ¶
func FetchDirectory ¶
func GossipPrefix ¶
func NewGossipSub ¶
func SignNetworkCard ¶
func SignNetworkCard(c *NetworkCard, priv crypto.PrivKey) error
func VerifyNetworkCard ¶
func VerifyNetworkCard(c *NetworkCard) error
Types ¶
type Invite ¶
func DecodeInvite ¶
type NetworkCard ¶
type NetworkCard struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
BootstrapPeers []string `json:"bootstrap_peers"`
NodeCountHint int `json:"node_count_hint"`
CreatedBy string `json:"created_by"`
CreatedAt int64 `json:"created_at"`
Signature string `json:"signature"`
}
type NetworkDiscovery ¶
type NetworkDiscovery struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.