Documentation ¶
Index ¶
- type Config
- type Info
- type Peer
- func (p *Peer) BlockStore() blockstore.Blockstore
- func (p *Peer) Bootstrap()
- func (p *Peer) Close() error
- func (p *Peer) DAGService() format.DAGService
- func (p *Peer) Host() host.Host
- func (p *Peer) Info() (*Info, error)
- func (p *Peer) ListPeers() []peer.ID
- func (p *Peer) NewTopic(ctx context.Context, topic string, subscribe bool) (*rpc.Topic, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { RepoPath string PrivKey crypto.PrivKey ListenMultiaddrs []string AnnounceMultiaddrs []string BootstrapAddrs []string ConnManager cconnmgr.ConnManager EnableQUIC bool EnableNATPortMap bool EnableMDNS bool MDNSIntervalSeconds int EnablePubSubPeerExchange bool EnablePubSubFloodPublish bool }
Config defines params for Peer configuration.
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
Peer wraps libp2p peer components for pubsub rpc.
func (*Peer) BlockStore ¶
func (p *Peer) BlockStore() blockstore.Blockstore
BlockStore returns the underlying format.DAGService.
func (*Peer) Bootstrap ¶
func (p *Peer) Bootstrap()
Bootstrap the market peer against Config.Bootstrap network peers. Some well-known network peers are included by default.
func (*Peer) DAGService ¶
func (p *Peer) DAGService() format.DAGService
DAGService returns the underlying format.DAGService.
Click to show internal directories.
Click to hide internal directories.