alias.go 1.25 KB
Newer Older
tavit ohanian's avatar
tavit ohanian committed
1
// Package core provides convenient access to foundational, central go-p2p primitives via type aliases.
2 3 4
package core

import (
tavit ohanian's avatar
tavit ohanian committed
5
	"gitlab.dms3.io/mf/go-multiaddr"
tavit ohanian's avatar
tavit ohanian committed
6 7 8 9
	"gitlab.dms3.io/p2p/go-p2p-core/host"
	"gitlab.dms3.io/p2p/go-p2p-core/network"
	"gitlab.dms3.io/p2p/go-p2p-core/peer"
	"gitlab.dms3.io/p2p/go-p2p-core/protocol"
10 11
)

tavit ohanian's avatar
tavit ohanian committed
12
// Multiaddr aliases the Multiaddr type from gitlab.dms3.io/mf/go-multiaddr.
13 14 15 16 17 18 19 20 21
//
// Refer to the docs on that type for more info.
type Multiaddr = multiaddr.Multiaddr

// PeerID aliases peer.ID.
//
// Refer to the docs on that type for more info.
type PeerID = peer.ID

Tarun Bansal's avatar
Tarun Bansal committed
22
// ProtocolID aliases protocol.ID.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
//
// Refer to the docs on that type for more info.
type ProtocolID = protocol.ID

// PeerAddrInfo aliases peer.AddrInfo.
//
// Refer to the docs on that type for more info.
type PeerAddrInfo = peer.AddrInfo

// Host aliases host.Host.
//
// Refer to the docs on that type for more info.
type Host = host.Host

// Network aliases network.Network.
//
// Refer to the docs on that type for more info.
type Network = network.Network

// Conn aliases network.Conn.
//
// Refer to the docs on that type for more info.
type Conn = network.Conn

// Stream aliases network.Stream.
//
// Refer to the docs on that type for more info.
type Stream = network.Stream