SYMBOL INDEX (5856 symbols across 528 files) FILE: config/config.go type NATManagerC (line 62) | type NATManagerC type RoutingC (line 64) | type RoutingC type AutoNATConfig (line 67) | type AutoNATConfig struct type Security (line 75) | type Security struct type Config (line 84) | type Config struct method makeSwarm (line 158) | func (cfg *Config) makeSwarm(eventBus event.Bus, enableMetrics bool) (... method makeAutoNATV2Host (line 219) | func (cfg *Config) makeAutoNATV2Host() (host.Host, error) { method addTransports (line 290) | func (cfg *Config) addTransports() ([]fx.Option, error) { method newBasicHost (line 443) | func (cfg *Config) newBasicHost(swrm *swarm.Swarm, eventBus event.Bus,... method validate (line 467) | func (cfg *Config) validate() error { method NewNode (line 490) | func (cfg *Config) NewNode() (host.Host, error) { method addAutoNAT (line 662) | func (cfg *Config) addAutoNAT(h *bhost.BasicHost) error { method Apply (line 770) | func (cfg *Config) Apply(opts ...Option) error { type Option (line 766) | type Option FILE: config/config_test.go function TestNilOption (line 7) | func TestNilOption(t *testing.T) { FILE: config/host.go type closableBasicHost (line 12) | type closableBasicHost struct method Close (line 17) | func (h *closableBasicHost) Close() error { type closableRoutedHost (line 22) | type closableRoutedHost struct method Close (line 29) | func (h *closableRoutedHost) Close() error { FILE: config/quic.go constant statelessResetKeyInfo (line 15) | statelessResetKeyInfo = "libp2p quic stateless reset key" constant tokenGeneratorKeyInfo (line 16) | tokenGeneratorKeyInfo = "libp2p quic token generator key" function PrivKeyToStatelessResetKey (line 19) | func PrivKeyToStatelessResetKey(key crypto.PrivKey) (quic.StatelessReset... function PrivKeyToTokenGeneratorKey (line 32) | func PrivKeyToTokenGeneratorKey(key crypto.PrivKey) (quic.TokenGenerator... FILE: core/connmgr/decay.go type Decayer (line 31) | type Decayer interface type DecayFn (line 49) | type DecayFn type BumpFn (line 55) | type BumpFn type DecayingTag (line 59) | type DecayingTag interface type DecayingValue (line 93) | type DecayingValue struct FILE: core/connmgr/gater.go type ConnectionGater (line 54) | type ConnectionGater interface FILE: core/connmgr/manager.go function SupportsDecay (line 19) | func SupportsDecay(mgr ConnManager) (Decayer, bool) { type ConnManager (line 33) | type ConnManager interface type TagInfo (line 86) | type TagInfo struct type GetConnLimiter (line 98) | type GetConnLimiter interface FILE: core/connmgr/null.go type NullConnMgr (line 11) | type NullConnMgr struct method TagPeer (line 15) | func (NullConnMgr) TagPeer(peer.ID, string, int) {} method UntagPeer (line 16) | func (NullConnMgr) UntagPeer(peer.ID, string) {} method UpsertTag (line 17) | func (NullConnMgr) UpsertTag(peer.ID, string, func(int) int) {} method GetTagInfo (line 18) | func (NullConnMgr) GetTagInfo(peer.ID) *TagInfo { return ... method TrimOpenConns (line 19) | func (NullConnMgr) TrimOpenConns(_ context.Context) {} method Notifee (line 20) | func (NullConnMgr) Notifee() network.Notifiee { return ... method Protect (line 21) | func (NullConnMgr) Protect(peer.ID, string) {} method Unprotect (line 22) | func (NullConnMgr) Unprotect(peer.ID, string) bool { return ... method IsProtected (line 23) | func (NullConnMgr) IsProtected(peer.ID, string) bool { return ... method CheckLimit (line 24) | func (NullConnMgr) CheckLimit(_ GetConnLimiter) error { return ... method Close (line 25) | func (NullConnMgr) Close() error { return ... FILE: core/connmgr/presets.go function DecayNone (line 9) | func DecayNone() DecayFn { function DecayFixed (line 17) | func DecayFixed(minuend int) DecayFn { function DecayLinear (line 26) | func DecayLinear(coef float64) DecayFn { function DecayExpireWhenInactive (line 34) | func DecayExpireWhenInactive(after time.Duration) DecayFn { function BumpSumUnbounded (line 42) | func BumpSumUnbounded() BumpFn { function BumpSumBounded (line 50) | func BumpSumBounded(min, max int) BumpFn { function BumpOverwrite (line 63) | func BumpOverwrite() BumpFn { FILE: core/control/disconnect.go type DisconnectReason (line 9) | type DisconnectReason FILE: core/crypto/bench_test.go function BenchmarkSignRSA1B (line 5) | func BenchmarkSignRSA1B(b *testing.B) { RunBenchmarkSignRSA(b, 1) } function BenchmarkSignRSA10B (line 6) | func BenchmarkSignRSA10B(b *testing.B) { RunBenchmarkSignRSA(b, 10) } function BenchmarkSignRSA100B (line 7) | func BenchmarkSignRSA100B(b *testing.B) { RunBenchmarkSignRSA(b, 100) } function BenchmarkSignRSA1000B (line 8) | func BenchmarkSignRSA1000B(b *testing.B) { RunBenchmarkSignRSA(b, 1000) } function BenchmarkSignRSA10000B (line 9) | func BenchmarkSignRSA10000B(b *testing.B) { RunBenchmarkSignRSA(b, 1000... function BenchmarkSignRSA100000B (line 10) | func BenchmarkSignRSA100000B(b *testing.B) { RunBenchmarkSignRSA(b, 1000... function BenchmarkVerifyRSA1B (line 12) | func BenchmarkVerifyRSA1B(b *testing.B) { RunBenchmarkVerifyRSA(b, ... function BenchmarkVerifyRSA10B (line 13) | func BenchmarkVerifyRSA10B(b *testing.B) { RunBenchmarkVerifyRSA(b, ... function BenchmarkVerifyRSA100B (line 14) | func BenchmarkVerifyRSA100B(b *testing.B) { RunBenchmarkVerifyRSA(b, ... function BenchmarkVerifyRSA1000B (line 15) | func BenchmarkVerifyRSA1000B(b *testing.B) { RunBenchmarkVerifyRSA(b, ... function BenchmarkVerifyRSA10000B (line 16) | func BenchmarkVerifyRSA10000B(b *testing.B) { RunBenchmarkVerifyRSA(b, ... function BenchmarkVerifyRSA100000B (line 17) | func BenchmarkVerifyRSA100000B(b *testing.B) { RunBenchmarkVerifyRSA(b, ... function BenchmarkSignEd255191B (line 19) | func BenchmarkSignEd255191B(b *testing.B) { RunBenchmarkSignEd25519... function BenchmarkSignEd2551910B (line 20) | func BenchmarkSignEd2551910B(b *testing.B) { RunBenchmarkSignEd25519... function BenchmarkSignEd25519100B (line 21) | func BenchmarkSignEd25519100B(b *testing.B) { RunBenchmarkSignEd25519... function BenchmarkSignEd255191000B (line 22) | func BenchmarkSignEd255191000B(b *testing.B) { RunBenchmarkSignEd25519... function BenchmarkSignEd2551910000B (line 23) | func BenchmarkSignEd2551910000B(b *testing.B) { RunBenchmarkSignEd25519... function BenchmarkSignEd25519100000B (line 24) | func BenchmarkSignEd25519100000B(b *testing.B) { RunBenchmarkSignEd25519... function BenchmarkVerifyEd255191B (line 26) | func BenchmarkVerifyEd255191B(b *testing.B) { RunBenchmarkVerifyEd2... function BenchmarkVerifyEd2551910B (line 27) | func BenchmarkVerifyEd2551910B(b *testing.B) { RunBenchmarkVerifyEd2... function BenchmarkVerifyEd25519100B (line 28) | func BenchmarkVerifyEd25519100B(b *testing.B) { RunBenchmarkVerifyEd2... function BenchmarkVerifyEd255191000B (line 29) | func BenchmarkVerifyEd255191000B(b *testing.B) { RunBenchmarkVerifyEd2... function BenchmarkVerifyEd2551910000B (line 30) | func BenchmarkVerifyEd2551910000B(b *testing.B) { RunBenchmarkVerifyEd2... function BenchmarkVerifyEd25519100000B (line 31) | func BenchmarkVerifyEd25519100000B(b *testing.B) { RunBenchmarkVerifyEd2... function RunBenchmarkSignRSA (line 33) | func RunBenchmarkSignRSA(b *testing.B, numBytes int) { function RunBenchmarkSignEd25519 (line 37) | func RunBenchmarkSignEd25519(b *testing.B, numBytes int) { function runBenchmarkSign (line 41) | func runBenchmarkSign(b *testing.B, numBytes int, t int) { function RunBenchmarkVerifyRSA (line 56) | func RunBenchmarkVerifyRSA(b *testing.B, numBytes int) { function RunBenchmarkVerifyEd25519 (line 60) | func RunBenchmarkVerifyEd25519(b *testing.B, numBytes int) { function runBenchmarkVerify (line 64) | func runBenchmarkVerify(b *testing.B, numBytes int, t int) { FILE: core/crypto/ecdsa.go type ECDSAPrivateKey (line 19) | type ECDSAPrivateKey struct method Type (line 117) | func (ePriv *ECDSAPrivateKey) Type() pb.KeyType { method Raw (line 122) | func (ePriv *ECDSAPrivateKey) Raw() (res []byte, err error) { method Equals (line 128) | func (ePriv *ECDSAPrivateKey) Equals(o Key) bool { method Sign (line 133) | func (ePriv *ECDSAPrivateKey) Sign(data []byte) (sig []byte, err error) { method GetPublic (line 148) | func (ePriv *ECDSAPrivateKey) GetPublic() PubKey { type ECDSAPublicKey (line 24) | type ECDSAPublicKey struct method Type (line 153) | func (ePub *ECDSAPublicKey) Type() pb.KeyType { method Raw (line 158) | func (ePub *ECDSAPublicKey) Raw() ([]byte, error) { method Equals (line 163) | func (ePub *ECDSAPublicKey) Equals(o Key) bool { method Verify (line 168) | func (ePub *ECDSAPublicKey) Verify(data, sigBytes []byte) (success boo... type ECDSASig (line 29) | type ECDSASig struct function GenerateECDSAKeyPair (line 47) | func GenerateECDSAKeyPair(src io.Reader) (PrivKey, PubKey, error) { function GenerateECDSAKeyPairWithCurve (line 52) | func GenerateECDSAKeyPairWithCurve(curve elliptic.Curve, src io.Reader) ... function ECDSAKeyPairFromKey (line 62) | func ECDSAKeyPairFromKey(priv *ecdsa.PrivateKey) (PrivKey, PubKey, error) { function ECDSAPublicKeyFromPubKey (line 71) | func ECDSAPublicKeyFromPubKey(pub ecdsa.PublicKey) (PubKey, error) { function MarshalECDSAPrivateKey (line 76) | func MarshalECDSAPrivateKey(ePriv ECDSAPrivateKey) (res []byte, err erro... function MarshalECDSAPublicKey (line 82) | func MarshalECDSAPublicKey(ePub ECDSAPublicKey) (res []byte, err error) { function UnmarshalECDSAPrivateKey (line 88) | func UnmarshalECDSAPrivateKey(data []byte) (res PrivKey, err error) { function UnmarshalECDSAPublicKey (line 100) | func UnmarshalECDSAPublicKey(data []byte) (key PubKey, err error) { FILE: core/crypto/ecdsa_test.go function TestECDSABasicSignAndVerify (line 9) | func TestECDSABasicSignAndVerify(t *testing.T) { function TestECDSASignZero (line 43) | func TestECDSASignZero(t *testing.T) { function TestECDSAMarshalLoop (line 64) | func TestECDSAMarshalLoop(t *testing.T) { function TestECDSAPublicKeyFromPubKey (line 99) | func TestECDSAPublicKeyFromPubKey(t *testing.T) { FILE: core/crypto/ed25519.go type Ed25519PrivateKey (line 16) | type Ed25519PrivateKey struct method Type (line 42) | func (k *Ed25519PrivateKey) Type() pb.KeyType { method Raw (line 47) | func (k *Ed25519PrivateKey) Raw() ([]byte, error) { method pubKeyBytes (line 58) | func (k *Ed25519PrivateKey) pubKeyBytes() []byte { method Equals (line 63) | func (k *Ed25519PrivateKey) Equals(o Key) bool { method GetPublic (line 73) | func (k *Ed25519PrivateKey) GetPublic() PubKey { method Sign (line 78) | func (k *Ed25519PrivateKey) Sign(msg []byte) (res []byte, err error) { type Ed25519PublicKey (line 21) | type Ed25519PublicKey struct method Type (line 85) | func (k *Ed25519PublicKey) Type() pb.KeyType { method Raw (line 90) | func (k *Ed25519PublicKey) Raw() ([]byte, error) { method Equals (line 95) | func (k *Ed25519PublicKey) Equals(o Key) bool { method Verify (line 105) | func (k *Ed25519PublicKey) Verify(data []byte, sig []byte) (success bo... function GenerateEd25519Key (line 26) | func GenerateEd25519Key(src io.Reader) (PrivKey, PubKey, error) { function UnmarshalEd25519PublicKey (line 118) | func UnmarshalEd25519PublicKey(data []byte) (PubKey, error) { function UnmarshalEd25519PrivateKey (line 129) | func UnmarshalEd25519PrivateKey(data []byte) (PrivKey, error) { FILE: core/crypto/ed25519_test.go function TestBasicSignAndVerify (line 13) | func TestBasicSignAndVerify(t *testing.T) { function TestSignZero (line 47) | func TestSignZero(t *testing.T) { function TestMarshalLoop (line 68) | func TestMarshalLoop(t *testing.T) { function TestUnmarshalErrors (line 152) | func TestUnmarshalErrors(t *testing.T) { FILE: core/crypto/fixture_test.go type testCase (line 17) | type testCase struct function fname (line 42) | func fname(kt crypto_pb.KeyType, ext string) string { function TestFixtures (line 46) | func TestFixtures(t *testing.T) { function init (line 101) | func init() { function generate (line 110) | func generate() { FILE: core/crypto/key.go constant RSA (line 20) | RSA = iota constant Ed25519 (line 22) | Ed25519 constant Secp256k1 (line 24) | Secp256k1 constant ECDSA (line 26) | ECDSA type PubKeyUnmarshaller (line 42) | type PubKeyUnmarshaller type PrivKeyUnmarshaller (line 45) | type PrivKeyUnmarshaller type Key (line 64) | type Key interface type PrivKey (line 79) | type PrivKey interface type PubKey (line 90) | type PubKey interface type GenSharedKey (line 98) | type GenSharedKey function GenerateKeyPair (line 101) | func GenerateKeyPair(typ, bits int) (PrivKey, PubKey, error) { function GenerateKeyPairWithReader (line 106) | func GenerateKeyPairWithReader(typ, bits int, src io.Reader) (PrivKey, P... function UnmarshalPublicKey (line 123) | func UnmarshalPublicKey(data []byte) (PubKey, error) { function PublicKeyFromProto (line 135) | func PublicKeyFromProto(pmes *pb.PublicKey) (PubKey, error) { function MarshalPublicKey (line 158) | func MarshalPublicKey(k PubKey) ([]byte, error) { function PublicKeyToProto (line 169) | func PublicKeyToProto(k PubKey) (*pb.PublicKey, error) { function UnmarshalPrivateKey (line 182) | func UnmarshalPrivateKey(data []byte) (PrivKey, error) { function MarshalPrivateKey (line 198) | func MarshalPrivateKey(k PrivKey) ([]byte, error) { function ConfigDecodeKey (line 210) | func ConfigDecodeKey(b string) ([]byte, error) { function ConfigEncodeKey (line 215) | func ConfigEncodeKey(b []byte) string { function KeyEqual (line 220) | func KeyEqual(k1, k2 Key) bool { function basicEquals (line 228) | func basicEquals(k1, k2 Key) bool { FILE: core/crypto/key_test.go function TestKeys (line 25) | func TestKeys(t *testing.T) { function TestKeyPairFromKey (line 31) | func TestKeyPairFromKey(t *testing.T) { function testKeyType (line 178) | func testKeyType(typ int, t *testing.T) { function testKeySignature (line 194) | func testKeySignature(t *testing.T, sk PrivKey) { function testKeyEncoding (line 217) | func testKeyEncoding(t *testing.T, sk PrivKey) { function testKeyEquals (line 266) | func testKeyEquals(t *testing.T, k Key) { FILE: core/crypto/key_to_stdlib.go function KeyPairFromStdKey (line 13) | func KeyPairFromStdKey(priv crypto.PrivateKey) (PrivKey, PubKey, error) { function PrivKeyToStdKey (line 41) | func PrivKeyToStdKey(priv PrivKey) (crypto.PrivateKey, error) { function PubKeyToStdKey (line 61) | func PubKeyToStdKey(pub PubKey) (crypto.PublicKey, error) { FILE: core/crypto/pb/crypto.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type KeyType (line 24) | type KeyType method Enum (line 49) | func (x KeyType) Enum() *KeyType { method String (line 55) | func (x KeyType) String() string { method Descriptor (line 59) | func (KeyType) Descriptor() protoreflect.EnumDescriptor { method Type (line 63) | func (KeyType) Type() protoreflect.EnumType { method Number (line 67) | func (x KeyType) Number() protoreflect.EnumNumber { method UnmarshalJSON (line 72) | func (x *KeyType) UnmarshalJSON(b []byte) error { method EnumDescriptor (line 82) | func (KeyType) EnumDescriptor() ([]byte, []int) { constant KeyType_RSA (line 27) | KeyType_RSA KeyType = 0 constant KeyType_Ed25519 (line 28) | KeyType_Ed25519 KeyType = 1 constant KeyType_Secp256k1 (line 29) | KeyType_Secp256k1 KeyType = 2 constant KeyType_ECDSA (line 30) | KeyType_ECDSA KeyType = 3 type PublicKey (line 86) | type PublicKey struct method Reset (line 94) | func (x *PublicKey) Reset() { method String (line 101) | func (x *PublicKey) String() string { method ProtoMessage (line 105) | func (*PublicKey) ProtoMessage() {} method ProtoReflect (line 107) | func (x *PublicKey) ProtoReflect() protoreflect.Message { method Descriptor (line 120) | func (*PublicKey) Descriptor() ([]byte, []int) { method GetType (line 124) | func (x *PublicKey) GetType() KeyType { method GetData (line 131) | func (x *PublicKey) GetData() []byte { type PrivateKey (line 138) | type PrivateKey struct method Reset (line 146) | func (x *PrivateKey) Reset() { method String (line 153) | func (x *PrivateKey) String() string { method ProtoMessage (line 157) | func (*PrivateKey) ProtoMessage() {} method ProtoReflect (line 159) | func (x *PrivateKey) ProtoReflect() protoreflect.Message { method Descriptor (line 172) | func (*PrivateKey) Descriptor() ([]byte, []int) { method GetType (line 176) | func (x *PrivateKey) GetType() KeyType { method GetData (line 183) | func (x *PrivateKey) GetData() []byte { constant file_core_crypto_pb_crypto_proto_rawDesc (line 192) | file_core_crypto_pb_crypto_proto_rawDesc = "" + function file_core_crypto_pb_crypto_proto_rawDescGZIP (line 213) | func file_core_crypto_pb_crypto_proto_rawDescGZIP() []byte { function init (line 237) | func init() { file_core_crypto_pb_crypto_proto_init() } function file_core_crypto_pb_crypto_proto_init (line 238) | func file_core_crypto_pb_crypto_proto_init() { FILE: core/crypto/rsa_common.go constant WeakRsaKeyEnv (line 11) | WeakRsaKeyEnv = "LIBP2P_ALLOW_WEAK_RSA_KEYS" function init (line 22) | func init() { FILE: core/crypto/rsa_go.go type RsaPrivateKey (line 17) | type RsaPrivateKey struct method Sign (line 83) | func (sk *RsaPrivateKey) Sign(message []byte) (sig []byte, err error) { method GetPublic (line 90) | func (sk *RsaPrivateKey) GetPublic() PubKey { method Type (line 94) | func (sk *RsaPrivateKey) Type() pb.KeyType { method Raw (line 98) | func (sk *RsaPrivateKey) Raw() (res []byte, err error) { method Equals (line 105) | func (sk *RsaPrivateKey) Equals(k Key) bool { type RsaPublicKey (line 22) | type RsaPublicKey struct method Verify (line 45) | func (pk *RsaPublicKey) Verify(data, sig []byte) (success bool, err er... method Type (line 62) | func (pk *RsaPublicKey) Type() pb.KeyType { method Raw (line 66) | func (pk *RsaPublicKey) Raw() (res []byte, err error) { method Equals (line 72) | func (pk *RsaPublicKey) Equals(k Key) bool { function GenerateRSAKeyPair (line 29) | func GenerateRSAKeyPair(bits int, src io.Reader) (PrivKey, PubKey, error) { function UnmarshalRsaPrivateKey (line 120) | func UnmarshalRsaPrivateKey(b []byte) (key PrivKey, err error) { function UnmarshalRsaPublicKey (line 136) | func UnmarshalRsaPublicKey(b []byte) (key PubKey, err error) { FILE: core/crypto/rsa_test.go function TestRSABasicSignAndVerify (line 8) | func TestRSABasicSignAndVerify(t *testing.T) { function TestRSASmallKey (line 42) | func TestRSASmallKey(t *testing.T) { function TestRSABigKeyFailsToGenerate (line 71) | func TestRSABigKeyFailsToGenerate(t *testing.T) { function TestRSABigKey (line 78) | func TestRSABigKey(t *testing.T) { function TestRSASignZero (line 109) | func TestRSASignZero(t *testing.T) { function TestRSAMarshalLoop (line 130) | func TestRSAMarshalLoop(t *testing.T) { FILE: core/crypto/secp256k1.go type Secp256k1PrivateKey (line 16) | type Secp256k1PrivateKey method Type (line 55) | func (k *Secp256k1PrivateKey) Type() pb.KeyType { method Raw (line 60) | func (k *Secp256k1PrivateKey) Raw() ([]byte, error) { method Equals (line 65) | func (k *Secp256k1PrivateKey) Equals(o Key) bool { method Sign (line 75) | func (k *Secp256k1PrivateKey) Sign(data []byte) (_sig []byte, err erro... method GetPublic (line 85) | func (k *Secp256k1PrivateKey) GetPublic() PubKey { type Secp256k1PublicKey (line 19) | type Secp256k1PublicKey method Type (line 90) | func (k *Secp256k1PublicKey) Type() pb.KeyType { method Raw (line 95) | func (k *Secp256k1PublicKey) Raw() (res []byte, err error) { method Equals (line 101) | func (k *Secp256k1PublicKey) Equals(o Key) bool { method Verify (line 111) | func (k *Secp256k1PublicKey) Verify(data []byte, sigStr []byte) (succe... function GenerateSecp256k1Key (line 22) | func GenerateSecp256k1Key(_ io.Reader) (PrivKey, PubKey, error) { function UnmarshalSecp256k1PrivateKey (line 33) | func UnmarshalSecp256k1PrivateKey(data []byte) (k PrivKey, err error) { function UnmarshalSecp256k1PublicKey (line 44) | func UnmarshalSecp256k1PublicKey(data []byte) (_k PubKey, err error) { FILE: core/crypto/secp256k1_test.go function TestSecp256k1BasicSignAndVerify (line 8) | func TestSecp256k1BasicSignAndVerify(t *testing.T) { function TestSecp256k1SignZero (line 42) | func TestSecp256k1SignZero(t *testing.T) { function TestSecp256k1MarshalLoop (line 63) | func TestSecp256k1MarshalLoop(t *testing.T) { FILE: core/discovery/discovery.go type Advertiser (line 12) | type Advertiser interface type Discoverer (line 18) | type Discoverer interface type Discovery (line 24) | type Discovery interface FILE: core/discovery/options.go type Option (line 6) | type Option type Options (line 9) | type Options struct method Apply (line 18) | func (opts *Options) Apply(options ...Option) error { function TTL (line 28) | func TTL(ttl time.Duration) Option { function Limit (line 36) | func Limit(limit int) Option { FILE: core/event/addrs.go type AddrAction (line 11) | type AddrAction constant Unknown (line 16) | Unknown AddrAction = iota constant Added (line 19) | Added constant Maintained (line 23) | Maintained constant Removed (line 26) | Removed type UpdatedAddress (line 31) | type UpdatedAddress struct type EvtLocalAddressesUpdated (line 64) | type EvtLocalAddressesUpdated struct type EvtAutoRelayAddrsUpdated (line 86) | type EvtAutoRelayAddrsUpdated struct FILE: core/event/bus.go type wildcardSubscriptionType (line 19) | type wildcardSubscriptionType type Emitter (line 26) | type Emitter interface type Subscription (line 37) | type Subscription interface type Bus (line 48) | type Bus interface FILE: core/event/dht.go type RawJSON (line 4) | type RawJSON type GenericDHTEvent (line 15) | type GenericDHTEvent struct FILE: core/event/identify.go type EvtPeerIdentificationCompleted (line 12) | type EvtPeerIdentificationCompleted struct type EvtPeerIdentificationFailed (line 41) | type EvtPeerIdentificationFailed struct FILE: core/event/nattype.go type EvtNATDeviceTypeChanged (line 10) | type EvtNATDeviceTypeChanged struct FILE: core/event/network.go type EvtPeerConnectednessChanged (line 50) | type EvtPeerConnectednessChanged struct FILE: core/event/protocol.go type EvtPeerProtocolsUpdated (line 9) | type EvtPeerProtocolsUpdated struct type EvtLocalProtocolsUpdated (line 21) | type EvtLocalProtocolsUpdated struct FILE: core/event/reachability.go type EvtLocalReachabilityChanged (line 12) | type EvtLocalReachabilityChanged struct type EvtHostReachableAddrsChanged (line 20) | type EvtHostReachableAddrsChanged struct FILE: core/host/helpers.go function InfoFromHost (line 6) | func InfoFromHost(h Host) *peer.AddrInfo { FILE: core/host/host.go type Host (line 24) | type Host interface FILE: core/internal/catch/catch.go function HandlePanic (line 13) | func HandlePanic(rerr any, err *error, where string) { FILE: core/internal/catch/catch_test.go function TestCatch (line 10) | func TestCatch(t *testing.T) { FILE: core/metrics/bandwidth.go type BandwidthCounter (line 16) | type BandwidthCounter struct method LogSentMessage (line 34) | func (bwc *BandwidthCounter) LogSentMessage(size int64) { method LogRecvMessage (line 40) | func (bwc *BandwidthCounter) LogRecvMessage(size int64) { method LogSentMessageStream (line 46) | func (bwc *BandwidthCounter) LogSentMessageStream(size int64, proto pr... method LogRecvMessageStream (line 53) | func (bwc *BandwidthCounter) LogRecvMessageStream(size int64, proto pr... method GetBandwidthForPeer (line 60) | func (bwc *BandwidthCounter) GetBandwidthForPeer(p peer.ID) (out Stats) { method GetBandwidthForProtocol (line 75) | func (bwc *BandwidthCounter) GetBandwidthForProtocol(proto protocol.ID... method GetBandwidthTotals (line 89) | func (bwc *BandwidthCounter) GetBandwidthTotals() (out Stats) { method GetBandwidthByPeer (line 103) | func (bwc *BandwidthCounter) GetBandwidthByPeer() map[peer.ID]Stats { method GetBandwidthByProtocol (line 132) | func (bwc *BandwidthCounter) GetBandwidthByProtocol() map[protocol.ID]... method Reset (line 159) | func (bwc *BandwidthCounter) Reset() { method TrimIdle (line 171) | func (bwc *BandwidthCounter) TrimIdle(since time.Time) { function NewBandwidthCounter (line 28) | func NewBandwidthCounter() *BandwidthCounter { FILE: core/metrics/bandwidth_test.go function init (line 20) | func init() { function BenchmarkBandwidthCounter (line 24) | func BenchmarkBandwidthCounter(b *testing.B) { function round (line 34) | func round(bwc *BandwidthCounter, b *testing.B) { function TestBandwidthCounter (line 61) | func TestBandwidthCounter(t *testing.T) { function TestResetBandwidthCounter (line 118) | func TestResetBandwidthCounter(t *testing.T) { FILE: core/metrics/reporter.go type Stats (line 14) | type Stats struct type Reporter (line 22) | type Reporter interface FILE: core/network/conn.go type ConnErrorCode (line 16) | type ConnErrorCode type ConnError (line 18) | type ConnError struct method Error (line 24) | func (c *ConnError) Error() string { method Is (line 35) | func (c *ConnError) Is(target error) bool { method Unwrap (line 42) | func (c *ConnError) Unwrap() []error { constant ConnNoError (line 47) | ConnNoError ConnErrorCode = 0 constant ConnProtocolNegotiationFailed (line 48) | ConnProtocolNegotiationFailed ConnErrorCode = 0x1000 constant ConnResourceLimitExceeded (line 49) | ConnResourceLimitExceeded ConnErrorCode = 0x1001 constant ConnRateLimited (line 50) | ConnRateLimited ConnErrorCode = 0x1002 constant ConnProtocolViolation (line 51) | ConnProtocolViolation ConnErrorCode = 0x1003 constant ConnSupplanted (line 52) | ConnSupplanted ConnErrorCode = 0x1004 constant ConnGarbageCollected (line 53) | ConnGarbageCollected ConnErrorCode = 0x1005 constant ConnShutdown (line 54) | ConnShutdown ConnErrorCode = 0x1006 constant ConnGated (line 55) | ConnGated ConnErrorCode = 0x1007 constant ConnCodeOutOfRange (line 56) | ConnCodeOutOfRange ConnErrorCode = 0x1008 type Conn (line 64) | type Conn interface type ConnectionState (line 107) | type ConnectionState struct type ConnSecurity (line 120) | type ConnSecurity interface type ConnMultiaddrs (line 136) | type ConnMultiaddrs interface type ConnStat (line 147) | type ConnStat interface type ConnScoper (line 154) | type ConnScoper interface FILE: core/network/context.go type noDialCtxKey (line 13) | type noDialCtxKey struct type dialPeerTimeoutCtxKey (line 14) | type dialPeerTimeoutCtxKey struct type forceDirectDialCtxKey (line 15) | type forceDirectDialCtxKey struct type allowLimitedConnCtxKey (line 16) | type allowLimitedConnCtxKey struct type simConnectCtxKey (line 17) | type simConnectCtxKey struct function WithForceDirectDial (line 28) | func WithForceDirectDial(ctx context.Context, reason string) context.Con... function GetForceDirectDial (line 34) | func GetForceDirectDial(ctx context.Context) (forceDirect bool, reason s... function WithSimultaneousConnect (line 46) | func WithSimultaneousConnect(ctx context.Context, isClient bool, reason ... function GetSimultaneousConnect (line 55) | func GetSimultaneousConnect(ctx context.Context) (simconnect bool, isCli... function WithNoDial (line 67) | func WithNoDial(ctx context.Context, reason string) context.Context { function GetNoDial (line 72) | func GetNoDial(ctx context.Context) (nodial bool, reason string) { function GetDialPeerTimeout (line 82) | func GetDialPeerTimeout(ctx context.Context) time.Duration { function WithDialPeerTimeout (line 93) | func WithDialPeerTimeout(ctx context.Context, timeout time.Duration) con... function WithAllowLimitedConn (line 100) | func WithAllowLimitedConn(ctx context.Context, reason string) context.Co... function WithUseTransient (line 108) | func WithUseTransient(ctx context.Context, reason string) context.Context { function GetAllowLimitedConn (line 113) | func GetAllowLimitedConn(ctx context.Context) (usetransient bool, reason... function GetUseTransient (line 124) | func GetUseTransient(ctx context.Context) (usetransient bool, reason str... FILE: core/network/context_test.go function TestDefaultTimeout (line 11) | func TestDefaultTimeout(t *testing.T) { function TestNonDefaultTimeout (line 19) | func TestNonDefaultTimeout(t *testing.T) { function TestSettingTimeout (line 32) | func TestSettingTimeout(t *testing.T) { function TestSimultaneousConnect (line 44) | func TestSimultaneousConnect(t *testing.T) { FILE: core/network/errors.go type temporaryError (line 8) | type temporaryError method Error (line 10) | func (e temporaryError) Error() string { return string(e) } method Temporary (line 11) | func (e temporaryError) Temporary() bool { return true } method Timeout (line 12) | func (e temporaryError) Timeout() bool { return false } FILE: core/network/mocks/mock_conn_management_scope.go type MockConnManagementScope (line 21) | type MockConnManagementScope struct method EXPECT (line 40) | func (m *MockConnManagementScope) EXPECT() *MockConnManagementScopeMoc... method BeginSpan (line 45) | func (m *MockConnManagementScope) BeginSpan() (network.ResourceScopeSp... method Done (line 60) | func (m *MockConnManagementScope) Done() { method PeerScope (line 72) | func (m *MockConnManagementScope) PeerScope() network.PeerScope { method ReleaseMemory (line 86) | func (m *MockConnManagementScope) ReleaseMemory(size int) { method ReserveMemory (line 98) | func (m *MockConnManagementScope) ReserveMemory(size int, prio uint8) ... method SetPeer (line 112) | func (m *MockConnManagementScope) SetPeer(arg0 peer.ID) error { method Stat (line 126) | func (m *MockConnManagementScope) Stat() network.ScopeStat { type MockConnManagementScopeMockRecorder (line 28) | type MockConnManagementScopeMockRecorder struct method BeginSpan (line 54) | func (mr *MockConnManagementScopeMockRecorder) BeginSpan() *gomock.Call { method Done (line 66) | func (mr *MockConnManagementScopeMockRecorder) Done() *gomock.Call { method PeerScope (line 80) | func (mr *MockConnManagementScopeMockRecorder) PeerScope() *gomock.Call { method ReleaseMemory (line 92) | func (mr *MockConnManagementScopeMockRecorder) ReleaseMemory(size any)... method ReserveMemory (line 106) | func (mr *MockConnManagementScopeMockRecorder) ReserveMemory(size, pri... method SetPeer (line 120) | func (mr *MockConnManagementScopeMockRecorder) SetPeer(arg0 any) *gomo... method Stat (line 134) | func (mr *MockConnManagementScopeMockRecorder) Stat() *gomock.Call { function NewMockConnManagementScope (line 33) | func NewMockConnManagementScope(ctrl *gomock.Controller) *MockConnManage... FILE: core/network/mocks/mock_peer_scope.go type MockPeerScope (line 21) | type MockPeerScope struct method EXPECT (line 40) | func (m *MockPeerScope) EXPECT() *MockPeerScopeMockRecorder { method BeginSpan (line 45) | func (m *MockPeerScope) BeginSpan() (network.ResourceScopeSpan, error) { method Peer (line 60) | func (m *MockPeerScope) Peer() peer.ID { method ReleaseMemory (line 74) | func (m *MockPeerScope) ReleaseMemory(size int) { method ReserveMemory (line 86) | func (m *MockPeerScope) ReserveMemory(size int, prio uint8) error { method Stat (line 100) | func (m *MockPeerScope) Stat() network.ScopeStat { type MockPeerScopeMockRecorder (line 28) | type MockPeerScopeMockRecorder struct method BeginSpan (line 54) | func (mr *MockPeerScopeMockRecorder) BeginSpan() *gomock.Call { method Peer (line 68) | func (mr *MockPeerScopeMockRecorder) Peer() *gomock.Call { method ReleaseMemory (line 80) | func (mr *MockPeerScopeMockRecorder) ReleaseMemory(size any) *gomock.C... method ReserveMemory (line 94) | func (mr *MockPeerScopeMockRecorder) ReserveMemory(size, prio any) *go... method Stat (line 108) | func (mr *MockPeerScopeMockRecorder) Stat() *gomock.Call { function NewMockPeerScope (line 33) | func NewMockPeerScope(ctrl *gomock.Controller) *MockPeerScope { FILE: core/network/mocks/mock_protocol_scope.go type MockProtocolScope (line 21) | type MockProtocolScope struct method EXPECT (line 40) | func (m *MockProtocolScope) EXPECT() *MockProtocolScopeMockRecorder { method BeginSpan (line 45) | func (m *MockProtocolScope) BeginSpan() (network.ResourceScopeSpan, er... method Protocol (line 60) | func (m *MockProtocolScope) Protocol() protocol.ID { method ReleaseMemory (line 74) | func (m *MockProtocolScope) ReleaseMemory(size int) { method ReserveMemory (line 86) | func (m *MockProtocolScope) ReserveMemory(size int, prio uint8) error { method Stat (line 100) | func (m *MockProtocolScope) Stat() network.ScopeStat { type MockProtocolScopeMockRecorder (line 28) | type MockProtocolScopeMockRecorder struct method BeginSpan (line 54) | func (mr *MockProtocolScopeMockRecorder) BeginSpan() *gomock.Call { method Protocol (line 68) | func (mr *MockProtocolScopeMockRecorder) Protocol() *gomock.Call { method ReleaseMemory (line 80) | func (mr *MockProtocolScopeMockRecorder) ReleaseMemory(size any) *gomo... method ReserveMemory (line 94) | func (mr *MockProtocolScopeMockRecorder) ReserveMemory(size, prio any)... method Stat (line 108) | func (mr *MockProtocolScopeMockRecorder) Stat() *gomock.Call { function NewMockProtocolScope (line 33) | func NewMockProtocolScope(ctrl *gomock.Controller) *MockProtocolScope { FILE: core/network/mocks/mock_resource_manager.go type MockResourceManager (line 24) | type MockResourceManager struct method EXPECT (line 43) | func (m *MockResourceManager) EXPECT() *MockResourceManagerMockRecorder { method Close (line 48) | func (m *MockResourceManager) Close() error { method OpenConnection (line 62) | func (m *MockResourceManager) OpenConnection(dir network.Direction, us... method OpenStream (line 77) | func (m *MockResourceManager) OpenStream(p peer.ID, dir network.Direct... method VerifySourceAddress (line 92) | func (m *MockResourceManager) VerifySourceAddress(addr net.Addr) bool { method ViewPeer (line 106) | func (m *MockResourceManager) ViewPeer(arg0 peer.ID, arg1 func(network... method ViewProtocol (line 120) | func (m *MockResourceManager) ViewProtocol(arg0 protocol.ID, arg1 func... method ViewService (line 134) | func (m *MockResourceManager) ViewService(arg0 string, arg1 func(netwo... method ViewSystem (line 148) | func (m *MockResourceManager) ViewSystem(arg0 func(network.ResourceSco... method ViewTransient (line 162) | func (m *MockResourceManager) ViewTransient(arg0 func(network.Resource... type MockResourceManagerMockRecorder (line 31) | type MockResourceManagerMockRecorder struct method Close (line 56) | func (mr *MockResourceManagerMockRecorder) Close() *gomock.Call { method OpenConnection (line 71) | func (mr *MockResourceManagerMockRecorder) OpenConnection(dir, usefd, ... method OpenStream (line 86) | func (mr *MockResourceManagerMockRecorder) OpenStream(p, dir any) *gom... method VerifySourceAddress (line 100) | func (mr *MockResourceManagerMockRecorder) VerifySourceAddress(addr an... method ViewPeer (line 114) | func (mr *MockResourceManagerMockRecorder) ViewPeer(arg0, arg1 any) *g... method ViewProtocol (line 128) | func (mr *MockResourceManagerMockRecorder) ViewProtocol(arg0, arg1 any... method ViewService (line 142) | func (mr *MockResourceManagerMockRecorder) ViewService(arg0, arg1 any)... method ViewSystem (line 156) | func (mr *MockResourceManagerMockRecorder) ViewSystem(arg0 any) *gomoc... method ViewTransient (line 170) | func (mr *MockResourceManagerMockRecorder) ViewTransient(arg0 any) *go... function NewMockResourceManager (line 36) | func NewMockResourceManager(ctrl *gomock.Controller) *MockResourceManager { FILE: core/network/mocks/mock_resource_scope_span.go type MockResourceScopeSpan (line 20) | type MockResourceScopeSpan struct method EXPECT (line 39) | func (m *MockResourceScopeSpan) EXPECT() *MockResourceScopeSpanMockRec... method BeginSpan (line 44) | func (m *MockResourceScopeSpan) BeginSpan() (network.ResourceScopeSpan... method Done (line 59) | func (m *MockResourceScopeSpan) Done() { method ReleaseMemory (line 71) | func (m *MockResourceScopeSpan) ReleaseMemory(size int) { method ReserveMemory (line 83) | func (m *MockResourceScopeSpan) ReserveMemory(size int, prio uint8) er... method Stat (line 97) | func (m *MockResourceScopeSpan) Stat() network.ScopeStat { type MockResourceScopeSpanMockRecorder (line 27) | type MockResourceScopeSpanMockRecorder struct method BeginSpan (line 53) | func (mr *MockResourceScopeSpanMockRecorder) BeginSpan() *gomock.Call { method Done (line 65) | func (mr *MockResourceScopeSpanMockRecorder) Done() *gomock.Call { method ReleaseMemory (line 77) | func (mr *MockResourceScopeSpanMockRecorder) ReleaseMemory(size any) *... method ReserveMemory (line 91) | func (mr *MockResourceScopeSpanMockRecorder) ReserveMemory(size, prio ... method Stat (line 105) | func (mr *MockResourceScopeSpanMockRecorder) Stat() *gomock.Call { function NewMockResourceScopeSpan (line 32) | func NewMockResourceScopeSpan(ctrl *gomock.Controller) *MockResourceScop... FILE: core/network/mocks/mock_stream_management_scope.go type MockStreamManagementScope (line 21) | type MockStreamManagementScope struct method EXPECT (line 40) | func (m *MockStreamManagementScope) EXPECT() *MockStreamManagementScop... method BeginSpan (line 45) | func (m *MockStreamManagementScope) BeginSpan() (network.ResourceScope... method Done (line 60) | func (m *MockStreamManagementScope) Done() { method PeerScope (line 72) | func (m *MockStreamManagementScope) PeerScope() network.PeerScope { method ProtocolScope (line 86) | func (m *MockStreamManagementScope) ProtocolScope() network.ProtocolSc... method ReleaseMemory (line 100) | func (m *MockStreamManagementScope) ReleaseMemory(size int) { method ReserveMemory (line 112) | func (m *MockStreamManagementScope) ReserveMemory(size int, prio uint8... method ServiceScope (line 126) | func (m *MockStreamManagementScope) ServiceScope() network.ServiceScope { method SetProtocol (line 140) | func (m *MockStreamManagementScope) SetProtocol(proto protocol.ID) err... method SetService (line 154) | func (m *MockStreamManagementScope) SetService(srv string) error { method Stat (line 168) | func (m *MockStreamManagementScope) Stat() network.ScopeStat { type MockStreamManagementScopeMockRecorder (line 28) | type MockStreamManagementScopeMockRecorder struct method BeginSpan (line 54) | func (mr *MockStreamManagementScopeMockRecorder) BeginSpan() *gomock.C... method Done (line 66) | func (mr *MockStreamManagementScopeMockRecorder) Done() *gomock.Call { method PeerScope (line 80) | func (mr *MockStreamManagementScopeMockRecorder) PeerScope() *gomock.C... method ProtocolScope (line 94) | func (mr *MockStreamManagementScopeMockRecorder) ProtocolScope() *gomo... method ReleaseMemory (line 106) | func (mr *MockStreamManagementScopeMockRecorder) ReleaseMemory(size an... method ReserveMemory (line 120) | func (mr *MockStreamManagementScopeMockRecorder) ReserveMemory(size, p... method ServiceScope (line 134) | func (mr *MockStreamManagementScopeMockRecorder) ServiceScope() *gomoc... method SetProtocol (line 148) | func (mr *MockStreamManagementScopeMockRecorder) SetProtocol(proto any... method SetService (line 162) | func (mr *MockStreamManagementScopeMockRecorder) SetService(srv any) *... method Stat (line 176) | func (mr *MockStreamManagementScopeMockRecorder) Stat() *gomock.Call { function NewMockStreamManagementScope (line 33) | func NewMockStreamManagementScope(ctrl *gomock.Controller) *MockStreamMa... FILE: core/network/mux.go type StreamErrorCode (line 15) | type StreamErrorCode type StreamError (line 17) | type StreamError struct method Error (line 23) | func (s *StreamError) Error() string { method Is (line 34) | func (s *StreamError) Is(target error) bool { method Unwrap (line 41) | func (s *StreamError) Unwrap() []error { constant StreamNoError (line 46) | StreamNoError StreamErrorCode = 0 constant StreamProtocolNegotiationFailed (line 47) | StreamProtocolNegotiationFailed StreamErrorCode = 0x1001 constant StreamResourceLimitExceeded (line 48) | StreamResourceLimitExceeded StreamErrorCode = 0x1002 constant StreamRateLimited (line 49) | StreamRateLimited StreamErrorCode = 0x1003 constant StreamProtocolViolation (line 50) | StreamProtocolViolation StreamErrorCode = 0x1004 constant StreamSupplanted (line 51) | StreamSupplanted StreamErrorCode = 0x1005 constant StreamGarbageCollected (line 52) | StreamGarbageCollected StreamErrorCode = 0x1006 constant StreamShutdown (line 53) | StreamShutdown StreamErrorCode = 0x1007 constant StreamGated (line 54) | StreamGated StreamErrorCode = 0x1008 constant StreamCodeOutOfRange (line 55) | StreamCodeOutOfRange StreamErrorCode = 0x1009 type MuxedStream (line 59) | type MuxedStream interface type MuxedConn (line 123) | type MuxedConn interface type Multiplexer (line 159) | type Multiplexer interface FILE: core/network/nattype.go type NATDeviceType (line 4) | type NATDeviceType method String (line 45) | func (r NATDeviceType) String() string { constant NATDeviceTypeUnknown (line 8) | NATDeviceTypeUnknown NATDeviceType = iota constant NATDeviceTypeEndpointIndependent (line 20) | NATDeviceTypeEndpointIndependent constant NATDeviceTypeEndpointDependent (line 31) | NATDeviceTypeEndpointDependent constant NATDeviceTypeCone (line 38) | NATDeviceTypeCone = NATDeviceTypeEndpointIndependent constant NATDeviceTypeSymmetric (line 42) | NATDeviceTypeSymmetric = NATDeviceTypeEndpointDependent type NATTransportProtocol (line 59) | type NATTransportProtocol method String (line 68) | func (n NATTransportProtocol) String() string { constant NATTransportUDP (line 63) | NATTransportUDP NATTransportProtocol = iota constant NATTransportTCP (line 65) | NATTransportTCP FILE: core/network/network.go constant MessageSizeMax (line 23) | MessageSizeMax = 1 << 22 type Direction (line 26) | type Direction method String (line 39) | func (d Direction) String() string { constant DirUnknown (line 30) | DirUnknown Direction = iota constant DirInbound (line 32) | DirInbound constant DirOutbound (line 34) | DirOutbound constant unrecognized (line 37) | unrecognized = "(unrecognized)" type Connectedness (line 49) | type Connectedness method String (line 73) | func (c Connectedness) String() string { constant NotConnected (line 53) | NotConnected Connectedness = iota constant Connected (line 56) | Connected constant CanConnect (line 61) | CanConnect constant CannotConnect (line 67) | CannotConnect constant Limited (line 70) | Limited type Reachability (line 82) | type Reachability method String (line 100) | func (r Reachability) String() string { constant ReachabilityUnknown (line 87) | ReachabilityUnknown Reachability = iota constant ReachabilityPublic (line 91) | ReachabilityPublic constant ReachabilityPrivate (line 97) | ReachabilityPrivate type ConnStats (line 109) | type ConnStats struct type Stats (line 116) | type Stats struct type StreamHandler (line 131) | type StreamHandler type Network (line 137) | type Network interface type MultiaddrDNSResolver (line 164) | type MultiaddrDNSResolver interface type Dialer (line 175) | type Dialer interface type AddrDelay (line 212) | type AddrDelay struct type DialRanker (line 218) | type DialRanker FILE: core/network/notifee.go type Notifiee (line 9) | type Notifiee interface type NotifyBundle (line 19) | type NotifyBundle struct method Listen (line 30) | func (nb *NotifyBundle) Listen(n Network, a ma.Multiaddr) { method ListenClose (line 37) | func (nb *NotifyBundle) ListenClose(n Network, a ma.Multiaddr) { method Connected (line 44) | func (nb *NotifyBundle) Connected(n Network, c Conn) { method Disconnected (line 51) | func (nb *NotifyBundle) Disconnected(n Network, c Conn) { type NoopNotifiee (line 60) | type NoopNotifiee struct method Connected (line 64) | func (nn *NoopNotifiee) Connected(_ Network, _ Conn) {} method Disconnected (line 65) | func (nn *NoopNotifiee) Disconnected(_ Network, _ Conn) {} method Listen (line 66) | func (nn *NoopNotifiee) Listen(_ Network, _ ma.Multiaddr) {} method ListenClose (line 67) | func (nn *NoopNotifiee) ListenClose(_ Network, _ ma.Multiaddr) {} FILE: core/network/notifee_test.go function TestListen (line 9) | func TestListen(T *testing.T) { function TestListenClose (line 31) | func TestListenClose(T *testing.T) { function TestConnected (line 53) | func TestConnected(T *testing.T) { function TestDisconnected (line 71) | func TestDisconnected(T *testing.T) { FILE: core/network/rcmgr.go type ResourceManager (line 85) | type ResourceManager interface type ResourceScopeViewer (line 111) | type ResourceScopeViewer interface constant ReservationPriorityLow (line 140) | ReservationPriorityLow uint8 = 101 constant ReservationPriorityMedium (line 143) | ReservationPriorityMedium uint8 = 152 constant ReservationPriorityHigh (line 146) | ReservationPriorityHigh uint8 = 203 constant ReservationPriorityAlways (line 149) | ReservationPriorityAlways uint8 = 255 type ResourceScope (line 153) | type ResourceScope interface type ResourceScopeSpan (line 191) | type ResourceScopeSpan interface type ServiceScope (line 198) | type ServiceScope interface type ProtocolScope (line 206) | type ProtocolScope interface type PeerScope (line 214) | type PeerScope interface type ConnManagementScope (line 224) | type ConnManagementScope interface type ConnScope (line 236) | type ConnScope interface type StreamManagementScope (line 243) | type StreamManagementScope interface type StreamScope (line 262) | type StreamScope interface type ScopeStat (line 270) | type ScopeStat struct type connManagementScopeKey (line 281) | type connManagementScopeKey struct function WithConnManagementScope (line 283) | func WithConnManagementScope(ctx context.Context, scope ConnManagementSc... function UnwrapConnManagementScope (line 287) | func UnwrapConnManagementScope(ctx context.Context) (ConnManagementScope... type NullResourceManager (line 300) | type NullResourceManager struct method ViewSystem (line 317) | func (n *NullResourceManager) ViewSystem(f func(ResourceScope) error) ... method ViewTransient (line 320) | func (n *NullResourceManager) ViewTransient(f func(ResourceScope) erro... method ViewService (line 323) | func (n *NullResourceManager) ViewService(_ string, f func(ServiceScop... method ViewProtocol (line 326) | func (n *NullResourceManager) ViewProtocol(_ protocol.ID, f func(Proto... method ViewPeer (line 329) | func (n *NullResourceManager) ViewPeer(_ peer.ID, f func(PeerScope) er... method OpenConnection (line 332) | func (n *NullResourceManager) OpenConnection(_ Direction, _ bool, _ mu... method OpenStream (line 335) | func (n *NullResourceManager) OpenStream(_ peer.ID, _ Direction) (Stre... method VerifySourceAddress (line 338) | func (*NullResourceManager) VerifySourceAddress(_ net.Addr) bool { method Close (line 342) | func (n *NullResourceManager) Close() error { type NullScope (line 315) | type NullScope struct method ReserveMemory (line 346) | func (n *NullScope) ReserveMemory(_ int, _ uint8) error { return nil } method ReleaseMemory (line 347) | func (n *NullScope) ReleaseMemory(_ int) {} method Stat (line 348) | func (n *NullScope) Stat() ScopeStat { return Sc... method BeginSpan (line 349) | func (n *NullScope) BeginSpan() (ResourceScopeSpan, error) { return &N... method Done (line 350) | func (n *NullScope) Done() {} method Name (line 351) | func (n *NullScope) Name() string { return "" } method Protocol (line 352) | func (n *NullScope) Protocol() protocol.ID { return "" } method Peer (line 353) | func (n *NullScope) Peer() peer.ID { return "" } method PeerScope (line 354) | func (n *NullScope) PeerScope() PeerScope { return &N... method SetPeer (line 355) | func (n *NullScope) SetPeer(peer.ID) error { return nil } method ProtocolScope (line 356) | func (n *NullScope) ProtocolScope() ProtocolScope { return &N... method SetProtocol (line 357) | func (n *NullScope) SetProtocol(_ protocol.ID) error { return nil } method ServiceScope (line 358) | func (n *NullScope) ServiceScope() ServiceScope { return &N... method SetService (line 359) | func (n *NullScope) SetService(_ string) error { return nil } method VerifySourceAddress (line 360) | func (n *NullScope) VerifySourceAddress(_ net.Addr) bool { return fa... FILE: core/network/stream.go type Stream (line 12) | type Stream interface FILE: core/peer/addrinfo.go type AddrInfo (line 11) | type AddrInfo struct method String (line 18) | func (pi AddrInfo) String() string { method Loggable (line 121) | func (pi *AddrInfo) Loggable() map[string]any { function AddrInfosFromP2pAddrs (line 25) | func AddrInfosFromP2pAddrs(maddrs ...ma.Multiaddr) ([]AddrInfo, error) { function SplitAddr (line 51) | func SplitAddr(m ma.Multiaddr) (transport ma.Multiaddr, id ID) { function IDFromP2PAddr (line 65) | func IDFromP2PAddr(m ma.Multiaddr) (ID, error) { function AddrInfoFromString (line 83) | func AddrInfoFromString(s string) (*AddrInfo, error) { function AddrInfoFromP2pAddr (line 93) | func AddrInfoFromP2pAddr(m ma.Multiaddr) (*AddrInfo, error) { function AddrInfoToP2pAddrs (line 106) | func AddrInfoToP2pAddrs(pi *AddrInfo) ([]ma.Multiaddr, error) { function AddrInfosToIDs (line 129) | func AddrInfosToIDs(pis []AddrInfo) []ID { FILE: core/peer/addrinfo_serde.go type addrInfoJson (line 12) | type addrInfoJson struct method MarshalJSON (line 17) | func (pi AddrInfo) MarshalJSON() (res []byte, err error) { method UnmarshalJSON (line 30) | func (pi *AddrInfo) UnmarshalJSON(b []byte) (err error) { FILE: core/peer/addrinfo_test.go function init (line 17) | func init() { function TestSplitAddr (line 28) | func TestSplitAddr(t *testing.T) { function TestIDFromP2PAddr (line 54) | func TestIDFromP2PAddr(t *testing.T) { function TestAddrInfoFromP2pAddr (line 67) | func TestAddrInfoFromP2pAddr(t *testing.T) { function TestAddrInfosFromP2pAddrs (line 96) | func TestAddrInfosFromP2pAddrs(t *testing.T) { function TestAddrInfoJSON (line 150) | func TestAddrInfoJSON(t *testing.T) { FILE: core/peer/pb/peer_record.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type PeerRecord (line 32) | type PeerRecord struct method Reset (line 44) | func (x *PeerRecord) Reset() { method String (line 51) | func (x *PeerRecord) String() string { method ProtoMessage (line 55) | func (*PeerRecord) ProtoMessage() {} method ProtoReflect (line 57) | func (x *PeerRecord) ProtoReflect() protoreflect.Message { method Descriptor (line 70) | func (*PeerRecord) Descriptor() ([]byte, []int) { method GetPeerId (line 74) | func (x *PeerRecord) GetPeerId() []byte { method GetSeq (line 81) | func (x *PeerRecord) GetSeq() uint64 { method GetAddresses (line 88) | func (x *PeerRecord) GetAddresses() []*PeerRecord_AddressInfo { type PeerRecord_AddressInfo (line 97) | type PeerRecord_AddressInfo struct method Reset (line 104) | func (x *PeerRecord_AddressInfo) Reset() { method String (line 111) | func (x *PeerRecord_AddressInfo) String() string { method ProtoMessage (line 115) | func (*PeerRecord_AddressInfo) ProtoMessage() {} method ProtoReflect (line 117) | func (x *PeerRecord_AddressInfo) ProtoReflect() protoreflect.Message { method Descriptor (line 130) | func (*PeerRecord_AddressInfo) Descriptor() ([]byte, []int) { method GetMultiaddr (line 134) | func (x *PeerRecord_AddressInfo) GetMultiaddr() []byte { constant file_core_peer_pb_peer_record_proto_rawDesc (line 143) | file_core_peer_pb_peer_record_proto_rawDesc = "" + function file_core_peer_pb_peer_record_proto_rawDescGZIP (line 159) | func file_core_peer_pb_peer_record_proto_rawDescGZIP() []byte { function init (line 180) | func init() { file_core_peer_pb_peer_record_proto_init() } function file_core_peer_pb_peer_record_proto_init (line 181) | func file_core_peer_pb_peer_record_proto_init() { FILE: core/peer/peer.go constant maxInlineKeyLength (line 36) | maxInlineKeyLength = 42 type ID (line 42) | type ID method Loggable (line 45) | func (id ID) Loggable() map[string]any { method String (line 51) | func (id ID) String() string { method ShortString (line 61) | func (id ID) ShortString() string { method MatchesPrivateKey (line 70) | func (id ID) MatchesPrivateKey(sk ic.PrivKey) bool { method MatchesPublicKey (line 75) | func (id ID) MatchesPublicKey(pk ic.PubKey) bool { method ExtractPublicKey (line 87) | func (id ID) ExtractPublicKey() (ic.PubKey, error) { method Validate (line 103) | func (id ID) Validate() error { function IDFromBytes (line 113) | func IDFromBytes(b []byte) (ID, error) { function Decode (line 125) | func Decode(s string) (ID, error) { function FromCid (line 143) | func FromCid(c cid.Cid) (ID, error) { function ToCid (line 154) | func ToCid(id ID) cid.Cid { function IDFromPublicKey (line 163) | func IDFromPublicKey(pk ic.PubKey) (ID, error) { function IDFromPrivateKey (line 180) | func IDFromPrivateKey(sk ic.PrivKey) (ID, error) { type IDSlice (line 185) | type IDSlice method Len (line 187) | func (es IDSlice) Len() int { return len(es) } method Swap (line 188) | func (es IDSlice) Swap(i, j int) { es[i], es[j] = es[j], es[i] } method Less (line 189) | func (es IDSlice) Less(i, j int) bool { return string(es[i]) < string(... method String (line 191) | func (es IDSlice) String() string { FILE: core/peer/peer_serde.go method Marshal (line 20) | func (id ID) Marshal() ([]byte, error) { method MarshalBinary (line 25) | func (id ID) MarshalBinary() ([]byte, error) { method MarshalTo (line 29) | func (id ID) MarshalTo(data []byte) (n int, err error) { method Unmarshal (line 33) | func (id *ID) Unmarshal(data []byte) (err error) { method UnmarshalBinary (line 39) | func (id *ID) UnmarshalBinary(data []byte) error { method Size (line 43) | func (id ID) Size() int { method MarshalJSON (line 47) | func (id ID) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 51) | func (id *ID) UnmarshalJSON(data []byte) (err error) { method MarshalText (line 61) | func (id ID) MarshalText() ([]byte, error) { method UnmarshalText (line 66) | func (id *ID) UnmarshalText(data []byte) error { FILE: core/peer/peer_serde_test.go function TestPeerSerdePB (line 10) | func TestPeerSerdePB(t *testing.T) { function TestPeerSerdeJSON (line 29) | func TestPeerSerdeJSON(t *testing.T) { function TestBinaryMarshaler (line 47) | func TestBinaryMarshaler(t *testing.T) { function TestTextMarshaler (line 66) | func TestTextMarshaler(t *testing.T) { FILE: core/peer/peer_test.go function hash (line 22) | func hash(b []byte) []byte { function init (line 27) | func init() { type keyset (line 41) | type keyset struct method generate (line 48) | func (ks *keyset) generate() error { method load (line 65) | func (ks *keyset) load(hpkp, skBytesStr string) error { function TestIDMatchesPublicKey (line 90) | func TestIDMatchesPublicKey(t *testing.T) { function TestIDMatchesPrivateKey (line 124) | func TestIDMatchesPrivateKey(t *testing.T) { function TestIDEncoding (line 155) | func TestIDEncoding(t *testing.T) { function TestPublicKeyExtraction (line 200) | func TestPublicKeyExtraction(t *testing.T) { function TestValidate (line 252) | func TestValidate(t *testing.T) { FILE: core/peer/record.go function init (line 19) | func init() { constant PeerRecordEnvelopeDomain (line 24) | PeerRecordEnvelopeDomain = "libp2p-peer-record" type PeerRecord (line 83) | type PeerRecord struct method Domain (line 150) | func (r *PeerRecord) Domain() string { method Codec (line 155) | func (r *PeerRecord) Codec() []byte { method UnmarshalRecord (line 163) | func (r *PeerRecord) UnmarshalRecord(bytes []byte) (err error) { method MarshalRecord (line 188) | func (r *PeerRecord) MarshalRecord() (res []byte, err error) { method Equal (line 199) | func (r *PeerRecord) Equal(other *PeerRecord) bool { method ToProtobuf (line 221) | func (r *PeerRecord) ToProtobuf() (*pb.PeerRecord, error) { function NewPeerRecord (line 99) | func NewPeerRecord() *PeerRecord { function PeerRecordFromAddrInfo (line 105) | func PeerRecordFromAddrInfo(info AddrInfo) *PeerRecord { function PeerRecordFromProtobuf (line 114) | func PeerRecordFromProtobuf(msg *pb.PeerRecord) (*PeerRecord, error) { function TimestampSeq (line 135) | func TimestampSeq() uint64 { function addrsFromProtobuf (line 233) | func addrsFromProtobuf(addrs []*pb.PeerRecord_AddressInfo) []ma.Multiaddr { function addrsToProtobuf (line 245) | func addrsToProtobuf(addrs []ma.Multiaddr) []*pb.PeerRecord_AddressInfo { FILE: core/peer/record_test.go function TestPeerRecordConstants (line 13) | func TestPeerRecordConstants(t *testing.T) { function TestSignedPeerRecordFromEnvelope (line 25) | func TestSignedPeerRecordFromEnvelope(t *testing.T) { function TestTimestampSeq (line 58) | func TestTimestampSeq(t *testing.T) { FILE: core/peerstore/helpers.go function AddrInfos (line 8) | func AddrInfos(ps Peerstore, peers []peer.ID) []peer.AddrInfo { FILE: core/peerstore/peerstore.go constant PermanentAddrTTL (line 43) | PermanentAddrTTL = math.MaxInt64 - iota constant ConnectedAddrTTL (line 48) | ConnectedAddrTTL type Peerstore (line 53) | type Peerstore interface type PeerMetadata (line 82) | type PeerMetadata interface type AddrBook (line 94) | type AddrBook interface type CertifiedAddrBook (line 140) | type CertifiedAddrBook interface function GetCertifiedAddrBook (line 175) | func GetCertifiedAddrBook(ab AddrBook) (cab CertifiedAddrBook, ok bool) { type KeyBook (line 181) | type KeyBook interface type Metrics (line 204) | type Metrics interface type ProtoBook (line 217) | type ProtoBook interface FILE: core/pnet/codec.go function readHeader (line 19) | func readHeader(r *bufio.Reader) ([]byte, error) { function expectHeader (line 28) | func expectHeader(r *bufio.Reader, expected []byte) error { function DecodeV1PSK (line 40) | func DecodeV1PSK(in io.Reader) (PSK, error) { FILE: core/pnet/codec_test.go function bufWithBase (line 9) | func bufWithBase(base string, windows bool) *bytes.Buffer { function TestDecodeHex (line 24) | func TestDecodeHex(t *testing.T) { function TestDecodeBad (line 29) | func TestDecodeBad(t *testing.T) { function testDecodeBad (line 34) | func testDecodeBad(t *testing.T, windows bool) { function testDecodeHex (line 44) | func testDecodeHex(t *testing.T, windows bool) { function TestDecodeB64 (line 62) | func TestDecodeB64(t *testing.T) { function testDecodeB64 (line 67) | func testDecodeB64(t *testing.T, windows bool) { function TestDecodeBin (line 97) | func TestDecodeBin(t *testing.T) { function testDecodeBin (line 102) | func testDecodeBin(t *testing.T, windows bool) { FILE: core/pnet/env.go constant EnvKey (line 8) | EnvKey = "LIBP2P_FORCE_PNET" function init (line 17) | func init() { FILE: core/pnet/error.go type Error (line 9) | type Error interface function NewError (line 14) | func NewError(err string) error { function IsPNetError (line 19) | func IsPNetError(err error) bool { type pnetErr (line 24) | type pnetErr method Error (line 28) | func (p pnetErr) Error() string { method IsPNetError (line 32) | func (pnetErr) IsPNetError() bool { FILE: core/pnet/error_test.go function TestIsPnetErr (line 8) | func TestIsPnetErr(t *testing.T) { FILE: core/pnet/protector.go type PSK (line 7) | type PSK FILE: core/protocol/id.go type ID (line 4) | type ID constant TestingID (line 8) | TestingID ID = "/p2p/_testing" function ConvertFromStrings (line 13) | func ConvertFromStrings(ids []string) (res []ID) { function ConvertToStrings (line 23) | func ConvertToStrings(ids []ID) (res []string) { FILE: core/protocol/switch.go type Router (line 26) | type Router interface type Negotiator (line 55) | type Negotiator interface type Switch (line 70) | type Switch interface FILE: core/record/envelope.go type Envelope (line 25) | type Envelope struct method Marshal (line 191) | func (e *Envelope) Marshal() (res []byte, err error) { method Equal (line 210) | func (e *Envelope) Equal(other *Envelope) bool { method Record (line 225) | func (e *Envelope) Record() (Record, error) { method TypedRecord (line 242) | func (e *Envelope) TypedRecord(dest Record) error { method validate (line 248) | func (e *Envelope) validate(domain string) error { function Seal (line 51) | func Seal(rec Record, privateKey crypto.PrivKey) (*Envelope, error) { function ConsumeEnvelope (line 110) | func ConsumeEnvelope(data []byte, domain string) (envelope *Envelope, re... function ConsumeTypedEnvelope (line 149) | func ConsumeTypedEnvelope(data []byte, destRecord Record) (envelope *Env... function UnmarshalEnvelope (line 170) | func UnmarshalEnvelope(data []byte) (*Envelope, error) { function makeUnsigned (line 268) | func makeUnsigned(domain string, payloadType []byte, payload []byte) ([]... FILE: core/record/envelope_test.go type simpleRecord (line 16) | type simpleRecord struct method Domain (line 22) | func (r *simpleRecord) Domain() string { method Codec (line 29) | func (r *simpleRecord) Codec() []byte { method MarshalRecord (line 36) | func (r *simpleRecord) MarshalRecord() ([]byte, error) { method UnmarshalRecord (line 40) | func (r *simpleRecord) UnmarshalRecord(buf []byte) error { function TestEnvelopeHappyPath (line 46) | func TestEnvelopeHappyPath(t *testing.T) { function TestConsumeTypedEnvelope (line 92) | func TestConsumeTypedEnvelope(t *testing.T) { function TestMakeEnvelopeFailsWithEmptyDomain (line 113) | func TestMakeEnvelopeFailsWithEmptyDomain(t *testing.T) { function TestMakeEnvelopeFailsWithEmptyPayloadType (line 131) | func TestMakeEnvelopeFailsWithEmptyPayloadType(t *testing.T) { type failingRecord (line 148) | type failingRecord struct method Domain (line 153) | func (r failingRecord) Domain() string { method Codec (line 157) | func (r failingRecord) Codec() []byte { method MarshalRecord (line 161) | func (r failingRecord) MarshalRecord() ([]byte, error) { method UnmarshalRecord (line 167) | func (r failingRecord) UnmarshalRecord(_ []byte) error { function TestSealFailsIfRecordMarshalFails (line 174) | func TestSealFailsIfRecordMarshalFails(t *testing.T) { function TestConsumeEnvelopeFailsIfEnvelopeUnmarshalFails (line 187) | func TestConsumeEnvelopeFailsIfEnvelopeUnmarshalFails(t *testing.T) { function TestConsumeEnvelopeFailsIfRecordUnmarshalFails (line 192) | func TestConsumeEnvelopeFailsIfRecordUnmarshalFails(t *testing.T) { function TestConsumeTypedEnvelopeFailsIfRecordUnmarshalFails (line 212) | func TestConsumeTypedEnvelopeFailsIfRecordUnmarshalFails(t *testing.T) { function TestEnvelopeValidateFailsForDifferentDomain (line 233) | func TestEnvelopeValidateFailsForDifferentDomain(t *testing.T) { function TestEnvelopeValidateFailsIfPayloadTypeIsAltered (line 252) | func TestEnvelopeValidateFailsIfPayloadTypeIsAltered(t *testing.T) { function TestEnvelopeValidateFailsIfContentsAreAltered (line 273) | func TestEnvelopeValidateFailsIfContentsAreAltered(t *testing.T) { function alterMessageAndMarshal (line 299) | func alterMessageAndMarshal(t *testing.T, envelope *Envelope, alterMsg f... FILE: core/record/pb/envelope.pb.go constant _ (line 20) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 22) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type Envelope (line 32) | type Envelope struct method Reset (line 50) | func (x *Envelope) Reset() { method String (line 57) | func (x *Envelope) String() string { method ProtoMessage (line 61) | func (*Envelope) ProtoMessage() {} method ProtoReflect (line 63) | func (x *Envelope) ProtoReflect() protoreflect.Message { method Descriptor (line 76) | func (*Envelope) Descriptor() ([]byte, []int) { method GetPublicKey (line 80) | func (x *Envelope) GetPublicKey() *pb.PublicKey { method GetPayloadType (line 87) | func (x *Envelope) GetPayloadType() []byte { method GetPayload (line 94) | func (x *Envelope) GetPayload() []byte { method GetSignature (line 101) | func (x *Envelope) GetSignature() []byte { constant file_core_record_pb_envelope_proto_rawDesc (line 110) | file_core_record_pb_envelope_proto_rawDesc = "" + function file_core_record_pb_envelope_proto_rawDescGZIP (line 125) | func file_core_record_pb_envelope_proto_rawDescGZIP() []byte { function init (line 146) | func init() { file_core_record_pb_envelope_proto_init() } function file_core_record_pb_envelope_proto_init (line 147) | func file_core_record_pb_envelope_proto_init() { FILE: core/record/record.go type Record (line 31) | type Record interface function RegisterType (line 70) | func RegisterType(prototype Record) { function unmarshalRecordPayload (line 74) | func unmarshalRecordPayload(payloadType []byte, payloadBytes []byte) (_r... function blankRecordForPayloadType (line 88) | func blankRecordForPayloadType(payloadType []byte) (Record, error) { function getValueType (line 99) | func getValueType(i any) reflect.Type { FILE: core/record/record_test.go type testPayload (line 7) | type testPayload struct method Domain (line 11) | func (p *testPayload) Domain() string { method Codec (line 15) | func (p *testPayload) Codec() []byte { method MarshalRecord (line 19) | func (p *testPayload) MarshalRecord() ([]byte, error) { method UnmarshalRecord (line 23) | func (p *testPayload) UnmarshalRecord(_ []byte) error { function TestUnmarshalPayload (line 28) | func TestUnmarshalPayload(t *testing.T) { FILE: core/routing/options.go type Option (line 6) | type Option type Options (line 9) | type Options struct method Apply (line 18) | func (opts *Options) Apply(options ...Option) error { method ToOption (line 28) | func (opts *Options) ToOption() Option { FILE: core/routing/query.go type QueryEventType (line 11) | type QueryEventType constant SendingQuery (line 18) | SendingQuery QueryEventType = iota constant PeerResponse (line 20) | PeerResponse constant FinalPeer (line 22) | FinalPeer constant QueryError (line 24) | QueryError constant Provider (line 26) | Provider constant Value (line 28) | Value constant AddingPeer (line 30) | AddingPeer constant DialingPeer (line 32) | DialingPeer type QueryEvent (line 36) | type QueryEvent struct type routingQueryKey (line 43) | type routingQueryKey struct type eventChannel (line 44) | type eventChannel struct method waitThenClose (line 52) | func (e *eventChannel) waitThenClose() { method send (line 64) | func (e *eventChannel) send(ctx context.Context, ev *QueryEvent) { function RegisterForQueryEvents (line 86) | func RegisterForQueryEvents(ctx context.Context) (context.Context, <-cha... function PublishQueryEvent (line 95) | func PublishQueryEvent(ctx context.Context, ev *QueryEvent) { function SubscribesToQueryEvents (line 109) | func SubscribesToQueryEvents(ctx context.Context) bool { FILE: core/routing/query_serde.go method MarshalJSON (line 9) | func (qe *QueryEvent) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 18) | func (qe *QueryEvent) UnmarshalJSON(b []byte) error { FILE: core/routing/query_test.go function TestEventsCancel (line 10) | func TestEventsCancel(t *testing.T) { FILE: core/routing/routing.go type ContentProviding (line 23) | type ContentProviding interface type ContentDiscovery (line 32) | type ContentDiscovery interface type ContentRouting (line 45) | type ContentRouting interface type PeerRouting (line 53) | type PeerRouting interface type ValueStore (line 60) | type ValueStore interface type Routing (line 84) | type Routing interface type PubKeyFetcher (line 100) | type PubKeyFetcher interface function KeyForPublicKey (line 107) | func KeyForPublicKey(id peer.ID) string { function GetPublicKey (line 116) | func GetPublicKey(r ValueStore, ctx context.Context, p peer.ID) (ci.PubK... FILE: core/sec/security.go type SecureConn (line 15) | type SecureConn interface type SecureTransport (line 22) | type SecureTransport interface type ErrPeerIDMismatch (line 34) | type ErrPeerIDMismatch struct method Error (line 39) | func (e ErrPeerIDMismatch) Error() string { FILE: core/test/addrs.go function GenerateTestAddrs (line 11) | func GenerateTestAddrs(n int) []ma.Multiaddr { function AssertAddressesEqual (line 23) | func AssertAddressesEqual(t *testing.T, exp, act []ma.Multiaddr) { FILE: core/test/crypto.go function RandTestKeyPair (line 12) | func RandTestKeyPair(typ, bits int) (ci.PrivKey, ci.PubKey, error) { function SeededTestKeyPair (line 18) | func SeededTestKeyPair(typ, bits int, seed int64) (ci.PrivKey, ci.PubKey... FILE: core/test/errors.go function AssertNilError (line 7) | func AssertNilError(t *testing.T, err error) { function ExpectError (line 14) | func ExpectError(t *testing.T, err error, msg string) { FILE: core/test/mockclock.go type MockClock (line 9) | type MockClock struct method InstantTimer (line 61) | func (c *MockClock) InstantTimer(when time.Time) *mockInstantTimer { method Since (line 75) | func (c *MockClock) Since(t time.Time) time.Duration { method Now (line 81) | func (c *MockClock) Now() time.Time { method AdvanceBy (line 87) | func (c *MockClock) AdvanceBy(dur time.Duration) { type mockInstantTimer (line 16) | type mockInstantTimer struct method Ch (line 24) | func (t *mockInstantTimer) Ch() <-chan time.Time { method Reset (line 28) | func (t *mockInstantTimer) Reset(d time.Time) bool { method Stop (line 41) | func (t *mockInstantTimer) Stop() bool { function NewMockClock (line 49) | func NewMockClock() *MockClock { FILE: core/test/mockclock_test.go function TestMockClock (line 8) | func TestMockClock(t *testing.T) { FILE: core/test/peer.go function RandPeerID (line 12) | func RandPeerID() (peer.ID, error) { function RandPeerIDFatal (line 19) | func RandPeerIDFatal(t testing.TB) peer.ID { FILE: core/transport/transport.go type CapableConn (line 29) | type CapableConn interface type Transport (line 58) | type Transport interface type Resolver (line 88) | type Resolver interface type SkipResolver (line 96) | type SkipResolver interface type Listener (line 104) | type Listener interface type TransportNetwork (line 115) | type TransportNetwork interface type GatedMaListener (line 137) | type GatedMaListener interface type Upgrader (line 154) | type Upgrader interface type DialUpdater (line 172) | type DialUpdater interface type DialUpdateKind (line 178) | type DialUpdateKind method String (line 190) | func (k DialUpdateKind) String() string { constant UpdateKindDialFailed (line 182) | UpdateKindDialFailed DialUpdateKind = iota constant UpdateKindDialSuccessful (line 184) | UpdateKindDialSuccessful constant UpdateKindHandshakeProgressed (line 187) | UpdateKindHandshakeProgressed type DialUpdate (line 204) | type DialUpdate struct FILE: examples/metrics-and-dashboards/main.go constant ClientCount (line 21) | ClientCount = 32 function main (line 23) | func main() { function newClient (line 62) | func newClient(serverInfo peer.AddrInfo, pings int) { FILE: examples/pubsub/basic-chat-with-rendezvous/main.go function main (line 24) | func main() { function initDHT (line 51) | func initDHT(ctx context.Context, h host.Host) *dht.IpfsDHT { function discoverPeers (line 79) | func discoverPeers(ctx context.Context, h host.Host) { function streamConsoleTo (line 108) | func streamConsoleTo(ctx context.Context, topic *pubsub.Topic) { function printMessagesFrom (line 121) | func printMessagesFrom(ctx context.Context, sub *pubsub.Subscription) { FILE: examples/testutils/logharness.go type LogHarness (line 17) | type LogHarness struct method Run (line 29) | func (h *LogHarness) Run(t *testing.T, f func()) { method Expect (line 44) | func (h *LogHarness) Expect(s string) { method ExpectPrefix (line 52) | func (h *LogHarness) ExpectPrefix(s string) { method NewSequence (line 60) | func (h *LogHarness) NewSequence(name string) *Sequence { type Expectation (line 22) | type Expectation interface type prefix (line 66) | type prefix method IsMatch (line 68) | func (p prefix) IsMatch(line string) bool { method String (line 72) | func (p prefix) String() string { type text (line 76) | type text method IsMatch (line 78) | func (t text) IsMatch(line string) bool { method String (line 82) | func (t text) String() string { type Sequence (line 86) | type Sequence struct method Assert (line 91) | func (seq *Sequence) Assert(t *testing.T, s *bufio.Scanner) { method Expect (line 113) | func (seq *Sequence) Expect(s string) { method ExpectPrefix (line 118) | func (seq *Sequence) ExpectPrefix(s string) { FILE: examples/testutils/net.go function FindFreePort (line 10) | func FindFreePort(t *testing.T, host string, maxAttempts int) (int, erro... FILE: fx_options_test.go function TestGetPeerID (line 14) | func TestGetPeerID(t *testing.T) { function TestGetEventBus (line 26) | func TestGetEventBus(t *testing.T) { function TestGetHost (line 38) | func TestGetHost(t *testing.T) { function TestGetIDService (line 50) | func TestGetIDService(t *testing.T) { FILE: gologshim/gologshim.go function SetDefaultHandler (line 68) | func SetDefaultHandler(handler slog.Handler) { type dynamicHandler (line 73) | type dynamicHandler struct method ensureHandler (line 80) | func (h *dynamicHandler) ensureHandler() slog.Handler { method createFallbackHandler (line 98) | func (h *dynamicHandler) createFallbackHandler() slog.Handler { method Enabled (line 125) | func (h *dynamicHandler) Enabled(ctx context.Context, lvl slog.Level) ... method Handle (line 129) | func (h *dynamicHandler) Handle(ctx context.Context, r slog.Record) er... method WithAttrs (line 133) | func (h *dynamicHandler) WithAttrs(attrs []slog.Attr) slog.Handler { method WithGroup (line 137) | func (h *dynamicHandler) WithGroup(name string) slog.Handler { function Logger (line 146) | func Logger(system string) *slog.Logger { constant logFormatText (line 157) | logFormatText logFormat = iota constant logFormatJSON (line 158) | logFormatJSON type Config (line 161) | type Config struct method LevelForSystem (line 169) | func (c *Config) LevelForSystem(system string) slog.Level { function parseIPFSGoLogEnv (line 219) | func parseIPFSGoLogEnv(loggingLevelEnvStr string) (slog.Level, map[strin... FILE: gologshim/gologshim_test.go type mockBridge (line 14) | type mockBridge struct method Handle (line 20) | func (m *mockBridge) Handle(_ context.Context, r slog.Record) error { method WithAttrs (line 28) | func (m *mockBridge) WithAttrs(_ []slog.Attr) slog.Handler { function TestGoLogBridgeDetection (line 36) | func TestGoLogBridgeDetection(t *testing.T) { function TestLazyBridgeInitialization (line 79) | func TestLazyBridgeInitialization(t *testing.T) { function TestConfigFromEnv (line 114) | func TestConfigFromEnv(t *testing.T) { function TestParseIPFSGoLogEnv (line 178) | func TestParseIPFSGoLogEnv(t *testing.T) { FILE: leaky_tests/leaky_test.go function TestBadTransportConstructor (line 10) | func TestBadTransportConstructor(t *testing.T) { FILE: libp2p.go function ChainOptions (line 16) | func ChainOptions(opts ...Option) Option { function New (line 52) | func New(opts ...Option) (host.Host, error) { function NewWithoutDefaults (line 62) | func NewWithoutDefaults(opts ...Option) (host.Host, error) { FILE: libp2p_test.go function TestNewHost (line 53) | func TestNewHost(t *testing.T) { function TestTransportConstructor (line 61) | func TestTransportConstructor(t *testing.T) { function TestNoListenAddrs (line 76) | func TestNoListenAddrs(t *testing.T) { function TestNoTransports (line 85) | func TestNoTransports(t *testing.T) { function TestInsecure (line 104) | func TestInsecure(t *testing.T) { function TestDefaultListenAddrs (line 110) | func TestDefaultListenAddrs(t *testing.T) { function makeRandomHost (line 143) | func makeRandomHost(t *testing.T, port int) (host.Host, error) { function TestChainOptions (line 157) | func TestChainOptions(t *testing.T) { function TestTransportConstructorTCP (line 187) | func TestTransportConstructorTCP(t *testing.T) { function TestTransportConstructorQUIC (line 200) | func TestTransportConstructorQUIC(t *testing.T) { type mockTransport (line 213) | type mockTransport struct method Dial (line 215) | func (m mockTransport) Dial(context.Context, ma.Multiaddr, peer.ID) (t... method CanDial (line 219) | func (m mockTransport) CanDial(ma.Multiaddr) bool ... method Listen (line 220) | func (m mockTransport) Listen(ma.Multiaddr) (transport.Listener, error... method Protocols (line 221) | func (m mockTransport) Protocols() []int ... method Proxy (line 222) | func (m mockTransport) Proxy() bool ... function TestTransportConstructorWithoutOpts (line 226) | func TestTransportConstructorWithoutOpts(t *testing.T) { function TestTransportConstructorWithWrongOpts (line 259) | func TestTransportConstructorWithWrongOpts(t *testing.T) { function TestSecurityConstructor (line 267) | func TestSecurityConstructor(t *testing.T) { function TestTransportConstructorWebTransport (line 306) | func TestTransportConstructorWebTransport(t *testing.T) { function TestTransportCustomAddressWebTransport (line 319) | func TestTransportCustomAddressWebTransport(t *testing.T) { function TestTransportCustomAddressWebTransportDoesNotStall (line 348) | func TestTransportCustomAddressWebTransportDoesNotStall(t *testing.T) { type mockPeerRouting (line 372) | type mockPeerRouting struct method FindPeer (line 376) | func (r *mockPeerRouting) FindPeer(_ context.Context, id peer.ID) (pee... function TestRoutedHost (line 381) | func TestRoutedHost(t *testing.T) { function TestAutoNATService (line 399) | func TestAutoNATService(t *testing.T) { function TestInsecureConstructor (line 405) | func TestInsecureConstructor(t *testing.T) { function TestAutoNATv2Service (line 420) | func TestAutoNATv2Service(t *testing.T) { function TestDisableIdentifyAddressDiscovery (line 426) | func TestDisableIdentifyAddressDiscovery(t *testing.T) { function TestMain (line 432) | func TestMain(m *testing.M) { function TestDialCircuitAddrWithWrappedResourceManager (line 445) | func TestDialCircuitAddrWithWrappedResourceManager(t *testing.T) { function TestHostAddrsFactoryAddsCerthashes (line 482) | func TestHostAddrsFactoryAddsCerthashes(t *testing.T) { function newRandomPort (line 505) | func newRandomPort(t *testing.T) string { function TestWebRTCReuseAddrWithQUIC (line 517) | func TestWebRTCReuseAddrWithQUIC(t *testing.T) { function TestUseCorrectTransportForDialOut (line 601) | func TestUseCorrectTransportForDialOut(t *testing.T) { function TestCircuitBehindWSS (line 668) | func TestCircuitBehindWSS(t *testing.T) { function getTLSConf (line 729) | func getTLSConf(t *testing.T, ip net.IP, start, end time.Time) *tls.Conf... function TestSharedTCPAddr (line 757) | func TestSharedTCPAddr(t *testing.T) { function TestCustomTCPDialer (line 789) | func TestCustomTCPDialer(t *testing.T) { function TestBasicHostInterfaceAssertion (line 817) | func TestBasicHostInterfaceAssertion(t *testing.T) { function BenchmarkAllAddrs (line 834) | func BenchmarkAllAddrs(b *testing.B) { function TestConnAs (line 848) | func TestConnAs(t *testing.T) { FILE: limits.go function SetDefaultServiceLimits (line 15) | func SetDefaultServiceLimits(config *rcmgr.ScalingLimitConfig) { function addServiceAndProtocolLimit (line 105) | func addServiceAndProtocolLimit(config *rcmgr.ScalingLimitConfig, servic... function addServicePeerAndProtocolPeerLimit (line 110) | func addServicePeerAndProtocolPeerLimit(config *rcmgr.ScalingLimitConfig... FILE: options.go function ListenAddrStrings (line 39) | func ListenAddrStrings(s ...string) Option { function ListenAddrs (line 53) | func ListenAddrs(addrs ...ma.Multiaddr) Option { function Security (line 73) | func Security(name string, constructor any) Option { function Muxer (line 95) | func Muxer(name string, muxer network.Multiplexer) Option { function QUICReuse (line 102) | func QUICReuse(constructor any, opts ...quicreuse.Option) Option { function Transport (line 144) | func Transport(constructor any, opts ...any) Option { function Peerstore (line 198) | func Peerstore(ps peerstore.Peerstore) Option { function PrivateNetwork (line 210) | func PrivateNetwork(psk pnet.PSK) Option { function BandwidthReporter (line 222) | func BandwidthReporter(rep metrics.Reporter) Option { function Identity (line 234) | func Identity(sk crypto.PrivKey) Option { function ConnectionManager (line 249) | func ConnectionManager(connman connmgr.ConnManager) Option { function AddrsFactory (line 260) | func AddrsFactory(factory config.AddrsFactory) Option { function EnableRelay (line 275) | func EnableRelay() Option { function DisableRelay (line 284) | func DisableRelay() Option { function EnableRelayService (line 294) | func EnableRelayService(opts ...relayv2.Option) Option { function EnableAutoRelay (line 314) | func EnableAutoRelay(opts ...autorelay.Option) Option { function EnableAutoRelayWithStaticRelays (line 326) | func EnableAutoRelayWithStaticRelays(static []peer.AddrInfo, opts ...aut... function EnableAutoRelayWithPeerSource (line 339) | func EnableAutoRelayWithPeerSource(peerSource autorelay.PeerSource, opts... function ForceReachabilityPublic (line 349) | func ForceReachabilityPublic() Option { function ForceReachabilityPrivate (line 359) | func ForceReachabilityPrivate() Option { function EnableNATService (line 370) | func EnableNATService() Option { function AutoNATServiceRateLimit (line 381) | func AutoNATServiceRateLimit(global, perPeer int, interval time.Duration... function ConnectionGater (line 395) | func ConnectionGater(cg connmgr.ConnectionGater) Option { function ResourceManager (line 408) | func ResourceManager(rcmgr network.ResourceManager) Option { function NATPortMap (line 420) | func NATPortMap() Option { function NATManager (line 426) | func NATManager(nm config.NATManagerC) Option { function Ping (line 437) | func Ping(enable bool) Option { function Routing (line 445) | func Routing(rt config.RoutingC) Option { function ProtocolVersion (line 481) | func ProtocolVersion(s string) Option { function UserAgent (line 489) | func UserAgent(userAgent string) Option { function MultiaddrResolver (line 497) | func MultiaddrResolver(rslv network.MultiaddrDNSResolver) Option { function EnableHolePunching (line 535) | func EnableHolePunching(opts ...holepunch.Option) Option { function WithDialTimeout (line 543) | func WithDialTimeout(t time.Duration) Option { function DisableMetrics (line 554) | func DisableMetrics() Option { function PrometheusRegisterer (line 562) | func PrometheusRegisterer(reg prometheus.Registerer) Option { function DialRanker (line 583) | func DialRanker(d network.DialRanker) Option { function SwarmOpts (line 594) | func SwarmOpts(opts ...swarm.Option) Option { function DisableIdentifyAddressDiscovery (line 605) | func DisableIdentifyAddressDiscovery() Option { function EnableAutoNATv2 (line 613) | func EnableAutoNATv2() Option { function UDPBlackHoleSuccessCounter (line 621) | func UDPBlackHoleSuccessCounter(f *swarm.BlackHoleSuccessCounter) Option { function IPv6BlackHoleSuccessCounter (line 630) | func IPv6BlackHoleSuccessCounter(f *swarm.BlackHoleSuccessCounter) Option { function WithFxOption (line 640) | func WithFxOption(opts ...fx.Option) Option { function ShareTCPListener (line 652) | func ShareTCPListener() Option { FILE: options_filter.go type filtersConnectionGater (line 14) | type filtersConnectionGater method InterceptAddrDial (line 18) | func (f *filtersConnectionGater) InterceptAddrDial(_ peer.ID, addr ma.... method InterceptPeerDial (line 22) | func (f *filtersConnectionGater) InterceptPeerDial(_ peer.ID) (allow b... method InterceptAccept (line 26) | func (f *filtersConnectionGater) InterceptAccept(connAddr network.Conn... method InterceptSecured (line 30) | func (f *filtersConnectionGater) InterceptSecured(_ network.Direction,... method InterceptUpgraded (line 34) | func (f *filtersConnectionGater) InterceptUpgraded(_ network.Conn) (al... FILE: p2p/canonicallog/canonicallog.go function logWithSkip (line 28) | func logWithSkip(ctx context.Context, l *slog.Logger, level slog.Level, ... function LogMisbehavingPeer (line 45) | func LogMisbehavingPeer(p peer.ID, peerAddr multiaddr.Multiaddr, compone... function LogMisbehavingPeerNetAddr (line 57) | func LogMisbehavingPeerNetAddr(p peer.ID, peerAddr net.Addr, component s... function LogPeerStatus (line 79) | func LogPeerStatus(sampleRate int, p peer.ID, peerAddr multiaddr.Multiad... FILE: p2p/canonicallog/canonicallog_test.go function TestLogs (line 15) | func TestLogs(t *testing.T) { FILE: p2p/discovery/backoff/backoff.go type BackoffFactory (line 14) | type BackoffFactory type BackoffStrategy (line 17) | type BackoffStrategy interface type Jitter (line 27) | type Jitter function FullJitter (line 31) | func FullJitter(duration, min, max time.Duration, rng *rand.Rand) time.D... function NoJitter (line 42) | func NoJitter(duration, min, max time.Duration, _ *rand.Rand) time.Durat... type randomizedBackoff (line 46) | type randomizedBackoff struct method BoundedDelay (line 52) | func (b *randomizedBackoff) BoundedDelay(duration time.Duration) time.... function boundedDuration (line 56) | func boundedDuration(d, min, max time.Duration) time.Duration { type attemptBackoff (line 66) | type attemptBackoff struct method Reset (line 72) | func (b *attemptBackoff) Reset() { function NewFixedBackoff (line 77) | func NewFixedBackoff(delay time.Duration) BackoffFactory { type fixedBackoff (line 83) | type fixedBackoff struct method Delay (line 87) | func (b *fixedBackoff) Delay() time.Duration { method Reset (line 91) | func (b *fixedBackoff) Reset() {} function NewPolynomialBackoff (line 97) | func NewPolynomialBackoff(min, max time.Duration, jitter Jitter, type polynomialBackoff (line 116) | type polynomialBackoff struct method Delay (line 122) | func (b *polynomialBackoff) Delay() time.Duration { function NewExponentialBackoff (line 146) | func NewExponentialBackoff(min, max time.Duration, jitter Jitter, type exponentialBackoff (line 166) | type exponentialBackoff struct method Delay (line 173) | func (b *exponentialBackoff) Delay() time.Duration { function NewExponentialDecorrelatedJitter (line 183) | func NewExponentialDecorrelatedJitter(min, max time.Duration, base float... type exponentialDecorrelatedJitter (line 197) | type exponentialDecorrelatedJitter struct method Delay (line 203) | func (b *exponentialDecorrelatedJitter) Delay() time.Duration { method Reset (line 214) | func (b *exponentialDecorrelatedJitter) Reset() { b.lastDelay = 0 } type lockedSource (line 216) | type lockedSource struct method Int63 (line 221) | func (r *lockedSource) Int63() (n int64) { method Seed (line 228) | func (r *lockedSource) Seed(seed int64) { FILE: p2p/discovery/backoff/backoff_test.go function checkDelay (line 12) | func checkDelay(bkf BackoffStrategy, expected time.Duration, t *testing.... function TestFixedBackoff (line 19) | func TestFixedBackoff(t *testing.T) { function TestPolynomialBackoff (line 40) | func TestPolynomialBackoff(t *testing.T) { function TestExponentialBackoff (line 59) | func TestExponentialBackoff(t *testing.T) { function minMaxJitterTest (line 80) | func minMaxJitterTest(jitter Jitter, t *testing.T) { function TestNoJitter (line 90) | func TestNoJitter(t *testing.T) { function TestFullJitter (line 100) | func TestFullJitter(t *testing.T) { function TestManyBackoffFactory (line 126) | func TestManyBackoffFactory(t *testing.T) { function testManyBackoffFactoryHelper (line 147) | func testManyBackoffFactoryHelper(concurrent int, bkf BackoffFactory) { FILE: p2p/discovery/backoff/backoffcache.go type BackoffDiscovery (line 16) | type BackoffDiscovery struct method Advertise (line 99) | func (d *BackoffDiscovery) Advertise(ctx context.Context, ns string, o... method FindPeers (line 103) | func (d *BackoffDiscovery) FindPeers(ctx context.Context, ns string, o... type BackoffDiscoveryOption (line 28) | type BackoffDiscoveryOption function NewBackoffDiscovery (line 30) | func NewBackoffDiscovery(disc discovery.Discovery, stratFactory BackoffF... function WithBackoffDiscoverySimultaneousQueryBufferSize (line 53) | func WithBackoffDiscoverySimultaneousQueryBufferSize(size int) BackoffDi... function WithBackoffDiscoveryReturnedChannelSize (line 65) | func WithBackoffDiscoveryReturnedChannelSize(size int) BackoffDiscoveryO... type clock (line 75) | type clock interface type realClock (line 79) | type realClock struct method Now (line 81) | func (c realClock) Now() time.Time { type backoffCache (line 85) | type backoffCache struct function findPeerDispatcher (line 196) | func findPeerDispatcher(ctx context.Context, c *backoffCache, pch <-chan... function findPeerReceiver (line 254) | func findPeerReceiver(ctx context.Context, pch, evtCh chan peer.AddrInfo... function mergeAddrInfos (line 293) | func mergeAddrInfos(prevAi, newAi peer.AddrInfo) *peer.AddrInfo { function checkUpdates (line 315) | func checkUpdates(orig, update map[peer.ID]peer.AddrInfo) bool { FILE: p2p/discovery/backoff/backoffcache_test.go type delayedDiscovery (line 19) | type delayedDiscovery struct method Advertise (line 25) | func (d *delayedDiscovery) Advertise(ctx context.Context, ns string, o... method FindPeers (line 29) | func (d *delayedDiscovery) FindPeers(ctx context.Context, ns string, o... function assertNumPeers (line 61) | func assertNumPeers(t *testing.T, ctx context.Context, d discovery.Disco... function assertNumPeersWithLimit (line 66) | func assertNumPeersWithLimit(t *testing.T, ctx context.Context, d discov... function withClock (line 84) | func withClock(c clock) BackoffDiscoveryOption { function TestBackoffDiscoverySingleBackoff (line 91) | func TestBackoffDiscoverySingleBackoff(t *testing.T) { function TestBackoffDiscoveryMultipleBackoff (line 137) | func TestBackoffDiscoveryMultipleBackoff(t *testing.T) { function TestBackoffDiscoverySimultaneousQuery (line 195) | func TestBackoffDiscoverySimultaneousQuery(t *testing.T) { function TestBackoffDiscoveryCacheCapacity (line 256) | func TestBackoffDiscoveryCacheCapacity(t *testing.T) { FILE: p2p/discovery/backoff/backoffconnector.go type BackoffConnector (line 15) | type BackoffConnector struct method Connect (line 49) | func (c *BackoffConnector) Connect(ctx context.Context, peerCh <-chan ... function NewBackoffConnector (line 27) | func NewBackoffConnector(h host.Host, cacheSize int, connectionTryDurati... type connCacheData (line 41) | type connCacheData struct FILE: p2p/discovery/backoff/backoffconnector_test.go type maxDialHost (line 18) | type maxDialHost struct method Connect (line 26) | func (h *maxDialHost) Connect(ctx context.Context, ai peer.AddrInfo) e... function getNetHosts (line 42) | func getNetHosts(t *testing.T, n int) []host.Host { function loadCh (line 55) | func loadCh(peers []host.Host) <-chan peer.AddrInfo { function TestBackoffConnector (line 64) | func TestBackoffConnector(t *testing.T) { FILE: p2p/discovery/mdns/mdns.go constant ServiceName (line 21) | ServiceName = "_p2p._udp" constant mdnsDomain (line 22) | mdnsDomain = "local" constant dnsaddrPrefix (line 23) | dnsaddrPrefix = "dnsaddr=" type Service (line 28) | type Service interface type Notifee (line 33) | type Notifee interface type mdnsService (line 37) | type mdnsService struct method Start (line 66) | func (s *mdnsService) Start() error { method Close (line 74) | func (s *mdnsService) Close() error { method getIPs (line 85) | func (s *mdnsService) getIPs(addrs []ma.Multiaddr) ([]string, error) { method startServer (line 173) | func (s *mdnsService) startServer() error { method startResolver (line 215) | func (s *mdnsService) startResolver(ctx context.Context) { function NewMdnsService (line 52) | func NewMdnsService(host host.Host, serviceName string, notifee Notifee)... function containsUnsuitableProtocol (line 115) | func containsUnsuitableProtocol(addr ma.Multiaddr) bool { function isSuitableForMDNS (line 146) | func isSuitableForMDNS(addr ma.Multiaddr) bool { function randomString (line 257) | func randomString(l int) string { FILE: p2p/discovery/mdns/mdns_test.go function setupMDNS (line 19) | func setupMDNS(t *testing.T, notifee Notifee) peer.ID { type notif (line 32) | type notif struct method HandlePeerFound (line 39) | func (n *notif) HandlePeerFound(info peer.AddrInfo) { method GetPeers (line 45) | func (n *notif) GetPeers() []peer.AddrInfo { function TestOtherDiscovery (line 53) | func TestOtherDiscovery(t *testing.T) { function TestIsSuitableForMDNS (line 105) | func TestIsSuitableForMDNS(t *testing.T) { FILE: p2p/discovery/mocks/mocks.go type clock (line 13) | type clock interface type MockDiscoveryServer (line 17) | type MockDiscoveryServer struct method Advertise (line 35) | func (s *MockDiscoveryServer) Advertise(ns string, info peer.AddrInfo,... method FindPeers (line 48) | func (s *MockDiscoveryServer) FindPeers(ns string, limit int) (<-chan ... type discoveryRegistration (line 23) | type discoveryRegistration struct function NewDiscoveryServer (line 28) | func NewDiscoveryServer(clock clock) *MockDiscoveryServer { type MockDiscoveryClient (line 84) | type MockDiscoveryClient struct method Advertise (line 96) | func (d *MockDiscoveryClient) Advertise(_ context.Context, ns string, ... method FindPeers (line 106) | func (d *MockDiscoveryClient) FindPeers(_ context.Context, ns string, ... function NewDiscoveryClient (line 89) | func NewDiscoveryClient(h host.Host, server *MockDiscoveryServer) *MockD... FILE: p2p/discovery/routing/routing.go type RoutingDiscovery (line 17) | type RoutingDiscovery struct method Advertise (line 25) | func (d *RoutingDiscovery) Advertise(ctx context.Context, ns string, o... method FindPeers (line 58) | func (d *RoutingDiscovery) FindPeers(ctx context.Context, ns string, o... function NewRoutingDiscovery (line 21) | func NewRoutingDiscovery(router routing.ContentRouting) *RoutingDiscovery { function nsToCid (line 75) | func nsToCid(ns string) (cid.Cid, error) { function NewDiscoveryRouting (line 84) | func NewDiscoveryRouting(disc discovery.Discovery, opts ...discovery.Opt... type DiscoveryRouting (line 88) | type DiscoveryRouting struct method Provide (line 93) | func (r *DiscoveryRouting) Provide(ctx context.Context, c cid.Cid, bca... method FindProvidersAsync (line 102) | func (r *DiscoveryRouting) FindProvidersAsync(ctx context.Context, c c... function cidToNs (line 107) | func cidToNs(c cid.Cid) string { FILE: p2p/discovery/routing/routing_test.go type mockRoutingTable (line 21) | type mockRoutingTable struct type mockRouting (line 26) | type mockRouting struct method Provide (line 39) | func (m *mockRouting) Provide(_ context.Context, cid cid.Cid, _ bool) ... method FindProvidersAsync (line 54) | func (m *mockRouting) FindProvidersAsync(ctx context.Context, cid cid.... function NewMockRoutingTable (line 31) | func NewMockRoutingTable() *mockRoutingTable { function NewMockRouting (line 35) | func NewMockRouting(h host.Host, tab *mockRoutingTable) *mockRouting { function TestRoutingDiscovery (line 78) | func TestRoutingDiscovery(t *testing.T) { function TestDiscoveryRouting (line 111) | func TestDiscoveryRouting(t *testing.T) { FILE: p2p/discovery/util/util.go function FindPeers (line 16) | func FindPeers(ctx context.Context, d discovery.Discoverer, ns string, o... function Advertise (line 32) | func Advertise(ctx context.Context, a discovery.Advertiser, ns string, o... FILE: p2p/host/autonat/autonat.go constant maxConfidence (line 24) | maxConfidence = 3 type AmbientAutoNAT (line 27) | type AmbientAutoNAT struct method Status (line 145) | func (as *AmbientAutoNAT) Status() network.Reachability { method emitStatus (line 150) | func (as *AmbientAutoNAT) emitStatus() { method background (line 168) | func (as *AmbientAutoNAT) background() { method checkAddrs (line 247) | func (as *AmbientAutoNAT) checkAddrs() (hasNewAddr bool) { method scheduleProbe (line 264) | func (as *AmbientAutoNAT) scheduleProbe(forceProbe bool) time.Duration { method handleDialResponse (line 300) | func (as *AmbientAutoNAT) handleDialResponse(dialErr error) { method recordObservation (line 315) | func (as *AmbientAutoNAT) recordObservation(observation network.Reacha... method tryProbe (line 375) | func (as *AmbientAutoNAT) tryProbe(p peer.ID) { method probe (line 385) | func (as *AmbientAutoNAT) probe(pi *peer.AddrInfo) { method getPeerToProbe (line 400) | func (as *AmbientAutoNAT) getPeerToProbe() peer.ID { method Close (line 436) | func (as *AmbientAutoNAT) Close() error { type StaticAutoNAT (line 61) | type StaticAutoNAT struct method Status (line 446) | func (s *StaticAutoNAT) Status() network.Reachability { method Close (line 450) | func (s *StaticAutoNAT) Close() error { function New (line 68) | func New(h host.Host, options ...Option) (AutoNAT, error) { function ipInList (line 158) | func ipInList(candidate ma.Multiaddr, list []ma.Multiaddr) bool { FILE: p2p/host/autonat/autonat_test.go function makeAutoNATServicePrivate (line 23) | func makeAutoNATServicePrivate(t *testing.T) host.Host { function sayPrivateStreamHandler (line 29) | func sayPrivateStreamHandler(t *testing.T) network.StreamHandler { function makeAutoNATRefuseDialRequest (line 46) | func makeAutoNATRefuseDialRequest(t *testing.T, done chan struct{}) host... function sayRefusedStreamHandler (line 52) | func sayRefusedStreamHandler(t *testing.T, done chan struct{}) network.S... function makeAutoNATServicePublic (line 77) | func makeAutoNATServicePublic(t *testing.T) host.Host { function makeAutoNAT (line 96) | func makeAutoNAT(t *testing.T, ash host.Host) (host.Host, AutoNAT) { function identifyAsServer (line 106) | func identifyAsServer(server, recip host.Host) { function connect (line 112) | func connect(t *testing.T, a, b host.Host) { function expectEvent (line 120) | func expectEvent(t *testing.T, s event.Subscription, expected network.Re... function TestAutoNATPrivate (line 135) | func TestAutoNATPrivate(t *testing.T) { function TestAutoNATPublic (line 157) | func TestAutoNATPublic(t *testing.T) { function TestAutoNATPublictoPrivate (line 179) | func TestAutoNATPublictoPrivate(t *testing.T) { function TestAutoNATIncomingEvents (line 207) | func TestAutoNATIncomingEvents(t *testing.T) { function TestAutoNATDialRefused (line 230) | func TestAutoNATDialRefused(t *testing.T) { function recordObservation (line 262) | func recordObservation(an *AmbientAutoNAT, status network.Reachability) { function TestAutoNATObservationRecording (line 266) | func TestAutoNATObservationRecording(t *testing.T) { function TestStaticNat (line 314) | func TestStaticNat(t *testing.T) { FILE: p2p/host/autonat/client.go function NewAutoNATClient (line 18) | func NewAutoNATClient(h host.Host, addrFunc AddrFunc, mt MetricsTracer) ... type client (line 25) | type client struct method DialBack (line 37) | func (c *client) DialBack(ctx context.Context, p peer.ID) error { type Error (line 100) | type Error struct method Error (line 105) | func (e Error) Error() string { method IsDialError (line 110) | func (e Error) IsDialError() bool { method IsDialRefused (line 115) | func (e Error) IsDialRefused() bool { function IsDialError (line 120) | func IsDialError(e error) bool { function IsDialRefused (line 126) | func IsDialRefused(e error) bool { FILE: p2p/host/autonat/dialpolicy.go type dialPolicy (line 12) | type dialPolicy struct method skipDial (line 21) | func (d *dialPolicy) skipDial(addr ma.Multiaddr) bool { method skipPeer (line 59) | func (d *dialPolicy) skipPeer(addrs []ma.Multiaddr) bool { FILE: p2p/host/autonat/dialpolicy_test.go function makeMA (line 17) | func makeMA(a string) multiaddr.Multiaddr { type mockT (line 25) | type mockT struct method Dial (line 31) | func (m *mockT) Dial(_ context.Context, _ multiaddr.Multiaddr, _ peer.... method CanDial (line 34) | func (m *mockT) CanDial(_ multiaddr.Multiaddr) bool { return true } method Listen (line 35) | func (m *mockT) Listen(_ multiaddr.Multiaddr) (transport.Listener, err... method Protocols (line 38) | func (m *mockT) Protocols() []int { return []int{multiaddr.P_IP4} } method Proxy (line 39) | func (m *mockT) Proxy() bool { return false } method String (line 40) | func (m *mockT) String() string { return "mock-tcp-ipv4" } type mockL (line 42) | type mockL struct method Accept (line 48) | func (l *mockL) Accept() (transport.CapableConn, error) { method Close (line 52) | func (l *mockL) Close() error { l.cancel(); return n... method Addr (line 53) | func (l *mockL) Addr() net.Addr { return nil } method Multiaddr (line 54) | func (l *mockL) Multiaddr() multiaddr.Multiaddr { return l.addr } function TestSkipDial (line 56) | func TestSkipDial(t *testing.T) { function TestSkipPeer (line 85) | func TestSkipPeer(t *testing.T) { function TestSkipLocalPeer (line 120) | func TestSkipLocalPeer(t *testing.T) { FILE: p2p/host/autonat/interface.go type AutoNAT (line 14) | type AutoNAT interface type Client (line 21) | type Client interface type AddrFunc (line 28) | type AddrFunc type Option (line 31) | type Option FILE: p2p/host/autonat/metrics.go constant metricNamespace (line 12) | metricNamespace = "libp2p_autonat" type MetricsTracer (line 70) | type MetricsTracer interface function getResponseStatus (line 79) | func getResponseStatus(status pb.Message_ResponseStatus) string { constant rate_limited (line 99) | rate_limited = "rate limited" constant dial_blocked (line 100) | dial_blocked = "dial blocked" constant no_valid_address (line 101) | no_valid_address = "no valid address" type metricsTracer (line 104) | type metricsTracer struct method ReachabilityStatus (line 131) | func (mt *metricsTracer) ReachabilityStatus(status network.Reachabilit... method ReachabilityStatusConfidence (line 135) | func (mt *metricsTracer) ReachabilityStatusConfidence(confidence int) { method ReceivedDialResponse (line 139) | func (mt *metricsTracer) ReceivedDialResponse(status pb.Message_Respon... method OutgoingDialResponse (line 146) | func (mt *metricsTracer) OutgoingDialResponse(status pb.Message_Respon... method OutgoingDialRefused (line 153) | func (mt *metricsTracer) OutgoingDialRefused(reason string) { method NextProbeTime (line 160) | func (mt *metricsTracer) NextProbeTime(t time.Time) { type metricsTracerSetting (line 108) | type metricsTracerSetting struct type MetricsTracerOption (line 112) | type MetricsTracerOption function WithRegisterer (line 114) | func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption { function NewMetricsTracer (line 122) | func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer { FILE: p2p/host/autonat/metrics_test.go function BenchmarkReachabilityStatus (line 14) | func BenchmarkReachabilityStatus(b *testing.B) { function BenchmarkClientDialResponse (line 22) | func BenchmarkClientDialResponse(b *testing.B) { function BenchmarkServerDialResponse (line 32) | func BenchmarkServerDialResponse(b *testing.B) { function BenchmarkServerDialRefused (line 42) | func BenchmarkServerDialRefused(b *testing.B) { function TestMetricsNoAllocNoCover (line 50) | func TestMetricsNoAllocNoCover(t *testing.T) { FILE: p2p/host/autonat/notify.go method Listen (line 13) | func (as *AmbientAutoNAT) Listen(_ network.Network, _ ma.Multiaddr) {} method ListenClose (line 16) | func (as *AmbientAutoNAT) ListenClose(_ network.Network, _ ma.Multiaddr) {} method Connected (line 19) | func (as *AmbientAutoNAT) Connected(_ network.Network, c network.Conn) { method Disconnected (line 30) | func (as *AmbientAutoNAT) Disconnected(_ network.Network, _ network.Conn... FILE: p2p/host/autonat/options.go type config (line 12) | type config struct constant maxRefreshInterval (line 54) | maxRefreshInterval = 24 * time.Hour function EnableService (line 62) | func EnableService(dialer network.Network) Option { function WithReachability (line 74) | func WithReachability(reachability network.Reachability) Option { function UsingAddresses (line 86) | func UsingAddresses(addrFunc AddrFunc) Option { function WithSchedule (line 101) | func WithSchedule(retryInterval, refreshInterval time.Duration) Option { function WithoutStartupDelay (line 112) | func WithoutStartupDelay() Option { function WithoutThrottling (line 122) | func WithoutThrottling() Option { function WithThrottling (line 131) | func WithThrottling(amount int, interval time.Duration) Option { function WithPeerThrottling (line 142) | func WithPeerThrottling(amount int) Option { function WithMetricsTracer (line 150) | func WithMetricsTracer(mt MetricsTracer) Option { FILE: p2p/host/autonat/pb/autonat.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type Message_MessageType (line 24) | type Message_MessageType method Enum (line 43) | func (x Message_MessageType) Enum() *Message_MessageType { method String (line 49) | func (x Message_MessageType) String() string { method Descriptor (line 53) | func (Message_MessageType) Descriptor() protoreflect.EnumDescriptor { method Type (line 57) | func (Message_MessageType) Type() protoreflect.EnumType { method Number (line 61) | func (x Message_MessageType) Number() protoreflect.EnumNumber { method UnmarshalJSON (line 66) | func (x *Message_MessageType) UnmarshalJSON(b []byte) error { method EnumDescriptor (line 76) | func (Message_MessageType) EnumDescriptor() ([]byte, []int) { constant Message_DIAL (line 27) | Message_DIAL Message_MessageType = 0 constant Message_DIAL_RESPONSE (line 28) | Message_DIAL_RESPONSE Message_MessageType = 1 type Message_ResponseStatus (line 80) | type Message_ResponseStatus method Enum (line 108) | func (x Message_ResponseStatus) Enum() *Message_ResponseStatus { method String (line 114) | func (x Message_ResponseStatus) String() string { method Descriptor (line 118) | func (Message_ResponseStatus) Descriptor() protoreflect.EnumDescriptor { method Type (line 122) | func (Message_ResponseStatus) Type() protoreflect.EnumType { method Number (line 126) | func (x Message_ResponseStatus) Number() protoreflect.EnumNumber { method UnmarshalJSON (line 131) | func (x *Message_ResponseStatus) UnmarshalJSON(b []byte) error { method EnumDescriptor (line 141) | func (Message_ResponseStatus) EnumDescriptor() ([]byte, []int) { constant Message_OK (line 83) | Message_OK Message_ResponseStatus = 0 constant Message_E_DIAL_ERROR (line 84) | Message_E_DIAL_ERROR Message_ResponseStatus = 100 constant Message_E_DIAL_REFUSED (line 85) | Message_E_DIAL_REFUSED Message_ResponseStatus = 101 constant Message_E_BAD_REQUEST (line 86) | Message_E_BAD_REQUEST Message_ResponseStatus = 200 constant Message_E_INTERNAL_ERROR (line 87) | Message_E_INTERNAL_ERROR Message_ResponseStatus = 300 type Message (line 145) | type Message struct method Reset (line 154) | func (x *Message) Reset() { method String (line 161) | func (x *Message) String() string { method ProtoMessage (line 165) | func (*Message) ProtoMessage() {} method ProtoReflect (line 167) | func (x *Message) ProtoReflect() protoreflect.Message { method Descriptor (line 180) | func (*Message) Descriptor() ([]byte, []int) { method GetType (line 184) | func (x *Message) GetType() Message_MessageType { method GetDial (line 191) | func (x *Message) GetDial() *Message_Dial { method GetDialResponse (line 198) | func (x *Message) GetDialResponse() *Message_DialResponse { type Message_PeerInfo (line 205) | type Message_PeerInfo struct method Reset (line 213) | func (x *Message_PeerInfo) Reset() { method String (line 220) | func (x *Message_PeerInfo) String() string { method ProtoMessage (line 224) | func (*Message_PeerInfo) ProtoMessage() {} method ProtoReflect (line 226) | func (x *Message_PeerInfo) ProtoReflect() protoreflect.Message { method Descriptor (line 239) | func (*Message_PeerInfo) Descriptor() ([]byte, []int) { method GetId (line 243) | func (x *Message_PeerInfo) GetId() []byte { method GetAddrs (line 250) | func (x *Message_PeerInfo) GetAddrs() [][]byte { type Message_Dial (line 257) | type Message_Dial struct method Reset (line 264) | func (x *Message_Dial) Reset() { method String (line 271) | func (x *Message_Dial) String() string { method ProtoMessage (line 275) | func (*Message_Dial) ProtoMessage() {} method ProtoReflect (line 277) | func (x *Message_Dial) ProtoReflect() protoreflect.Message { method Descriptor (line 290) | func (*Message_Dial) Descriptor() ([]byte, []int) { method GetPeer (line 294) | func (x *Message_Dial) GetPeer() *Message_PeerInfo { type Message_DialResponse (line 301) | type Message_DialResponse struct method Reset (line 310) | func (x *Message_DialResponse) Reset() { method String (line 317) | func (x *Message_DialResponse) String() string { method ProtoMessage (line 321) | func (*Message_DialResponse) ProtoMessage() {} method ProtoReflect (line 323) | func (x *Message_DialResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 336) | func (*Message_DialResponse) Descriptor() ([]byte, []int) { method GetStatus (line 340) | func (x *Message_DialResponse) GetStatus() Message_ResponseStatus { method GetStatusText (line 347) | func (x *Message_DialResponse) GetStatusText() string { method GetAddr (line 354) | func (x *Message_DialResponse) GetAddr() []byte { constant file_p2p_host_autonat_pb_autonat_proto_rawDesc (line 363) | file_p2p_host_autonat_pb_autonat_proto_rawDesc = "" + function file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP (line 397) | func file_p2p_host_autonat_pb_autonat_proto_rawDescGZIP() []byte { function init (line 427) | func init() { file_p2p_host_autonat_pb_autonat_proto_init() } function file_p2p_host_autonat_pb_autonat_proto_init (line 428) | func file_p2p_host_autonat_pb_autonat_proto_init() { FILE: p2p/host/autonat/proto.go constant AutoNATProto (line 11) | AutoNATProto = "/libp2p/autonat/1.0.0" function newDialMessage (line 13) | func newDialMessage(pi peer.AddrInfo) *pb.Message { function newDialResponseOK (line 27) | func newDialResponseOK(addr ma.Multiaddr) *pb.Message_DialResponse { function newDialResponseError (line 34) | func newDialResponseError(status pb.Message_ResponseStatus, text string)... FILE: p2p/host/autonat/svc.go constant ServiceName (line 23) | ServiceName = "libp2p.autonat" constant maxMsgSize (line 25) | maxMsgSize = 4096 type autoNATService (line 29) | type autoNATService struct method handleStream (line 53) | func (as *autoNATService) handleStream(s network.Stream) { method handleDial (line 108) | func (as *autoNATService) handleDial(p peer.ID, obsaddr ma.Multiaddr, ... method doDial (line 207) | func (as *autoNATService) doDial(pi peer.AddrInfo) *pb.Message_DialRes... method Enable (line 250) | func (as *autoNATService) Enable() { method Disable (line 265) | func (as *autoNATService) Disable() { method Close (line 276) | func (as *autoNATService) Close() error { method background (line 281) | func (as *autoNATService) background(ctx context.Context) { function newAutoNATService (line 43) | func newAutoNATService(c *config) (*autoNATService, error) { FILE: p2p/host/autonat/svc_test.go function makeAutoNATConfig (line 18) | func makeAutoNATConfig(t *testing.T) *config { function makeAutoNATService (line 28) | func makeAutoNATService(t *testing.T, c *config) *autoNATService { function makeAutoNATClient (line 38) | func makeAutoNATClient(t *testing.T) (host.Host, Client) { function TestAutoNATServiceDialRefused (line 45) | func TestAutoNATServiceDialRefused(t *testing.T) { function TestAutoNATServiceDialSuccess (line 69) | func TestAutoNATServiceDialSuccess(t *testing.T) { function TestAutoNATServiceDialRateLimiter (line 88) | func TestAutoNATServiceDialRateLimiter(t *testing.T) { function TestAutoNATServiceGlobalLimiter (line 127) | func TestAutoNATServiceGlobalLimiter(t *testing.T) { function TestAutoNATServiceRateLimitJitter (line 166) | func TestAutoNATServiceRateLimitJitter(t *testing.T) { function TestAutoNATServiceStartup (line 191) | func TestAutoNATServiceStartup(t *testing.T) { FILE: p2p/host/autonat/test/autonat_test.go function TestAutonatRoundtrip (line 18) | func TestAutonatRoundtrip(t *testing.T) { FILE: p2p/host/autorelay/addrsplosion.go function cleanupAddressSet (line 15) | func cleanupAddressSet(addrs []ma.Multiaddr) []ma.Multiaddr { function isRelayAddr (line 41) | func isRelayAddr(a ma.Multiaddr) bool { function hasAddrsplosion (line 59) | func hasAddrsplosion(addrs []ma.Multiaddr) bool { function addrKeyAndPort (line 74) | func addrKeyAndPort(a ma.Multiaddr) (string, int) { function sanitizeAddrsplodedSet (line 106) | func sanitizeAddrsplodedSet(public, private []ma.Multiaddr) []ma.Multiad... FILE: p2p/host/autorelay/addrsplosion_test.go function TestCleanupAddrs (line 10) | func TestCleanupAddrs(t *testing.T) { function makeAddrList (line 86) | func makeAddrList(strs ...string) []ma.Multiaddr { FILE: p2p/host/autorelay/autorelay.go type AutoRelay (line 19) | type AutoRelay struct method Start (line 56) | func (r *AutoRelay) Start() { method background (line 64) | func (r *AutoRelay) background() { method Close (line 102) | func (r *AutoRelay) Close() error { function NewAutoRelay (line 34) | func NewAutoRelay(host host.Host, opts ...Option) (*AutoRelay, error) { FILE: p2p/host/autorelay/autorelay_test.go constant protoIDv2 (line 26) | protoIDv2 = circuitv2_proto.ProtoIDv2Hop type mockClock (line 28) | type mockClock struct method InstantTimer (line 32) | func (c mockClock) InstantTimer(when time.Time) autorelay.InstantTimer { function newMockClock (line 36) | func newMockClock() mockClock { function numRelays (line 42) | func numRelays(h host.Host) int { function usedRelays (line 46) | func usedRelays(h host.Host) []peer.ID { function newPrivateNode (line 70) | func newPrivateNode(t *testing.T, peerSource func(context.Context, int) ... function newPrivateNodeWithStaticRelays (line 81) | func newPrivateNodeWithStaticRelays(t *testing.T, static []peer.AddrInfo... function newRelay (line 91) | func newRelay(t *testing.T) host.Host { function TestSingleCandidate (line 118) | func TestSingleCandidate(t *testing.T) { function TestSingleRelay (line 144) | func TestSingleRelay(t *testing.T) { function TestWaitForCandidates (line 174) | func TestWaitForCandidates(t *testing.T) { function TestBackoff (line 199) | func TestBackoff(t *testing.T) { function TestStaticRelays (line 270) | func TestStaticRelays(t *testing.T) { function TestConnectOnDisconnect (line 288) | func TestConnectOnDisconnect(t *testing.T) { function TestMaxAge (line 325) | func TestMaxAge(t *testing.T) { function TestReconnectToStaticRelays (line 422) | func TestReconnectToStaticRelays(t *testing.T) { function TestMinInterval (line 463) | func TestMinInterval(t *testing.T) { function TestNoBusyLoop0MinInterval (line 489) | func TestNoBusyLoop0MinInterval(t *testing.T) { function TestAutoRelayAddrsEvent (line 519) | func TestAutoRelayAddrsEvent(t *testing.T) { FILE: p2p/host/autorelay/metrics.go constant metricNamespace (line 12) | metricNamespace = "libp2p_autorelay" type candidateLoopState (line 114) | type candidateLoopState constant peerSourceRateLimited (line 117) | peerSourceRateLimited candidateLoopState = iota constant waitingOnPeerChan (line 118) | waitingOnPeerChan constant waitingForTrigger (line 119) | waitingForTrigger constant stopped (line 120) | stopped type MetricsTracer (line 124) | type MetricsTracer interface type metricsTracer (line 144) | type metricsTracer struct method RelayFinderStatus (line 178) | func (mt *metricsTracer) RelayFinderStatus(isActive bool) { method ReservationEnded (line 186) | func (mt *metricsTracer) ReservationEnded(cnt int) { method ReservationOpened (line 190) | func (mt *metricsTracer) ReservationOpened(cnt int) { method ReservationRequestFinished (line 194) | func (mt *metricsTracer) ReservationRequestFinished(isRefresh bool, er... method RelayAddressUpdated (line 211) | func (mt *metricsTracer) RelayAddressUpdated() { method RelayAddressCount (line 215) | func (mt *metricsTracer) RelayAddressCount(cnt int) { method CandidateChecked (line 219) | func (mt *metricsTracer) CandidateChecked(supportsCircuitV2 bool) { method CandidateAdded (line 230) | func (mt *metricsTracer) CandidateAdded(cnt int) { method CandidateRemoved (line 237) | func (mt *metricsTracer) CandidateRemoved(cnt int) { method CandidateLoopState (line 244) | func (mt *metricsTracer) CandidateLoopState(state candidateLoopState) { method ScheduledWorkUpdated (line 248) | func (mt *metricsTracer) ScheduledWorkUpdated(scheduledWork *scheduled... method DesiredReservations (line 268) | func (mt *metricsTracer) DesiredReservations(cnt int) { type metricsTracerSetting (line 148) | type metricsTracerSetting struct type MetricsTracerOption (line 152) | type MetricsTracerOption function WithRegisterer (line 154) | func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption { function NewMetricsTracer (line 162) | func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer { function getReservationRequestStatus (line 272) | func getReservationRequestStatus(err error) string { type wrappedMetricsTracer (line 297) | type wrappedMetricsTracer struct method RelayFinderStatus (line 303) | func (mt *wrappedMetricsTracer) RelayFinderStatus(isActive bool) { method ReservationEnded (line 309) | func (mt *wrappedMetricsTracer) ReservationEnded(cnt int) { method ReservationOpened (line 315) | func (mt *wrappedMetricsTracer) ReservationOpened(cnt int) { method ReservationRequestFinished (line 321) | func (mt *wrappedMetricsTracer) ReservationRequestFinished(isRefresh b... method RelayAddressUpdated (line 327) | func (mt *wrappedMetricsTracer) RelayAddressUpdated() { method RelayAddressCount (line 333) | func (mt *wrappedMetricsTracer) RelayAddressCount(cnt int) { method CandidateChecked (line 339) | func (mt *wrappedMetricsTracer) CandidateChecked(supportsCircuitV2 boo... method CandidateAdded (line 345) | func (mt *wrappedMetricsTracer) CandidateAdded(cnt int) { method CandidateRemoved (line 351) | func (mt *wrappedMetricsTracer) CandidateRemoved(cnt int) { method ScheduledWorkUpdated (line 357) | func (mt *wrappedMetricsTracer) ScheduledWorkUpdated(scheduledWork *sc... method DesiredReservations (line 363) | func (mt *wrappedMetricsTracer) DesiredReservations(cnt int) { method CandidateLoopState (line 369) | func (mt *wrappedMetricsTracer) CandidateLoopState(state candidateLoop... FILE: p2p/host/autorelay/metrics_noalloc_test.go function getRandScheduledWork (line 14) | func getRandScheduledWork() scheduledWorkTimes { function TestMetricsNoAllocNoCover (line 27) | func TestMetricsNoAllocNoCover(t *testing.T) { FILE: p2p/host/autorelay/options.go type PeerSource (line 22) | type PeerSource type config (line 24) | type config struct type Option (line 62) | type Option function WithStaticRelays (line 64) | func WithStaticRelays(static []peer.AddrInfo) Option { function WithPeerSource (line 91) | func WithPeerSource(f PeerSource) Option { function WithNumRelays (line 102) | func WithNumRelays(n int) Option { function WithMaxCandidates (line 110) | func WithMaxCandidates(n int) Option { function WithMinCandidates (line 123) | func WithMinCandidates(n int) Option { function WithBootDelay (line 138) | func WithBootDelay(d time.Duration) Option { function WithBackoff (line 146) | func WithBackoff(d time.Duration) Option { function WithMaxCandidateAge (line 158) | func WithMaxCandidateAge(d time.Duration) Option { type InstantTimer (line 166) | type InstantTimer interface type ClockWithInstantTimer (line 174) | type ClockWithInstantTimer interface type RealTimer (line 180) | type RealTimer struct method Ch (line 184) | func (t RealTimer) Ch() <-chan time.Time { method Reset (line 188) | func (t RealTimer) Reset(d time.Time) bool { method Stop (line 192) | func (t RealTimer) Stop() bool { type RealClock (line 196) | type RealClock struct method Now (line 200) | func (RealClock) Now() time.Time { method Since (line 203) | func (RealClock) Since(t time.Time) time.Duration { method InstantTimer (line 206) | func (RealClock) InstantTimer(when time.Time) InstantTimer { function WithClock (line 211) | func WithClock(cl ClockWithInstantTimer) Option { function WithMinInterval (line 220) | func WithMinInterval(interval time.Duration) Option { function WithMetricsTracer (line 228) | func WithMetricsTracer(mt MetricsTracer) Option { FILE: p2p/host/autorelay/relay_finder.go constant protoIDv2 (line 27) | protoIDv2 = circuitv2_proto.ProtoIDv2Hop constant rsvpRefreshInterval (line 38) | rsvpRefreshInterval = time.Minute constant rsvpExpirationSlack (line 39) | rsvpExpirationSlack = 2 * time.Minute constant autorelayTag (line 41) | autorelayTag = "autorelay" constant maxRelayAddrs (line 42) | maxRelayAddrs = 100 type candidate (line 45) | type candidate struct type relayFinder (line 52) | type relayFinder struct method cleanupDisconnectedPeers (line 129) | func (rf *relayFinder) cleanupDisconnectedPeers(ctx context.Context) { method background (line 168) | func (rf *relayFinder) background(ctx context.Context) { method updateAddrs (line 237) | func (rf *relayFinder) updateAddrs() { method getCircuitAddrs (line 253) | func (rf *relayFinder) getCircuitAddrs() []ma.Multiaddr { method runScheduledWork (line 275) | func (rf *relayFinder) runScheduledWork(ctx context.Context, now time.... method clearOldCandidates (line 331) | func (rf *relayFinder) clearOldCandidates(now time.Time) time.Time { method clearBackoff (line 359) | func (rf *relayFinder) clearBackoff(now time.Time) time.Time { method findNodes (line 384) | func (rf *relayFinder) findNodes(ctx context.Context, peerSourceRateLi... method notifyMaybeConnectToRelay (line 451) | func (rf *relayFinder) notifyMaybeConnectToRelay() { method notifyMaybeNeedNewCandidates (line 458) | func (rf *relayFinder) notifyMaybeNeedNewCandidates() { method notifyNewCandidate (line 465) | func (rf *relayFinder) notifyNewCandidate() { method notifyRelayReservationUpdated (line 472) | func (rf *relayFinder) notifyRelayReservationUpdated() { method handleNewNode (line 483) | func (rf *relayFinder) handleNewNode(ctx context.Context, pi peer.Addr... method tryNode (line 522) | func (rf *relayFinder) tryNode(ctx context.Context, pi peer.AddrInfo) ... method handleNewCandidates (line 573) | func (rf *relayFinder) handleNewCandidates(ctx context.Context) { method maybeConnectToRelay (line 584) | func (rf *relayFinder) maybeConnectToRelay(ctx context.Context) { method connectToRelay (line 648) | func (rf *relayFinder) connectToRelay(ctx context.Context, cand *candi... method refreshReservations (line 682) | func (rf *relayFinder) refreshReservations(ctx context.Context, now ti... method refreshRelayReservation (line 705) | func (rf *relayFinder) refreshRelayReservation(ctx context.Context, p ... method usingRelay (line 729) | func (rf *relayFinder) usingRelay(p peer.ID) bool { method addCandidate (line 735) | func (rf *relayFinder) addCandidate(cand *candidate) { method removeCandidate (line 743) | func (rf *relayFinder) removeCandidate(id peer.ID) { method selectCandidates (line 753) | func (rf *relayFinder) selectCandidates() []*candidate { method Start (line 770) | func (rf *relayFinder) Start() error { method Stop (line 790) | func (rf *relayFinder) Stop() error { method initMetrics (line 804) | func (rf *relayFinder) initMetrics() { method resetMetrics (line 816) | func (rf *relayFinder) resetMetrics() { function newRelayFinder (line 93) | func newRelayFinder(host host.Host, conf *config) (*relayFinder, error) { type scheduledWorkTimes (line 121) | type scheduledWorkTimes struct function areSortedAddrsDifferent (line 829) | func areSortedAddrsDifferent(a, b []ma.Multiaddr) bool { FILE: p2p/host/basic/addrs_manager.go constant maxObservedAddrsPerListenAddr (line 25) | maxObservedAddrsPerListenAddr = 3 constant maxPeerRecordSize (line 30) | maxPeerRecordSize = 8 * 1024 type addrStore (line 33) | type addrStore interface type ObservedAddrsManager (line 38) | type ObservedAddrsManager interface type hostAddrs (line 43) | type hostAddrs struct type addrsManager (line 52) | type addrsManager struct method Start (line 137) | func (a *addrsManager) Start() error { method Close (line 154) | func (a *addrsManager) Close() { method NetNotifee (line 171) | func (a *addrsManager) NetNotifee() network.Notifiee { method updateAddrsSync (line 178) | func (a *addrsManager) updateAddrsSync() { method startBackgroundWorker (line 194) | func (a *addrsManager) startBackgroundWorker() (retErr error) { method background (line 231) | func (a *addrsManager) background( method updateAddrs (line 309) | func (a *addrsManager) updateAddrs(prevHostAddrs hostAddrs, relayAddrs... method updatePeerStore (line 345) | func (a *addrsManager) updatePeerStore(currentAddrs []ma.Multiaddr, re... method notifyAddrsUpdated (line 369) | func (a *addrsManager) notifyAddrsUpdated(emitter event.Emitter, local... method Addrs (line 409) | func (a *addrsManager) Addrs() []ma.Multiaddr { method getDialableAddrs (line 418) | func (a *addrsManager) getDialableAddrs(localAddrs, reachableAddrs, un... method applyAddrsFactory (line 437) | func (a *addrsManager) applyAddrsFactory(addrs []ma.Multiaddr) []ma.Mu... method HolePunchAddrs (line 449) | func (a *addrsManager) HolePunchAddrs() []ma.Multiaddr { method DirectAddrs (line 463) | func (a *addrsManager) DirectAddrs() []ma.Multiaddr { method ConfirmedAddrs (line 470) | func (a *addrsManager) ConfirmedAddrs() (reachable []ma.Multiaddr, unr... method getConfirmedAddrs (line 476) | func (a *addrsManager) getConfirmedAddrs(localAddrs []ma.Multiaddr) (r... method getLocalAddrs (line 483) | func (a *addrsManager) getLocalAddrs() []ma.Multiaddr { method appendInterfaceAddrs (line 521) | func (a *addrsManager) appendInterfaceAddrs(dst []ma.Multiaddr, listen... method appendNATAddrs (line 533) | func (a *addrsManager) appendNATAddrs(dst []ma.Multiaddr, listenAddrs ... method appendObservedAddrs (line 543) | func (a *addrsManager) appendObservedAddrs(dst []ma.Multiaddr, listenA... method makeSignedPeerRecord (line 572) | func (a *addrsManager) makeSignedPeerRecord(addrs []ma.Multiaddr) (*re... method emitLocalAddrsUpdated (line 596) | func (a *addrsManager) emitLocalAddrsUpdated(emitter event.Emitter, cu... function newAddrsManager (line 84) | func newAddrsManager( function areAddrsDifferent (line 641) | func areAddrsDifferent(prev, current []ma.Multiaddr) bool { function diffAddrs (line 660) | func diffAddrs(prev, current []ma.Multiaddr) (added, maintained, removed... function trimHostAddrList (line 688) | func trimHostAddrList(addrs []ma.Multiaddr, maxSize int) []ma.Multiaddr { constant interfaceAddrsCacheTTL (line 740) | interfaceAddrsCacheTTL = time.Minute type interfaceAddrsCache (line 742) | type interfaceAddrsCache struct method All (line 748) | func (i *interfaceAddrsCache) All() []ma.Multiaddr { method update (line 758) | func (i *interfaceAddrsCache) update() []ma.Multiaddr { method updateUnlocked (line 769) | func (i *interfaceAddrsCache) updateUnlocked() { function removeNotInSource (line 788) | func removeNotInSource(addrs, source []ma.Multiaddr) []ma.Multiaddr { function removeInSource (line 818) | func removeInSource(addrs, source []ma.Multiaddr) []ma.Multiaddr { type multiCloser (line 844) | type multiCloser method Close (line 846) | func (mc *multiCloser) Close() error { FILE: p2p/host/basic/addrs_manager_test.go type mockNatManager (line 27) | type mockNatManager struct method Close (line 31) | func (*mockNatManager) Close() error { method GetMapping (line 35) | func (m *mockNatManager) GetMapping(addr ma.Multiaddr) ma.Multiaddr { method HasDiscoveredNAT (line 42) | func (*mockNatManager) HasDiscoveredNAT() bool { type mockObservedAddrs (line 48) | type mockObservedAddrs struct method Addrs (line 53) | func (m *mockObservedAddrs) Addrs(int) []ma.Multiaddr { return m.Addrs... method AddrsFor (line 55) | func (m *mockObservedAddrs) AddrsFor(local ma.Multiaddr) []ma.Multiadd... type addrStoreArgs (line 59) | type addrStoreArgs struct type addrsManagerArgs (line 66) | type addrsManagerArgs struct type addrsManagerTestCase (line 77) | type addrsManagerTestCase struct function newAddrsManagerTestCase (line 83) | func newAddrsManagerTestCase(tb testing.TB, args addrsManagerArgs) addrs... function TestAddrsManager (line 148) | func TestAddrsManager(t *testing.T) { function TestAddrsManagerReachabilityEvent (line 389) | func TestAddrsManagerReachabilityEvent(t *testing.T) { function TestAddrsManagerPeerstoreUpdated (line 450) | func TestAddrsManagerPeerstoreUpdated(t *testing.T) { function TestRemoveIfNotInSource (line 491) | func TestRemoveIfNotInSource(t *testing.T) { function BenchmarkAreAddrsDifferent (line 518) | func BenchmarkAreAddrsDifferent(b *testing.B) { function BenchmarkRemoveIfNotInSource (line 532) | func BenchmarkRemoveIfNotInSource(b *testing.B) { FILE: p2p/host/basic/addrs_metrics.go constant metricNamespace (line 12) | metricNamespace = "libp2p_host_addrs" type MetricsTracker (line 47) | type MetricsTracker interface type metricsTracker (line 54) | type metricsTracker struct method ReachabilityTrackerClosed (line 102) | func (t *metricsTracker) ReachabilityTrackerClosed() { method ConfirmedAddrsChanged (line 109) | func (t *metricsTracker) ConfirmedAddrsChanged(reachable, unreachable,... type metricsTrackerSetting (line 65) | type metricsTrackerSetting struct type metricsTrackerOption (line 69) | type metricsTrackerOption function withRegisterer (line 72) | func withRegisterer(reg prometheus.Registerer) metricsTrackerOption { type metricKey (line 80) | type metricKey struct function newMetricsTracker (line 86) | func newMetricsTracker(opts ...metricsTrackerOption) MetricsTracker { function updateMetric (line 115) | func updateMetric(metric *prometheus.GaugeVec, addrs []ma.Multiaddr, cur... function resetMetric (line 144) | func resetMetric(metric *prometheus.GaugeVec, current map[metricKey]int,... FILE: p2p/host/basic/addrs_metrics_test.go function TestMetricsNoAllocNoCover (line 13) | func TestMetricsNoAllocNoCover(t *testing.T) { FILE: p2p/host/basic/addrs_reachability_tracker.go type autonatv2Client (line 20) | type autonatv2Client interface constant maxAddrsPerRequest (line 27) | maxAddrsPerRequest = 10 constant maxTrackedAddrs (line 30) | maxTrackedAddrs = 50 constant defaultMaxConcurrency (line 32) | defaultMaxConcurrency = 5 constant newAddrsProbeDelay (line 34) | newAddrsProbeDelay = 1 * time.Second type addrsReachabilityTracker (line 40) | type addrsReachabilityTracker struct method UpdateAddrs (line 82) | func (r *addrsReachabilityTracker) UpdateAddrs(addrs []ma.Multiaddr) { method ConfirmedAddrs (line 89) | func (r *addrsReachabilityTracker) ConfirmedAddrs() (reachableAddrs, u... method Start (line 95) | func (r *addrsReachabilityTracker) Start() error { method Close (line 101) | func (r *addrsReachabilityTracker) Close() error { method background (line 121) | func (r *addrsReachabilityTracker) background() { method appendConfirmedAddrs (line 209) | func (r *addrsReachabilityTracker) appendConfirmedAddrs(reachable, unr... method notify (line 220) | func (r *addrsReachabilityTracker) notify() { method updateTrackedAddrs (line 227) | func (r *addrsReachabilityTracker) updateTrackedAddrs(addrs []ma.Multi... method refreshReachability (line 251) | func (r *addrsReachabilityTracker) refreshReachability() reachabilityT... function newAddrsReachabilityTracker (line 63) | func newAddrsReachabilityTracker(client autonatv2Client, reachabilityUpd... constant defaultReachabilityRefreshInterval (line 112) | defaultReachabilityRefreshInterval = 5 * time.Minute constant maxBackoffInterval (line 116) | maxBackoffInterval = 5 * time.Minute constant backoffStartInterval (line 118) | backoffStartInterval = 5 * time.Second function newBackoffInterval (line 198) | func newBackoffInterval(current time.Duration) time.Duration { constant probeTimeout (line 240) | probeTimeout = 30 * time.Second type reachabilityTask (line 244) | type reachabilityTask struct type errCountingClient (line 304) | type errCountingClient struct method GetReachability (line 311) | func (c *errCountingClient) GetReachability(ctx context.Context, reqs ... constant maxConsecutiveErrors (line 329) | maxConsecutiveErrors = 20 function isErrorPersistent (line 332) | func isErrorPersistent(err error) bool { constant recentProbeInterval (line 344) | recentProbeInterval = 10 * time.Minute constant maxConsecutiveRefusals (line 347) | maxConsecutiveRefusals = 5 constant maxRecentDialsPerAddr (line 350) | maxRecentDialsPerAddr = 10 constant targetConfidence (line 354) | targetConfidence = 3 constant minConfidence (line 357) | minConfidence = 2 constant maxRecentDialsWindow (line 363) | maxRecentDialsWindow = targetConfidence + 2 constant highConfidenceAddrProbeInterval (line 365) | highConfidenceAddrProbeInterval = 1 * time.Hour constant highConfidenceSecondaryAddrProbeInterval (line 367) | highConfidenceSecondaryAddrProbeInterval = 3 * time.Hour constant maxProbeResultTTL (line 369) | maxProbeResultTTL = maxRecentDialsWindow * highConfidenceAddrProbeInterval type probeManager (line 378) | type probeManager struct method AppendConfirmedAddrs (line 399) | func (m *probeManager) AppendConfirmedAddrs(reachable, unreachable, un... method UpdateAddrs (line 432) | func (m *probeManager) UpdateAddrs(addrs []ma.Multiaddr) { method GetProbe (line 464) | func (m *probeManager) GetProbe() probe { method getFirstProbeAddrIdx (line 501) | func (m *probeManager) getFirstProbeAddrIdx(addrs []ma.Multiaddr, now ... method appendRequestsToProbe (line 514) | func (m *probeManager) appendRequestsToProbe(reqs probe, addrs []ma.Mu... method MarkProbeInProgress (line 536) | func (m *probeManager) MarkProbeInProgress(reqs probe) { method InProgressProbes (line 547) | func (m *probeManager) InProgressProbes() int { method CompleteProbe (line 554) | func (m *probeManager) CompleteProbe(reqs probe, res autonatv2.Result,... function newProbeManager (line 390) | func newProbeManager(now func() time.Time) *probeManager { type dialOutcome (line 599) | type dialOutcome struct type addrStatus (line 604) | type addrStatus struct method Reachability (line 613) | func (s *addrStatus) Reachability() network.Reachability { method RequiredProbeCount (line 618) | func (s *addrStatus) RequiredProbeCount(now time.Time) int { method requiredProbeCountForConfirmation (line 650) | func (s *addrStatus) requiredProbeCountForConfirmation(now time.Time) ... method AddRefusal (line 689) | func (s *addrStatus) AddRefusal(now time.Time) { method AddOutcome (line 694) | func (s *addrStatus) AddOutcome(at time.Time, rch network.Reachability... method RemoveBefore (line 723) | func (s *addrStatus) RemoveBefore(t time.Time) { method recentDialCount (line 733) | func (s *addrStatus) recentDialCount(now time.Time) int { method reachabilityAndCounts (line 744) | func (s *addrStatus) reachabilityAndCounts() (rch network.Reachability... function thinWaistPart (line 809) | func thinWaistPart(a ma.Multiaddr) (ma.Multiaddr, error) { function assignPrimaryAddrs (line 819) | func assignPrimaryAddrs(statuses map[string]*addrStatus) { FILE: p2p/host/basic/addrs_reachability_tracker_test.go function TestProbeManager (line 27) | func TestProbeManager(t *testing.T) { type mockAutoNATClient (line 297) | type mockAutoNATClient struct method GetReachability (line 301) | func (m mockAutoNATClient) GetReachability(ctx context.Context, reqs [... function TestAddrsReachabilityTracker (line 307) | func TestAddrsReachabilityTracker(t *testing.T) { function TestRefreshReachability (line 601) | func TestRefreshReachability(t *testing.T) { function TestAddrStatusProbeCount (line 749) | func TestAddrStatusProbeCount(t *testing.T) { function TestAssignPrimaryAddress (line 822) | func TestAssignPrimaryAddress(t *testing.T) { function BenchmarkAddrTracker (line 880) | func BenchmarkAddrTracker(b *testing.B) { function FuzzAddrsReachabilityTracker (line 902) | func FuzzAddrsReachabilityTracker(f *testing.F) { FILE: p2p/host/basic/basic_host.go type AddrsFactory (line 47) | type AddrsFactory type BasicHost (line 54) | type BasicHost struct method Start (line 295) | func (h *BasicHost) Start() { method newStreamHandler (line 315) | func (h *BasicHost) newStreamHandler(s network.Stream) { method ID (line 362) | func (h *BasicHost) ID() peer.ID { method Peerstore (line 367) | func (h *BasicHost) Peerstore() peerstore.Peerstore { method Network (line 372) | func (h *BasicHost) Network() network.Network { method Mux (line 377) | func (h *BasicHost) Mux() protocol.Switch { method IDService (line 382) | func (h *BasicHost) IDService() identify.IDService { method EventBus (line 386) | func (h *BasicHost) EventBus() event.Bus { method SetStreamHandler (line 396) | func (h *BasicHost) SetStreamHandler(pid protocol.ID, handler network.... method SetStreamHandlerMatch (line 409) | func (h *BasicHost) SetStreamHandlerMatch(pid protocol.ID, m func(prot... method RemoveStreamHandler (line 421) | func (h *BasicHost) RemoveStreamHandler(pid protocol.ID) { method NewStream (line 432) | func (h *BasicHost) NewStream(ctx context.Context, p peer.ID, pids ...... method preferredProtocol (line 518) | func (h *BasicHost) preferredProtocol(p peer.ID, pids []protocol.ID) (... method Connect (line 536) | func (h *BasicHost) Connect(ctx context.Context, pi peer.AddrInfo) err... method dialPeer (line 554) | func (h *BasicHost) dialPeer(ctx context.Context, p peer.ID) error { method ConnManager (line 576) | func (h *BasicHost) ConnManager() connmgr.ConnManager { method Addrs (line 584) | func (h *BasicHost) Addrs() []ma.Multiaddr { method AllAddrs (line 589) | func (h *BasicHost) AllAddrs() []ma.Multiaddr { method ConfirmedAddrs (line 599) | func (h *BasicHost) ConfirmedAddrs() (reachable []ma.Multiaddr, unreac... method SetAutoNat (line 604) | func (h *BasicHost) SetAutoNat(a autonat.AutoNAT) { method GetAutoNat (line 615) | func (h *BasicHost) GetAutoNat() autonat.AutoNAT { method Reachability (line 622) | func (h *BasicHost) Reachability() network.Reachability { method Close (line 627) | func (h *BasicHost) Close() error { type HostOpts (line 89) | type HostOpts struct function NewHost (line 149) | func NewHost(n network.Network, opts *HostOpts) (*BasicHost, error) { type streamWrapper (line 672) | type streamWrapper struct method Read (line 677) | func (s *streamWrapper) Read(b []byte) (int, error) { method Write (line 681) | func (s *streamWrapper) Write(b []byte) (int, error) { method Close (line 685) | func (s *streamWrapper) Close() error { method CloseWrite (line 694) | func (s *streamWrapper) CloseWrite() error { FILE: p2p/host/basic/basic_host_synctest_test.go function TestStreamCloseDoesNotHangOnUnresponsivePeer_synctest (line 21) | func TestStreamCloseDoesNotHangOnUnresponsivePeer_synctest(t *testing.T) { FILE: p2p/host/basic/basic_host_test.go function TestHostDoubleClose (line 35) | func TestHostDoubleClose(t *testing.T) { function TestHostSimple (line 42) | func TestHostSimple(t *testing.T) { function TestMultipleClose (line 85) | func TestMultipleClose(t *testing.T) { function TestSignedPeerRecordWithNoListenAddrs (line 102) | func TestSignedPeerRecordWithNoListenAddrs(t *testing.T) { function TestProtocolHandlerEvents (line 128) | func TestProtocolHandlerEvents(t *testing.T) { function TestHostAddrsFactory (line 182) | func TestHostAddrsFactory(t *testing.T) { function TestAllAddrs (line 211) | func TestAllAddrs(t *testing.T) { function TestAllAddrsUnique (line 234) | func TestAllAddrsUnique(t *testing.T) { function getHostPair (line 293) | func getHostPair(t *testing.T) (host.Host, host.Host) { function assertWait (line 310) | func assertWait(t *testing.T, c chan protocol.ID, exp protocol.ID) { function TestHostProtoPreference (line 322) | func TestHostProtoPreference(t *testing.T) { function TestHostProtoMismatch (line 377) | func TestHostProtoMismatch(t *testing.T) { function TestHostProtoPreknowledge (line 395) | func TestHostProtoPreknowledge(t *testing.T) { function TestNewDialOld (line 465) | func TestNewDialOld(t *testing.T) { function TestNewStreamResolve (line 489) | func TestNewStreamResolve(t *testing.T) { function TestProtoDowngrade (line 536) | func TestProtoDowngrade(t *testing.T) { function TestAddrChangeImmediatelyIfAddressNonEmpty (line 591) | func TestAddrChangeImmediatelyIfAddressNonEmpty(t *testing.T) { function TestStatefulAddrEvents (line 632) | func TestStatefulAddrEvents(t *testing.T) { function TestHostAddrChangeDetection (line 652) | func TestHostAddrChangeDetection(t *testing.T) { function TestNegotiationCancel (line 742) | func TestNegotiationCancel(t *testing.T) { function waitForAddrChangeEvent (line 784) | func waitForAddrChangeEvent(ctx context.Context, sub event.Subscription,... function updatedAddrsEqual (line 803) | func updatedAddrsEqual(a, b []event.UpdatedAddress) bool { function updatedAddrEventsEqual (line 834) | func updatedAddrEventsEqual(a, b event.EvtLocalAddressesUpdated) bool { function peerRecordFromEnvelope (line 840) | func peerRecordFromEnvelope(t *testing.T, ev *record.Envelope) *peer.Pee... function TestTrimHostAddrList (line 855) | func TestTrimHostAddrList(t *testing.T) { function TestHostTimeoutNewStream (line 907) | func TestHostTimeoutNewStream(t *testing.T) { FILE: p2p/host/basic/mock_nat_test.go type MockNAT (line 21) | type MockNAT struct method EXPECT (line 40) | func (m *MockNAT) EXPECT() *MockNATMockRecorder { method AddMapping (line 45) | func (m *MockNAT) AddMapping(ctx context.Context, protocol string, por... method Close (line 59) | func (m *MockNAT) Close() error { method GetMapping (line 73) | func (m *MockNAT) GetMapping(protocol string, port int) (netip.AddrPor... method RemoveMapping (line 88) | func (m *MockNAT) RemoveMapping(ctx context.Context, protocol string, ... type MockNATMockRecorder (line 28) | type MockNATMockRecorder struct method AddMapping (line 53) | func (mr *MockNATMockRecorder) AddMapping(ctx, protocol, port any) *go... method Close (line 67) | func (mr *MockNATMockRecorder) Close() *gomock.Call { method GetMapping (line 82) | func (mr *MockNATMockRecorder) GetMapping(protocol, port any) *gomock.... method RemoveMapping (line 96) | func (mr *MockNATMockRecorder) RemoveMapping(ctx, protocol, port any) ... function NewMockNAT (line 33) | func NewMockNAT(ctrl *gomock.Controller) *MockNAT { FILE: p2p/host/basic/mocks.go type NAT (line 6) | type NAT FILE: p2p/host/basic/natmgr.go type NATManager (line 21) | type NATManager interface function NewNATManager (line 28) | func NewNATManager(net network.Network) NATManager { type entry (line 32) | type entry struct type nat (line 37) | type nat interface type natManager (line 53) | type natManager struct method Close (line 83) | func (nmgr *natManager) Close() error { method HasDiscoveredNAT (line 89) | func (nmgr *natManager) HasDiscoveredNAT() bool { method background (line 95) | func (nmgr *natManager) background(ctx context.Context) { method sync (line 136) | func (nmgr *natManager) sync() { method doSync (line 145) | func (nmgr *natManager) doSync() { method GetMapping (line 217) | func (nmgr *natManager) GetMapping(addr ma.Multiaddr) ma.Multiaddr { function newNATManager (line 67) | func newNATManager(net network.Network) *natManager { type nmgrNetNotifiee (line 292) | type nmgrNetNotifiee method natManager (line 294) | func (nn *nmgrNetNotifiee) natManager() *natManager ... method Listen (line 295) | func (nn *nmgrNetNotifiee) Listen(network.Network, ma.Multiaddr) ... method ListenClose (line 296) | func (nn *nmgrNetNotifiee) ListenClose(_ network.Network, _ ma.Multiad... method Connected (line 297) | func (nn *nmgrNetNotifiee) Connected(network.Network, network.Conn) ... method Disconnected (line 298) | func (nn *nmgrNetNotifiee) Disconnected(network.Network, network.Conn)... FILE: p2p/host/basic/natmgr_test.go function setupMockNAT (line 18) | func setupMockNAT(t *testing.T) (mockNAT *MockNAT, reset func()) { function TestMapping (line 30) | func TestMapping(t *testing.T) { function TestAddAndRemoveListeners (line 64) | func TestAddAndRemoveListeners(t *testing.T) { FILE: p2p/host/blank/blank.go type BlankHost (line 28) | type BlankHost struct method initSignedRecord (line 94) | func (bh *BlankHost) initSignedRecord() error { method Addrs (line 116) | func (bh *BlankHost) Addrs() []ma.Multiaddr { method Close (line 126) | func (bh *BlankHost) Close() error { method Connect (line 130) | func (bh *BlankHost) Connect(ctx context.Context, ai peer.AddrInfo) er... method Peerstore (line 146) | func (bh *BlankHost) Peerstore() peerstore.Peerstore { method ID (line 150) | func (bh *BlankHost) ID() peer.ID { method NewStream (line 154) | func (bh *BlankHost) NewStream(ctx context.Context, p peer.ID, protos ... method RemoveStreamHandler (line 172) | func (bh *BlankHost) RemoveStreamHandler(pid protocol.ID) { method SetStreamHandler (line 179) | func (bh *BlankHost) SetStreamHandler(pid protocol.ID, handler network... method SetStreamHandlerMatch (line 191) | func (bh *BlankHost) SetStreamHandlerMatch(pid protocol.ID, m func(pro... method newStreamHandler (line 204) | func (bh *BlankHost) newStreamHandler(s network.Stream) { method Mux (line 218) | func (bh *BlankHost) Mux() protocol.Switch { method Network (line 223) | func (bh *BlankHost) Network() network.Network { method ConnManager (line 227) | func (bh *BlankHost) ConnManager() connmgr.ConnManager { method EventBus (line 231) | func (bh *BlankHost) EventBus() event.Bus { type config (line 38) | type config struct function WithConnectionManager (line 45) | func WithConnectionManager(cmgr connmgr.ConnManager) Option { function WithEventBus (line 51) | func WithEventBus(eventBus event.Bus) Option { function NewBlankHost (line 57) | func NewBlankHost(n network.Network, options ...Option) *BlankHost { FILE: p2p/host/eventbus/basic.go constant slowConsumerWarningTimeout (line 17) | slowConsumerWarningTimeout = time.Second type basicBus (line 23) | type basicBus struct method withNode (line 76) | func (b *basicBus) withNode(typ reflect.Type, cb func(*node), async fu... method tryDropNode (line 100) | func (b *basicBus) tryDropNode(typ reflect.Type) { method Subscribe (line 210) | func (b *basicBus) Subscribe(evtTypes any, opts ...event.SubscriptionO... method Emitter (line 290) | func (b *basicBus) Emitter(evtType any, opts ...event.EmitterOpt) (e e... method GetAllEventTypes (line 318) | func (b *basicBus) GetAllEventTypes() []reflect.Type { type emitter (line 32) | type emitter struct method Emit (line 41) | func (e *emitter) Emit(evt any) error { method Close (line 55) | func (e *emitter) Close() error { function NewBus (line 65) | func NewBus(opts ...Option) event.Bus { type wildcardSub (line 120) | type wildcardSub struct method Out (line 128) | func (w *wildcardSub) Out() <-chan any { method Close (line 132) | func (w *wildcardSub) Close() error { method Name (line 143) | func (w *wildcardSub) Name() string { type namedSink (line 147) | type namedSink struct type sub (line 152) | type sub struct method Name (line 161) | func (s *sub) Name() string { method Out (line 165) | func (s *sub) Out() <-chan any { method Close (line 169) | func (s *sub) Close() error { type wildcardNode (line 332) | type wildcardNode struct method addSink (line 341) | func (n *wildcardNode) addSink(sink *namedSink) { method removeSink (line 352) | func (n *wildcardNode) removeSink(ch chan any) { method emit (line 373) | func (n *wildcardNode) emit(evt any) { type node (line 399) | type node struct method emit (line 424) | func (n *node) emit(evt any) { function newNode (line 417) | func newNode(typ reflect.Type, metricsTracer MetricsTracer) *node { function emitAndLogError (line 449) | func emitAndLogError(timer *time.Timer, typ reflect.Type, evt any, sink ... function sendSubscriberMetrics (line 471) | func sendSubscriberMetrics(metricsTracer MetricsTracer, sink *namedSink) { FILE: p2p/host/eventbus/basic_metrics.go constant metricNamespace (line 12) | metricNamespace = "libp2p_eventbus" type MetricsTracer (line 65) | type MetricsTracer interface type metricsTracer (line 86) | type metricsTracer struct method EventEmitted (line 113) | func (m *metricsTracer) EventEmitted(typ reflect.Type) { method AddSubscriber (line 121) | func (m *metricsTracer) AddSubscriber(typ reflect.Type) { method RemoveSubscriber (line 129) | func (m *metricsTracer) RemoveSubscriber(typ reflect.Type) { method SubscriberQueueLength (line 137) | func (m *metricsTracer) SubscriberQueueLength(name string, n int) { method SubscriberQueueFull (line 145) | func (m *metricsTracer) SubscriberQueueFull(name string, isFull bool) { method SubscriberEventQueued (line 158) | func (m *metricsTracer) SubscriberEventQueued(name string) { type metricsTracerSetting (line 90) | type metricsTracerSetting struct type MetricsTracerOption (line 94) | type MetricsTracerOption function WithRegisterer (line 96) | func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption { function NewMetricsTracer (line 104) | func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer { FILE: p2p/host/eventbus/basic_metrics_test.go function BenchmarkEventEmitted (line 13) | func BenchmarkEventEmitted(b *testing.B) { function BenchmarkSubscriberQueueLength (line 26) | func BenchmarkSubscriberQueueLength(b *testing.B) { function TestMetricsNoAllocNoCover (line 50) | func TestMetricsNoAllocNoCover(t *testing.T) { FILE: p2p/host/eventbus/basic_test.go type EventA (line 23) | type EventA struct method String (line 35) | func (EventA) String() string { type EventB (line 24) | type EventB function getN (line 27) | func getN() int { function TestDefaultSubIsBuffered (line 39) | func TestDefaultSubIsBuffered(t *testing.T) { function TestEmit (line 50) | func TestEmit(t *testing.T) { function TestSub (line 71) | func TestSub(t *testing.T) { function TestGetAllEventTypes (line 103) | func TestGetAllEventTypes(t *testing.T) { function TestEmitNoSubNoBlock (line 127) | func TestEmitNoSubNoBlock(t *testing.T) { type mockLogger (line 139) | type mockLogger struct method Write (line 144) | func (m *mockLogger) Write(p []byte) (n int, err error) { method Logs (line 151) | func (m *mockLogger) Logs() []string { method Clear (line 157) | func (m *mockLogger) Clear() { function TestEmitLogsErrorOnStall (line 163) | func TestEmitLogsErrorOnStall(t *testing.T) { function TestEmitOnClosed (line 219) | func TestEmitOnClosed(t *testing.T) { function TestClosingRaces (line 236) | func TestClosingRaces(t *testing.T) { function TestSubMany (line 283) | func TestSubMany(t *testing.T) { function TestWildcardSubscription (line 324) | func TestWildcardSubscription(t *testing.T) { function TestManyWildcardSubscriptions (line 367) | func TestManyWildcardSubscriptions(t *testing.T) { function TestWildcardValidations (line 423) | func TestWildcardValidations(t *testing.T) { function TestSubType (line 433) | func TestSubType(t *testing.T) { function TestNonStateful (line 465) | func TestNonStateful(t *testing.T) { function TestStateful (line 509) | func TestStateful(t *testing.T) { function TestCloseBlocking (line 530) | func TestCloseBlocking(t *testing.T) { function TestSubFailFully (line 551) | func TestSubFailFully(t *testing.T) { function TestSubCloseMultiple (line 576) | func TestSubCloseMultiple(t *testing.T) { function testMany (line 587) | func testMany(t testing.TB, subs, emits, msgs int, stateful bool) { function TestBothMany (line 649) | func TestBothMany(t *testing.T) { type benchCase (line 653) | type benchCase struct method name (line 659) | func (bc benchCase) name() string { function genTestCases (line 663) | func genTestCases() []benchCase { function BenchmarkEvents (line 675) | func BenchmarkEvents(b *testing.B) { function benchMany (line 681) | func benchMany(bc benchCase) func(*testing.B) { function BenchmarkSubscribe (line 742) | func BenchmarkSubscribe(b *testing.B) { function BenchmarkEmitter (line 752) | func BenchmarkEmitter(b *testing.B) { function BenchmarkSubscribeAndEmitter (line 762) | func BenchmarkSubscribeAndEmitter(b *testing.B) { FILE: p2p/host/eventbus/opts.go type subSettings (line 10) | type subSettings struct function newSubSettings (line 23) | func newSubSettings() subSettings { function BufSize (line 42) | func BufSize(n int) func(any) error { function Name (line 49) | func Name(name string) func(any) error { type emitterSettings (line 56) | type emitterSettings struct function Stateful (line 67) | func Stateful(s any) error { type Option (line 72) | type Option function WithMetricsTracer (line 74) | func WithMetricsTracer(metricsTracer MetricsTracer) Option { FILE: p2p/host/observedaddrs/manager.go constant maxExternalThinWaistAddrsPerLocalAddr (line 40) | maxExternalThinWaistAddrsPerLocalAddr = 3 type thinWaist (line 43) | type thinWaist struct function thinWaistForm (line 49) | func thinWaistForm(a ma.Multiaddr) (thinWaist, error) { function getObserver (line 62) | func getObserver(a ma.Multiaddr) (string, error) { type connMultiaddrs (line 75) | type connMultiaddrs interface constant observerSetCacheSize (line 82) | observerSetCacheSize = 10 type observerSet (line 85) | type observerSet struct method cacheMultiaddr (line 93) | func (s *observerSet) cacheMultiaddr(addr ma.Multiaddr) ma.Multiaddr { type observation (line 126) | type observation struct type Manager (line 132) | type Manager struct method Start (line 188) | func (o *Manager) Start(n network.Network) { method AddrsFor (line 219) | func (o *Manager) AddrsFor(addr ma.Multiaddr) (addrs []ma.Multiaddr) { method appendInferredAddrs (line 244) | func (o *Manager) appendInferredAddrs(twToObserverSets map[string][]*o... method Addrs (line 272) | func (o *Manager) Addrs(minObservers int) []ma.Multiaddr { method getTopExternalAddrs (line 289) | func (o *Manager) getTopExternalAddrs(localTWStr string, minObservers ... method eventHandler (line 311) | func (o *Manager) eventHandler(identifySub event.Subscription, natEmit... method worker (line 352) | func (o *Manager) worker() { method shouldRecordObservation (line 364) | func (o *Manager) shouldRecordObservation(conn connMultiaddrs, observe... method maybeRecordObservation (line 422) | func (o *Manager) maybeRecordObservation(conn connMultiaddrs, observed... method recordObservationUnlocked (line 434) | func (o *Manager) recordObservationUnlocked(conn connMultiaddrs, local... method removeExternalAddrsUnlocked (line 460) | func (o *Manager) removeExternalAddrsUnlocked(observer, localTWStr, ob... method addExternalAddrsUnlocked (line 477) | func (o *Manager) addExternalAddrsUnlocked(observedTWAddr ma.Multiaddr... method removeConn (line 492) | func (o *Manager) removeConn(conn connMultiaddrs) { method getNATType (line 518) | func (o *Manager) getNATType() (tcpNATType, udpNATType network.NATDevi... method Close (line 578) | func (o *Manager) Close() error { function NewManager (line 156) | func NewManager(eventbus event.Bus, net network.Network) (*Manager, erro... function newManagerWithListenAddrs (line 174) | func newManagerWithListenAddrs(bus event.Bus, listenAddrs func() []ma.Mu... function hasConsistentTransport (line 587) | func hasConsistentTransport(aTW, bTW ma.Multiaddr) bool { function isRelayedAddress (line 599) | func isRelayedAddress(a ma.Multiaddr) bool { FILE: p2p/host/observedaddrs/manager_glass_test.go type mockConn (line 16) | type mockConn struct method LocalMultiaddr (line 22) | func (c *mockConn) LocalMultiaddr() ma.Multiaddr { method RemoteMultiaddr (line 27) | func (c *mockConn) RemoteMultiaddr() ma.Multiaddr { method Close (line 31) | func (c *mockConn) Close() { method IsClosed (line 35) | func (c *mockConn) IsClosed() bool { function TestShouldRecordObservationWithWebTransport (line 39) | func TestShouldRecordObservationWithWebTransport(t *testing.T) { function TestShouldNotRecordObservationWithRelayedAddr (line 54) | func TestShouldNotRecordObservationWithRelayedAddr(t *testing.T) { function TestShouldRecordObservationWithNAT64Addr (line 69) | func TestShouldRecordObservationWithNAT64Addr(t *testing.T) { function TestThinWaistForm (line 119) | func TestThinWaistForm(t *testing.T) { FILE: p2p/host/observedaddrs/manager_test.go function requireAddrsMatch (line 22) | func requireAddrsMatch(t *testing.T, a, b []ma.Multiaddr) { function requireEqualAddrs (line 29) | func requireEqualAddrs(t *testing.T, a, b []ma.Multiaddr) { function newConn (line 41) | func newConn(local, remote ma.Multiaddr) *mockConn { function TestObservedAddrsManager (line 45) | func TestObservedAddrsManager(t *testing.T) { function genIPMultiaddr (line 536) | func genIPMultiaddr(ip6 bool) ma.Multiaddr { function FuzzObservedAddrsManager (line 549) | func FuzzObservedAddrsManager(f *testing.F) { function TestObserver (line 607) | func TestObserver(t *testing.T) { FILE: p2p/host/peerstore/metrics.go type metrics (line 15) | type metrics struct method RecordLatency (line 27) | func (m *metrics) RecordLatency(p peer.ID, next time.Duration) { method LatencyEWMA (line 48) | func (m *metrics) LatencyEWMA(p peer.ID) time.Duration { method RemovePeer (line 54) | func (m *metrics) RemovePeer(p peer.ID) { function NewMetrics (line 20) | func NewMetrics() *metrics { FILE: p2p/host/peerstore/metrics_test.go function TestLatencyEWMAFun (line 12) | func TestLatencyEWMAFun(t *testing.T) { function TestLatencyEWMA (line 39) | func TestLatencyEWMA(t *testing.T) { FILE: p2p/host/peerstore/peerstore.go function PeerInfos (line 8) | func PeerInfos(ps pstore.Peerstore, peers peer.IDSlice) []peer.AddrInfo { function PeerInfoIDs (line 16) | func PeerInfoIDs(pis []peer.AddrInfo) peer.IDSlice { FILE: p2p/host/peerstore/pstoreds/addr_book.go type ttlWriteMode (line 26) | type ttlWriteMode constant ttlOverride (line 29) | ttlOverride ttlWriteMode = iota constant ttlExtend (line 30) | ttlExtend type addrsRecord (line 42) | type addrsRecord struct method flush (line 50) | func (r *addrsRecord) flush(write ds.Write) (err error) { method clean (line 87) | func (r *addrsRecord) clean(now time.Time) (chgd bool) { method hasExpiredAddrs (line 113) | func (r *addrsRecord) hasExpiredAddrs(now int64) bool { function removeExpired (line 120) | func removeExpired(entries []*pb.AddrBookRecord_AddrEntry, now int64) []... type dsAddrBook (line 136) | type dsAddrBook struct method Close (line 219) | func (ab *dsAddrBook) Close() error { method loadRecord (line 232) | func (ab *dsAddrBook) loadRecord(id peer.ID, cache bool, update bool) ... method AddAddr (line 270) | func (ab *dsAddrBook) AddAddr(p peer.ID, addr ma.Multiaddr, ttl time.D... method AddAddrs (line 275) | func (ab *dsAddrBook) AddAddrs(p peer.ID, addrs []ma.Multiaddr, ttl ti... method ConsumePeerRecord (line 286) | func (ab *dsAddrBook) ConsumePeerRecord(recordEnvelope *record.Envelop... method latestPeerRecordSeq (line 318) | func (ab *dsAddrBook) latestPeerRecordSeq(p peer.ID) uint64 { method storeSignedPeerRecord (line 335) | func (ab *dsAddrBook) storeSignedPeerRecord(p peer.ID, envelope *recor... method GetPeerRecord (line 362) | func (ab *dsAddrBook) GetPeerRecord(p peer.ID) *record.Envelope { method SetAddr (line 382) | func (ab *dsAddrBook) SetAddr(p peer.ID, addr ma.Multiaddr, ttl time.D... method SetAddrs (line 387) | func (ab *dsAddrBook) SetAddrs(p peer.ID, addrs []ma.Multiaddr, ttl ti... method UpdateAddrs (line 398) | func (ab *dsAddrBook) UpdateAddrs(p peer.ID, oldTTL time.Duration, new... method Addrs (line 423) | func (ab *dsAddrBook) Addrs(p peer.ID) []ma.Multiaddr { method PeersWithAddrs (line 446) | func (ab *dsAddrBook) PeersWithAddrs() peer.IDSlice { method AddrStream (line 458) | func (ab *dsAddrBook) AddrStream(ctx context.Context, p peer.ID) <-cha... method ClearAddrs (line 464) | func (ab *dsAddrBook) ClearAddrs(p peer.ID) { method setAddrs (line 473) | func (ab *dsAddrBook) setAddrs(p peer.ID, addrs []ma.Multiaddr, ttl ti... method deleteAddrs (line 581) | func (ab *dsAddrBook) deleteAddrs(p peer.ID, addrs []ma.Multiaddr) (er... type clock (line 152) | type clock interface type realclock (line 157) | type realclock struct method Now (line 159) | func (rc realclock) Now() time.Time { method After (line 163) | func (rc realclock) After(d time.Duration) <-chan time.Time { function NewAddrBook (line 189) | func NewAddrBook(ctx context.Context, store ds.Batching, opts Options) (... function deleteInPlace (line 557) | func deleteInPlace(s []*pb.AddrBookRecord_AddrEntry, addrs []ma.Multiadd... function cleanAddrs (line 601) | func cleanAddrs(addrs []ma.Multiaddr, pid peer.ID) []ma.Multiaddr { FILE: p2p/host/peerstore/pstoreds/addr_book_gc.go type dsAddrBookGc (line 46) | type dsAddrBookGc struct method background (line 94) | func (gc *dsAddrBookGc) background() { method purgeLookahead (line 132) | func (gc *dsAddrBookGc) purgeLookahead() { method purgeStore (line 255) | func (gc *dsAddrBookGc) purgeStore() { method populateLookahead (line 306) | func (gc *dsAddrBookGc) populateLookahead() { function newAddressBookGc (line 55) | func newAddressBookGc(ctx context.Context, ab *dsAddrBook) (*dsAddrBookG... function orderByTimestampInKey (line 391) | func orderByTimestampInKey(a, b query.Entry) int { FILE: p2p/host/peerstore/pstoreds/addr_book_gc_test.go type testProbe (line 19) | type testProbe struct method countLookaheadEntries (line 24) | func (tp *testProbe) countLookaheadEntries() (i int) { method clearCache (line 37) | func (tp *testProbe) clearCache() { function TestGCLookahead (line 43) | func TestGCLookahead(t *testing.T) { function TestGCPurging (line 90) | func TestGCPurging(t *testing.T) { function TestGCDelay (line 157) | func TestGCDelay(t *testing.T) { function TestGCLookaheadDisabled (line 188) | func TestGCLookaheadDisabled(t *testing.T) { function BenchmarkLookaheadCycle (line 235) | func BenchmarkLookaheadCycle(b *testing.B) { FILE: p2p/host/peerstore/pstoreds/cache.go type cache (line 5) | type cache interface type noopCache (line 15) | type noopCache struct method Get (line 20) | func (*noopCache[K, V]) Get(_ K) (value V, ok bool) { method Add (line 24) | func (*noopCache[K, V]) Add(_ K, _ V) { method Remove (line 27) | func (*noopCache[K, V]) Remove(_ K) { method Contains (line 30) | func (*noopCache[K, V]) Contains(_ K) bool { method Peek (line 34) | func (*noopCache[K, V]) Peek(_ K) (value V, ok bool) { method Keys (line 38) | func (*noopCache[K, V]) Keys() (keys []K) { FILE: p2p/host/peerstore/pstoreds/cyclic_batch.go type cyclicBatch (line 19) | type cyclicBatch struct method cycle (line 34) | func (cb *cyclicBatch) cycle() (err error) { method Put (line 52) | func (cb *cyclicBatch) Put(ctx context.Context, key ds.Key, val []byte... method Delete (line 60) | func (cb *cyclicBatch) Delete(ctx context.Context, key ds.Key) error { method Commit (line 68) | func (cb *cyclicBatch) Commit(ctx context.Context) error { function newCyclicBatch (line 26) | func newCyclicBatch(ds ds.Batching, _ int) (ds.Batch, error) { FILE: p2p/host/peerstore/pstoreds/ds_test.go function mapDBStore (line 17) | func mapDBStore(_ testing.TB) (ds.Batching, func()) { type datastoreFactory (line 25) | type datastoreFactory function TestDsPeerstore (line 31) | func TestDsPeerstore(t *testing.T) { function TestDsAddrBook (line 51) | func TestDsAddrBook(t *testing.T) { function TestDsKeyBook (line 75) | func TestDsKeyBook(t *testing.T) { function BenchmarkDsKeyBook (line 83) | func BenchmarkDsKeyBook(b *testing.B) { function BenchmarkDsPeerstore (line 91) | func BenchmarkDsPeerstore(b *testing.B) { function peerstoreFactory (line 108) | func peerstoreFactory(tb testing.TB, storeFactory datastoreFactory, opts... function addressBookFactory (line 123) | func addressBookFactory(tb testing.TB, storeFactory datastoreFactory, op... function keyBookFactory (line 138) | func keyBookFactory(tb testing.TB, storeFactory datastoreFactory, opts O... FILE: p2p/host/peerstore/pstoreds/keybook.go type dsKeyBook (line 24) | type dsKeyBook struct method PubKey (line 34) | func (kb *dsKeyBook) PubKey(p peer.ID) ic.PubKey { method AddPubKey (line 69) | func (kb *dsKeyBook) AddPubKey(p peer.ID, pk ic.PubKey) error { method PrivKey (line 87) | func (kb *dsKeyBook) PrivKey(p peer.ID) ic.PrivKey { method AddPrivKey (line 99) | func (kb *dsKeyBook) AddPrivKey(p peer.ID, sk ic.PrivKey) error { method PeersWithKeys (line 119) | func (kb *dsKeyBook) PeersWithKeys() peer.IDSlice { method RemovePeer (line 129) | func (kb *dsKeyBook) RemovePeer(p peer.ID) { function NewKeyBook (line 30) | func NewKeyBook(_ context.Context, store ds.Datastore, _ Options) (*dsKe... function peerToKey (line 134) | func peerToKey(p peer.ID, suffix ds.Key) ds.Key { FILE: p2p/host/peerstore/pstoreds/metadata.go type dsPeerMetadata (line 22) | type dsPeerMetadata struct method Get (line 44) | func (pm *dsPeerMetadata) Get(p peer.ID, key string) (any, error) { method Put (line 61) | func (pm *dsPeerMetadata) Put(p peer.ID, key string, val any) error { method RemovePeer (line 70) | func (pm *dsPeerMetadata) RemovePeer(p peer.ID) { function init (line 28) | func init() { function NewPeerMetadata (line 40) | func NewPeerMetadata(_ context.Context, store ds.Datastore, _ Options) (... FILE: p2p/host/peerstore/pstoreds/pb/pstore.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type AddrBookRecord (line 25) | type AddrBookRecord struct method Reset (line 37) | func (x *AddrBookRecord) Reset() { method String (line 44) | func (x *AddrBookRecord) String() string { method ProtoMessage (line 48) | func (*AddrBookRecord) ProtoMessage() {} method ProtoReflect (line 50) | func (x *AddrBookRecord) ProtoReflect() protoreflect.Message { method Descriptor (line 63) | func (*AddrBookRecord) Descriptor() ([]byte, []int) { method GetId (line 67) | func (x *AddrBookRecord) GetId() []byte { method GetAddrs (line 74) | func (x *AddrBookRecord) GetAddrs() []*AddrBookRecord_AddrEntry { method GetCertifiedRecord (line 81) | func (x *AddrBookRecord) GetCertifiedRecord() *AddrBookRecord_Certifie... type AddrBookRecord_AddrEntry (line 89) | type AddrBookRecord_AddrEntry struct method Reset (line 100) | func (x *AddrBookRecord_AddrEntry) Reset() { method String (line 107) | func (x *AddrBookRecord_AddrEntry) String() string { method ProtoMessage (line 111) | func (*AddrBookRecord_AddrEntry) ProtoMessage() {} method ProtoReflect (line 113) | func (x *AddrBookRecord_AddrEntry) ProtoReflect() protoreflect.Message { method Descriptor (line 126) | func (*AddrBookRecord_AddrEntry) Descriptor() ([]byte, []int) { method GetAddr (line 130) | func (x *AddrBookRecord_AddrEntry) GetAddr() []byte { method GetExpiry (line 137) | func (x *AddrBookRecord_AddrEntry) GetExpiry() int64 { method GetTtl (line 144) | func (x *AddrBookRecord_AddrEntry) GetTtl() int64 { type AddrBookRecord_CertifiedRecord (line 153) | type AddrBookRecord_CertifiedRecord struct method Reset (line 163) | func (x *AddrBookRecord_CertifiedRecord) Reset() { method String (line 170) | func (x *AddrBookRecord_CertifiedRecord) String() string { method ProtoMessage (line 174) | func (*AddrBookRecord_CertifiedRecord) ProtoMessage() {} method ProtoReflect (line 176) | func (x *AddrBookRecord_CertifiedRecord) ProtoReflect() protoreflect.M... method Descriptor (line 189) | func (*AddrBookRecord_CertifiedRecord) Descriptor() ([]byte, []int) { method GetSeq (line 193) | func (x *AddrBookRecord_CertifiedRecord) GetSeq() uint64 { method GetRaw (line 200) | func (x *AddrBookRecord_CertifiedRecord) GetRaw() []byte { constant file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDesc (line 209) | file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDesc = "" + function file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescGZIP (line 229) | func file_p2p_host_peerstore_pstoreds_pb_pstore_proto_rawDescGZIP() []by... function init (line 252) | func init() { file_p2p_host_peerstore_pstoreds_pb_pstore_proto_init() } function file_p2p_host_peerstore_pstoreds_pb_pstore_proto_init (line 253) | func file_p2p_host_peerstore_pstoreds_pb_pstore_proto_init() { FILE: p2p/host/peerstore/pstoreds/peerstore.go type Options (line 19) | type Options struct function DefaultOpts (line 48) | func DefaultOpts() Options { type pstoreds (line 59) | type pstoreds struct method Close (line 137) | func (ps *pstoreds) Close() (err error) { method Peers (line 157) | func (ps *pstoreds) Peers() peer.IDSlice { method PeerInfo (line 173) | func (ps *pstoreds) PeerInfo(p peer.ID) peer.AddrInfo { method RemovePeer (line 186) | func (ps *pstoreds) RemovePeer(p peer.ID) { function NewPeerstore (line 73) | func NewPeerstore(ctx context.Context, store ds.Batching, opts Options) ... function uniquePeerIds (line 104) | func uniquePeerIds(ds ds.Datastore, prefix ds.Key, extractor func(result... FILE: p2p/host/peerstore/pstoreds/protobook.go type protoSegment (line 13) | type protoSegment struct type protoSegments (line 17) | type protoSegments method get (line 19) | func (s *protoSegments) get(p peer.ID) *protoSegment { type ProtoBookOption (line 25) | type ProtoBookOption function WithMaxProtocols (line 27) | func WithMaxProtocols(num int) ProtoBookOption { type dsProtoBook (line 34) | type dsProtoBook struct method SetProtocols (line 62) | func (pb *dsProtoBook) SetProtocols(p peer.ID, protos ...protocol.ID) ... method AddProtocols (line 79) | func (pb *dsProtoBook) AddProtocols(p peer.ID, protos ...protocol.ID) ... method GetProtocols (line 99) | func (pb *dsProtoBook) GetProtocols(p peer.ID) ([]protocol.ID, error) { method SupportsProtocols (line 117) | func (pb *dsProtoBook) SupportsProtocols(p peer.ID, protos ...protocol... method FirstSupportedProtocol (line 137) | func (pb *dsProtoBook) FirstSupportedProtocol(p peer.ID, protos ...pro... method RemoveProtocols (line 155) | func (pb *dsProtoBook) RemoveProtocols(p peer.ID, protos ...protocol.I... method getProtocolMap (line 177) | func (pb *dsProtoBook) getProtocolMap(p peer.ID) (map[protocol.ID]stru... method RemovePeer (line 194) | func (pb *dsProtoBook) RemovePeer(p peer.ID) { function NewProtoBook (line 42) | func NewProtoBook(meta pstore.PeerMetadata, opts ...ProtoBookOption) (*d... FILE: p2p/host/peerstore/pstoremem/addr_book.go type expiringAddr (line 22) | type expiringAddr struct method ExpiredBy (line 31) | func (e *expiringAddr) ExpiredBy(t time.Time) bool { method IsConnected (line 35) | func (e *expiringAddr) IsConnected() bool { function ttlIsConnected (line 41) | func ttlIsConnected(ttl time.Duration) bool { type peerRecordState (line 45) | type peerRecordState struct type peerAddrs (line 53) | type peerAddrs struct method Len (line 66) | func (pa *peerAddrs) Len() int { return len(pa.expiringHeap) } method Less (line 67) | func (pa *peerAddrs) Less(i, j int) bool { method Swap (line 70) | func (pa *peerAddrs) Swap(i, j int) { method Push (line 75) | func (pa *peerAddrs) Push(x any) { method Pop (line 80) | func (pa *peerAddrs) Pop() any { method Delete (line 87) | func (pa *peerAddrs) Delete(a *expiringAddr) { method FindAddr (line 99) | func (pa *peerAddrs) FindAddr(p peer.ID, addr ma.Multiaddr) (*expiring... method NextExpiry (line 107) | func (pa *peerAddrs) NextExpiry() time.Time { method PopIfExpired (line 114) | func (pa *peerAddrs) PopIfExpired(now time.Time) (*expiringAddr, bool) { method Update (line 127) | func (pa *peerAddrs) Update(a *expiringAddr) { method Insert (line 138) | func (pa *peerAddrs) Insert(a *expiringAddr) { method NumUnconnectedAddrs (line 151) | func (pa *peerAddrs) NumUnconnectedAddrs() int { function newPeerAddrs (line 60) | func newPeerAddrs() peerAddrs { type clock (line 155) | type clock interface type realclock (line 159) | type realclock struct method Now (line 161) | func (rc realclock) Now() time.Time { constant defaultMaxSignedPeerRecords (line 166) | defaultMaxSignedPeerRecords = 100_000 constant defaultMaxUnconnectedAddrs (line 167) | defaultMaxUnconnectedAddrs = 1_000_000 type memoryAddrBook (line 171) | type memoryAddrBook struct method background (line 236) | func (mab *memoryAddrBook) background(ctx context.Context) { method Close (line 251) | func (mab *memoryAddrBook) Close() error { method gc (line 258) | func (mab *memoryAddrBook) gc() { method PeersWithAddrs (line 271) | func (mab *memoryAddrBook) PeersWithAddrs() peer.IDSlice { method AddAddr (line 282) | func (mab *memoryAddrBook) AddAddr(p peer.ID, addr ma.Multiaddr, ttl t... method AddAddrs (line 288) | func (mab *memoryAddrBook) AddAddrs(p peer.ID, addrs []ma.Multiaddr, t... method ConsumePeerRecord (line 294) | func (mab *memoryAddrBook) ConsumePeerRecord(recordEnvelope *record.En... method maybeDeleteSignedPeerRecordUnlocked (line 327) | func (mab *memoryAddrBook) maybeDeleteSignedPeerRecordUnlocked(p peer.... method addAddrs (line 333) | func (mab *memoryAddrBook) addAddrs(p peer.ID, addrs []ma.Multiaddr, t... method addAddrsUnlocked (line 340) | func (mab *memoryAddrBook) addAddrsUnlocked(p peer.ID, addrs []ma.Mult... method SetAddr (line 390) | func (mab *memoryAddrBook) SetAddr(p peer.ID, addr ma.Multiaddr, ttl t... method SetAddrs (line 396) | func (mab *memoryAddrBook) SetAddrs(p peer.ID, addrs []ma.Multiaddr, t... method UpdateAddrs (line 443) | func (mab *memoryAddrBook) UpdateAddrs(p peer.ID, oldTTL time.Duration... method Addrs (line 469) | func (mab *memoryAddrBook) Addrs(p peer.ID) []ma.Multiaddr { method GetPeerRecord (line 494) | func (mab *memoryAddrBook) GetPeerRecord(p peer.ID) *record.Envelope { method ClearAddrs (line 514) | func (mab *memoryAddrBook) ClearAddrs(p peer.ID) { method AddrStream (line 526) | func (mab *memoryAddrBook) AddrStream(ctx context.Context, p peer.ID) ... function NewAddrBook (line 188) | func NewAddrBook(opts ...AddrBookOption) *memoryAddrBook { type AddrBookOption (line 209) | type AddrBookOption function WithClock (line 211) | func WithClock(clock clock) AddrBookOption { function WithMaxAddresses (line 221) | func WithMaxAddresses(n int) AddrBookOption { function WithMaxSignedPeerRecords (line 228) | func WithMaxSignedPeerRecords(n int) AddrBookOption { function validAddrs (line 478) | func validAddrs(now time.Time, amap map[string]*expiringAddr) []ma.Multi... type addrSub (line 541) | type addrSub struct method pubAddr (line 546) | func (s *addrSub) pubAddr(a ma.Multiaddr) { type AddrSubManager (line 555) | type AddrSubManager struct method removeSub (line 569) | func (mgr *AddrSubManager) removeSub(p peer.ID, s *addrSub) { method BroadcastAddr (line 593) | func (mgr *AddrSubManager) BroadcastAddr(p peer.ID, addr ma.Multiaddr) { method AddrStream (line 606) | func (mgr *AddrSubManager) AddrStream(ctx context.Context, p peer.ID, ... function NewAddrSubManager (line 561) | func NewAddrSubManager() *AddrSubManager { FILE: p2p/host/peerstore/pstoremem/addr_book_test.go function TestPeerAddrsNextExpiry (line 16) | func TestPeerAddrsNextExpiry(t *testing.T) { function peerAddrsInput (line 33) | func peerAddrsInput(n int) []*expiringAddr { function TestPeerAddrsHeapProperty (line 45) | func TestPeerAddrsHeapProperty(t *testing.T) { function TestPeerAddrsHeapPropertyDeletions (line 66) | func TestPeerAddrsHeapPropertyDeletions(t *testing.T) { function TestPeerAddrsHeapPropertyUpdates (line 97) | func TestPeerAddrsHeapPropertyUpdates(t *testing.T) { function TestPeerAddrsExpiry (line 137) | func TestPeerAddrsExpiry(t *testing.T) { function TestPeerLimits (line 177) | func TestPeerLimits(t *testing.T) { function BenchmarkPeerAddrs (line 189) | func BenchmarkPeerAddrs(b *testing.B) { FILE: p2p/host/peerstore/pstoremem/inmem_test.go function TestInvalidOption (line 18) | func TestInvalidOption(t *testing.T) { function TestFuzzInMemoryPeerstore (line 23) | func TestFuzzInMemoryPeerstore(t *testing.T) { function TestInMemoryPeerstore (line 33) | func TestInMemoryPeerstore(t *testing.T) { function TestPeerstoreProtoStoreLimits (line 41) | func TestPeerstoreProtoStoreLimits(t *testing.T) { function TestInMemoryAddrBook (line 49) | func TestInMemoryAddrBook(t *testing.T) { function TestInMemoryKeyBook (line 58) | func TestInMemoryKeyBook(t *testing.T) { function BenchmarkInMemoryPeerstore (line 66) | func BenchmarkInMemoryPeerstore(b *testing.B) { function BenchmarkInMemoryKeyBook (line 74) | func BenchmarkInMemoryKeyBook(b *testing.B) { function TestMain (line 82) | func TestMain(m *testing.M) { function BenchmarkGC (line 90) | func BenchmarkGC(b *testing.B) { FILE: p2p/host/peerstore/pstoremem/keybook.go type memoryKeyBook (line 12) | type memoryKeyBook struct method PeersWithKeys (line 27) | func (mkb *memoryKeyBook) PeersWithKeys() peer.IDSlice { method PubKey (line 42) | func (mkb *memoryKeyBook) PubKey(p peer.ID) ic.PubKey { method AddPubKey (line 58) | func (mkb *memoryKeyBook) AddPubKey(p peer.ID, pk ic.PubKey) error { method PrivKey (line 70) | func (mkb *memoryKeyBook) PrivKey(p peer.ID) ic.PrivKey { method AddPrivKey (line 76) | func (mkb *memoryKeyBook) AddPrivKey(p peer.ID, sk ic.PrivKey) error { method RemovePeer (line 92) | func (mkb *memoryKeyBook) RemovePeer(p peer.ID) { function NewKeyBook (line 20) | func NewKeyBook() *memoryKeyBook { FILE: p2p/host/peerstore/pstoremem/metadata.go type memoryPeerMetadata (line 10) | type memoryPeerMetadata struct method Put (line 24) | func (ps *memoryPeerMetadata) Put(p peer.ID, key string, val any) error { method Get (line 36) | func (ps *memoryPeerMetadata) Get(p peer.ID, key string) (any, error) { method RemovePeer (line 50) | func (ps *memoryPeerMetadata) RemovePeer(p peer.ID) { function NewPeerMetadata (line 18) | func NewPeerMetadata() *memoryPeerMetadata { FILE: p2p/host/peerstore/pstoremem/peerstore.go type pstoremem (line 12) | type pstoremem struct method Close (line 58) | func (ps *pstoremem) Close() (err error) { method Peers (line 78) | func (ps *pstoremem) Peers() peer.IDSlice { method PeerInfo (line 94) | func (ps *pstoremem) PeerInfo(p peer.ID) peer.AddrInfo { method RemovePeer (line 107) | func (ps *pstoremem) RemovePeer(p peer.ID) { type Option (line 23) | type Option function NewPeerstore (line 28) | func NewPeerstore(opts ...Option) (ps *pstoremem, err error) { FILE: p2p/host/peerstore/pstoremem/peerstore_test.go function TestPeerStoreAddrBookOpts (line 11) | func TestPeerStoreAddrBookOpts(t *testing.T) { FILE: p2p/host/peerstore/pstoremem/protobook.go type protoSegment (line 12) | type protoSegment struct type protoSegments (line 17) | type protoSegments method get (line 19) | func (s *protoSegments) get(p peer.ID) *protoSegment { type memoryProtoBook (line 25) | type memoryProtoBook struct method SetProtocols (line 63) | func (pb *memoryProtoBook) SetProtocols(p peer.ID, protos ...protocol.... method AddProtocols (line 81) | func (pb *memoryProtoBook) AddProtocols(p peer.ID, protos ...protocol.... method GetProtocols (line 101) | func (pb *memoryProtoBook) GetProtocols(p peer.ID) ([]protocol.ID, err... method RemoveProtocols (line 114) | func (pb *memoryProtoBook) RemoveProtocols(p peer.ID, protos ...protoc... method SupportsProtocols (line 134) | func (pb *memoryProtoBook) SupportsProtocols(p peer.ID, protos ...prot... method FirstSupportedProtocol (line 149) | func (pb *memoryProtoBook) FirstSupportedProtocol(p peer.ID, protos ..... method RemovePeer (line 162) | func (pb *memoryProtoBook) RemovePeer(p peer.ID) { type ProtoBookOption (line 33) | type ProtoBookOption function WithMaxProtocols (line 35) | func WithMaxProtocols(num int) ProtoBookOption { function NewProtoBook (line 42) | func NewProtoBook(opts ...ProtoBookOption) (*memoryProtoBook, error) { FILE: p2p/host/peerstore/pstoremem/sorting.go function isFDCostlyTransport (line 11) | func isFDCostlyTransport(a ma.Multiaddr) bool { type addrList (line 15) | type addrList method Len (line 17) | func (al addrList) Len() int { return len(al) } method Swap (line 18) | func (al addrList) Swap(i, j int) { al[i], al[j] = al[j], al[i] } method Less (line 20) | func (al addrList) Less(i, j int) bool { FILE: p2p/host/peerstore/pstoremem/sorting_test.go function TestAddressSorting (line 11) | func TestAddressSorting(t *testing.T) { FILE: p2p/host/peerstore/test/addr_book_suite.go type AddrBookFactory (line 29) | type AddrBookFactory function TestAddrBook (line 31) | func TestAddrBook(t *testing.T, factory AddrBookFactory, clk *mockClock.... function testAddAddress (line 46) | func testAddAddress(ab pstore.AddrBook, clk *mockClock.Mock) func(*testi... function testClearWorks (line 165) | func testClearWorks(ab pstore.AddrBook, _ *mockClock.Mock) func(t *testi... function testSetNegativeTTLClears (line 186) | func testSetNegativeTTLClears(m pstore.AddrBook, _ *mockClock.Mock) func... function testUpdateTTLs (line 230) | func testUpdateTTLs(m pstore.AddrBook, clk *mockClock.Mock) func(t *test... function testNilAddrsDontBreak (line 296) | func testNilAddrsDontBreak(m pstore.AddrBook, _ *mockClock.Mock) func(t ... function testAddressesExpire (line 305) | func testAddressesExpire(m pstore.AddrBook, clk *mockClock.Mock) func(t ... function testClearWithIterator (line 350) | func testClearWithIterator(m pstore.AddrBook, _ *mockClock.Mock) func(t ... function testPeersWithAddrs (line 377) | func testPeersWithAddrs(m pstore.AddrBook, _ *mockClock.Mock) func(t *te... function testCertifiedAddresses (line 403) | func testCertifiedAddresses(m pstore.AddrBook, clk *mockClock.Mock) func... FILE: p2p/host/peerstore/test/benchmarks_suite.go function BenchmarkPeerstore (line 10) | func BenchmarkPeerstore(b *testing.B, factory PeerstoreFactory, _ string) { FILE: p2p/host/peerstore/test/keybook_suite.go type KeyBookFactory (line 23) | type KeyBookFactory function TestKeyBook (line 25) | func TestKeyBook(t *testing.T, factory KeyBookFactory) { function testKeybookPrivKey (line 40) | func testKeybookPrivKey(kb pstore.KeyBook) func(t *testing.T) { function testKeyBookPubKey (line 75) | func testKeyBookPubKey(kb pstore.KeyBook) func(t *testing.T) { function testKeyBookPeers (line 110) | func testKeyBookPeers(kb pstore.KeyBook) func(t *testing.T) { function testInlinedPubKeyAddedOnRetrieve (line 155) | func testInlinedPubKeyAddedOnRetrieve(kb pstore.KeyBook) func(t *testing... function testKeyBookDelete (line 181) | func testKeyBookDelete(kb pstore.KeyBook) func(t *testing.T) { function BenchmarkKeyBook (line 206) | func BenchmarkKeyBook(b *testing.B, factory KeyBookFactory) { function benchmarkPubKey (line 224) | func benchmarkPubKey(kb pstore.KeyBook) func(*testing.B) { function benchmarkAddPubKey (line 248) | func benchmarkAddPubKey(kb pstore.KeyBook) func(*testing.B) { function benchmarkPrivKey (line 267) | func benchmarkPrivKey(kb pstore.KeyBook) func(*testing.B) { function benchmarkAddPrivKey (line 291) | func benchmarkAddPrivKey(kb pstore.KeyBook) func(*testing.B) { function benchmarkPeersWithKeys (line 310) | func benchmarkPeersWithKeys(kb pstore.KeyBook) func(*testing.B) { FILE: p2p/host/peerstore/test/peerstore_suite.go type PeerstoreFactory (line 31) | type PeerstoreFactory function TestPeerstore (line 33) | func TestPeerstore(t *testing.T, factory PeerstoreFactory) { function sortProtos (line 48) | func sortProtos(protos []protocol.ID) { function testAddrStream (line 52) | func testAddrStream(ps pstore.Peerstore) func(t *testing.T) { function testGetStreamBeforePeerAdded (line 126) | func testGetStreamBeforePeerAdded(ps pstore.Peerstore) func(t *testing.T) { function testAddrStreamDuplicates (line 175) | func testAddrStreamDuplicates(ps pstore.Peerstore) func(t *testing.T) { function testPeerstoreProtoStore (line 213) | func testPeerstoreProtoStore(ps pstore.Peerstore) func(t *testing.T) { function testBasicPeerstore (line 292) | func testBasicPeerstore(ps pstore.Peerstore) func(t *testing.T) { function testMetadata (line 322) | func testMetadata(ps pstore.Peerstore) func(t *testing.T) { function testCertifiedAddrBook (line 367) | func testCertifiedAddrBook(ps pstore.Peerstore) func(*testing.T) { function getAddrs (line 376) | func getAddrs(t *testing.T, n int) []ma.Multiaddr { function TestPeerstoreProtoStoreLimits (line 389) | func TestPeerstoreProtoStoreLimits(t *testing.T, ps pstore.Peerstore, li... FILE: p2p/host/peerstore/test/utils.go function Multiaddr (line 14) | func Multiaddr(m string) ma.Multiaddr { type peerpair (line 22) | type peerpair struct function RandomPeer (line 27) | func RandomPeer(b *testing.B, addrCount int) *peerpair { function getPeerPairs (line 48) | func getPeerPairs(b *testing.B, n int, addrsPerPeer int) []*peerpair { function GenerateAddrs (line 56) | func GenerateAddrs(count int) []ma.Multiaddr { function GeneratePeerIDs (line 64) | func GeneratePeerIDs(count int) []peer.ID { function AssertAddressesEqual (line 72) | func AssertAddressesEqual(t *testing.T, exp, act []ma.Multiaddr) { FILE: p2p/host/pstoremanager/mock_peerstore_test.go type MockPeerstore (line 25) | type MockPeerstore struct method EXPECT (line 44) | func (m *MockPeerstore) EXPECT() *MockPeerstoreMockRecorder { method AddAddr (line 49) | func (m *MockPeerstore) AddAddr(p peer.ID, addr multiaddr.Multiaddr, t... method AddAddrs (line 61) | func (m *MockPeerstore) AddAddrs(p peer.ID, addrs []multiaddr.Multiadd... method AddPrivKey (line 73) | func (m *MockPeerstore) AddPrivKey(arg0 peer.ID, arg1 crypto.PrivKey) ... method AddProtocols (line 87) | func (m *MockPeerstore) AddProtocols(arg0 peer.ID, arg1 ...protocol.ID... method AddPubKey (line 106) | func (m *MockPeerstore) AddPubKey(arg0 peer.ID, arg1 crypto.PubKey) er... method AddrStream (line 120) | func (m *MockPeerstore) AddrStream(arg0 context.Context, arg1 peer.ID)... method Addrs (line 134) | func (m *MockPeerstore) Addrs(p peer.ID) []multiaddr.Multiaddr { method ClearAddrs (line 148) | func (m *MockPeerstore) ClearAddrs(p peer.ID) { method Close (line 160) | func (m *MockPeerstore) Close() error { method FirstSupportedProtocol (line 174) | func (m *MockPeerstore) FirstSupportedProtocol(arg0 peer.ID, arg1 ...p... method Get (line 194) | func (m *MockPeerstore) Get(p peer.ID, key string) (any, error) { method GetProtocols (line 209) | func (m *MockPeerstore) GetProtocols(arg0 peer.ID) ([]protocol.ID, err... method LatencyEWMA (line 224) | func (m *MockPeerstore) LatencyEWMA(arg0 peer.ID) time.Duration { method PeerInfo (line 238) | func (m *MockPeerstore) PeerInfo(arg0 peer.ID) peer.AddrInfo { method Peers (line 252) | func (m *MockPeerstore) Peers() peer.IDSlice { method PeersWithAddrs (line 266) | func (m *MockPeerstore) PeersWithAddrs() peer.IDSlice { method PeersWithKeys (line 280) | func (m *MockPeerstore) PeersWithKeys() peer.IDSlice { method PrivKey (line 294) | func (m *MockPeerstore) PrivKey(arg0 peer.ID) crypto.PrivKey { method PubKey (line 308) | func (m *MockPeerstore) PubKey(arg0 peer.ID) crypto.PubKey { method Put (line 322) | func (m *MockPeerstore) Put(p peer.ID, key string, val any) error { method RecordLatency (line 336) | func (m *MockPeerstore) RecordLatency(arg0 peer.ID, arg1 time.Duration) { method RemovePeer (line 348) | func (m *MockPeerstore) RemovePeer(arg0 peer.ID) { method RemoveProtocols (line 360) | func (m *MockPeerstore) RemoveProtocols(arg0 peer.ID, arg1 ...protocol... method SetAddr (line 379) | func (m *MockPeerstore) SetAddr(p peer.ID, addr multiaddr.Multiaddr, t... method SetAddrs (line 391) | func (m *MockPeerstore) SetAddrs(p peer.ID, addrs []multiaddr.Multiadd... method SetProtocols (line 403) | func (m *MockPeerstore) SetProtocols(arg0 peer.ID, arg1 ...protocol.ID... method SupportsProtocols (line 422) | func (m *MockPeerstore) SupportsProtocols(arg0 peer.ID, arg1 ...protoc... method UpdateAddrs (line 442) | func (m *MockPeerstore) UpdateAddrs(p peer.ID, oldTTL, newTTL time.Dur... type MockPeerstoreMockRecorder (line 32) | type MockPeerstoreMockRecorder struct method AddAddr (line 55) | func (mr *MockPeerstoreMockRecorder) AddAddr(p, addr, ttl any) *gomock... method AddAddrs (line 67) | func (mr *MockPeerstoreMockRecorder) AddAddrs(p, addrs, ttl any) *gomo... method AddPrivKey (line 81) | func (mr *MockPeerstoreMockRecorder) AddPrivKey(arg0, arg1 any) *gomoc... method AddProtocols (line 99) | func (mr *MockPeerstoreMockRecorder) AddProtocols(arg0 any, arg1 ...an... method AddPubKey (line 114) | func (mr *MockPeerstoreMockRecorder) AddPubKey(arg0, arg1 any) *gomock... method AddrStream (line 128) | func (mr *MockPeerstoreMockRecorder) AddrStream(arg0, arg1 any) *gomoc... method Addrs (line 142) | func (mr *MockPeerstoreMockRecorder) Addrs(p any) *gomock.Call { method ClearAddrs (line 154) | func (mr *MockPeerstoreMockRecorder) ClearAddrs(p any) *gomock.Call { method Close (line 168) | func (mr *MockPeerstoreMockRecorder) Close() *gomock.Call { method FirstSupportedProtocol (line 187) | func (mr *MockPeerstoreMockRecorder) FirstSupportedProtocol(arg0 any, ... method Get (line 203) | func (mr *MockPeerstoreMockRecorder) Get(p, key any) *gomock.Call { method GetProtocols (line 218) | func (mr *MockPeerstoreMockRecorder) GetProtocols(arg0 any) *gomock.Ca... method LatencyEWMA (line 232) | func (mr *MockPeerstoreMockRecorder) LatencyEWMA(arg0 any) *gomock.Call { method PeerInfo (line 246) | func (mr *MockPeerstoreMockRecorder) PeerInfo(arg0 any) *gomock.Call { method Peers (line 260) | func (mr *MockPeerstoreMockRecorder) Peers() *gomock.Call { method PeersWithAddrs (line 274) | func (mr *MockPeerstoreMockRecorder) PeersWithAddrs() *gomock.Call { method PeersWithKeys (line 288) | func (mr *MockPeerstoreMockRecorder) PeersWithKeys() *gomock.Call { method PrivKey (line 302) | func (mr *MockPeerstoreMockRecorder) PrivKey(arg0 any) *gomock.Call { method PubKey (line 316) | func (mr *MockPeerstoreMockRecorder) PubKey(arg0 any) *gomock.Call { method Put (line 330) | func (mr *MockPeerstoreMockRecorder) Put(p, key, val any) *gomock.Call { method RecordLatency (line 342) | func (mr *MockPeerstoreMockRecorder) RecordLatency(arg0, arg1 any) *go... method RemovePeer (line 354) | func (mr *MockPeerstoreMockRecorder) RemovePeer(arg0 any) *gomock.Call { method RemoveProtocols (line 372) | func (mr *MockPeerstoreMockRecorder) RemoveProtocols(arg0 any, arg1 ..... method SetAddr (line 385) | func (mr *MockPeerstoreMockRecorder) SetAddr(p, addr, ttl any) *gomock... method SetAddrs (line 397) | func (mr *MockPeerstoreMockRecorder) SetAddrs(p, addrs, ttl any) *gomo... method SetProtocols (line 415) | func (mr *MockPeerstoreMockRecorder) SetProtocols(arg0 any, arg1 ...an... method SupportsProtocols (line 435) | func (mr *MockPeerstoreMockRecorder) SupportsProtocols(arg0 any, arg1 ... method UpdateAddrs (line 448) | func (mr *MockPeerstoreMockRecorder) UpdateAddrs(p, oldTTL, newTTL any... function NewMockPeerstore (line 37) | func NewMockPeerstore(ctrl *gomock.Controller) *MockPeerstore { FILE: p2p/host/pstoremanager/pstoremanager.go type Option (line 19) | type Option function WithGracePeriod (line 24) | func WithGracePeriod(p time.Duration) Option { function WithCleanupInterval (line 34) | func WithCleanupInterval(t time.Duration) Option { type PeerstoreManager (line 41) | type PeerstoreManager struct method Start (line 71) | func (m *PeerstoreManager) Start() { method background (line 83) | func (m *PeerstoreManager) background(ctx context.Context, sub event.S... method Close (line 138) | func (m *PeerstoreManager) Close() error { function NewPeerstoreManager (line 53) | func NewPeerstoreManager(pstore peerstore.Peerstore, eventBus event.Bus,... FILE: p2p/host/pstoremanager/pstoremanager_test.go function TestGracePeriod (line 20) | func TestGracePeriod(t *testing.T) { function TestReconnect (line 49) | func TestReconnect(t *testing.T) { function TestClose (line 75) | func TestClose(t *testing.T) { FILE: p2p/host/relaysvc/relay.go type RelayManager (line 14) | type RelayManager struct method background (line 37) | func (m *RelayManager) background(ctx context.Context) { method reachabilityChanged (line 65) | func (m *RelayManager) reachabilityChanged(r network.Reachability) err... method Close (line 92) | func (m *RelayManager) Close() error { function NewRelayManager (line 25) | func NewRelayManager(host host.Host, opts ...relayv2.Option) *RelayManag... FILE: p2p/host/relaysvc/relay_test.go function TestReachabilityChangeEvent (line 16) | func TestReachabilityChangeEvent(t *testing.T) { FILE: p2p/host/resource-manager/allowlist.go type Allowlist (line 16) | type Allowlist struct method Add (line 107) | func (al *Allowlist) Add(ma multiaddr.Multiaddr) error { method Remove (line 127) | func (al *Allowlist) Remove(ma multiaddr.Multiaddr) error { method Allowed (line 167) | func (al *Allowlist) Allowed(ma multiaddr.Multiaddr) bool { method AllowedPeerAndMultiaddr (line 192) | func (al *Allowlist) AllowedPeerAndMultiaddr(peerID peer.ID, ma multia... function WithAllowlistedMultiaddrs (line 31) | func WithAllowlistedMultiaddrs(mas []multiaddr.Multiaddr) Option { function newAllowlist (line 43) | func newAllowlist() Allowlist { function toIPNet (line 49) | func toIPNet(ma multiaddr.Multiaddr) (*net.IPNet, peer.ID, error) { FILE: p2p/host/resource-manager/allowlist_test.go function ExampleWithAllowlistedMultiaddrs (line 15) | func ExampleWithAllowlistedMultiaddrs() { function TestAllowedSimple (line 38) | func TestAllowedSimple(t *testing.T) { function TestAllowedWithPeer (line 51) | func TestAllowedWithPeer(t *testing.T) { function TestRemoved (line 180) | func TestRemoved(t *testing.T) { function BenchmarkAllowlistCheck (line 219) | func BenchmarkAllowlistCheck(b *testing.B) { FILE: p2p/host/resource-manager/conn_limiter.go type ConnLimitPerSubnet (line 13) | type ConnLimitPerSubnet struct type NetworkPrefixLimit (line 22) | type NetworkPrefixLimit struct function sortNetworkPrefixes (line 68) | func sortNetworkPrefixes(limits []NetworkPrefixLimit) []NetworkPrefixLim... function WithNetworkPrefixLimit (line 78) | func WithNetworkPrefixLimit(ipv4 []NetworkPrefixLimit, ipv6 []NetworkPre... function WithLimitPerSubnet (line 94) | func WithLimitPerSubnet(ipv4 []ConnLimitPerSubnet, ipv6 []ConnLimitPerSu... type connLimiter (line 106) | type connLimiter struct method addNetworkPrefixLimit (line 134) | func (cl *connLimiter) addNetworkPrefixLimit(isIP6 bool, npLimit Netwo... method addConn (line 147) | func (cl *connLimiter) addConn(ip netip.Addr) bool { method rmConn (line 220) | func (cl *connLimiter) rmConn(ip netip.Addr) { function newConnLimiter (line 124) | func newConnLimiter() *connLimiter { constant handshakeDuration (line 291) | handshakeDuration = 5 * time.Second constant sourceAddressRPS (line 297) | sourceAddressRPS = float64(1.0*time.Second) / (2 * float64(handshakeDura... function newVerifySourceAddressRateLimiter (line 304) | func newVerifySourceAddressRateLimiter(cl *connLimiter) *rate.Limiter { FILE: p2p/host/resource-manager/conn_limiter_test.go function TestItLimits (line 14) | func TestItLimits(t *testing.T) { function genIP (line 118) | func genIP(data *[]byte) (netip.Addr, bool) { function FuzzConnLimiter (line 139) | func FuzzConnLimiter(f *testing.F) { function TestSortedNetworkPrefixLimits (line 207) | func TestSortedNetworkPrefixLimits(t *testing.T) { function TestNewVerifySourceAddressRateLimiter (line 234) | func TestNewVerifySourceAddressRateLimiter(t *testing.T) { FILE: p2p/host/resource-manager/conn_rate_limiter.go function WithConnRateLimiters (line 42) | func WithConnRateLimiters(connRateLimiter *rate.Limiter) Option { function newConnRateLimiter (line 49) | func newConnRateLimiter() *rate.Limiter { FILE: p2p/host/resource-manager/error.go type ErrStreamOrConnLimitExceeded (line 9) | type ErrStreamOrConnLimitExceeded struct method Error (line 14) | func (e *ErrStreamOrConnLimitExceeded) Error() string { return e.err.E... method Unwrap (line 15) | func (e *ErrStreamOrConnLimitExceeded) Unwrap() error { return e.err } function logValuesStreamLimit (line 18) | func logValuesStreamLimit(scope, edge string, dir network.Direction, sta... function logValuesConnLimit (line 37) | func logValuesConnLimit(scope, edge string, dir network.Direction, usefd... type ErrMemoryLimitExceeded (line 55) | type ErrMemoryLimitExceeded struct method Error (line 61) | func (e *ErrMemoryLimitExceeded) Error() string { return e.err.Error() } method Unwrap (line 62) | func (e *ErrMemoryLimitExceeded) Unwrap() error { return e.err } function logValuesMemoryLimit (line 65) | func logValuesMemoryLimit(scope, edge string, stat network.ScopeStat, er... FILE: p2p/host/resource-manager/extapi.go type ResourceScopeLimiter (line 15) | type ResourceScopeLimiter interface type ResourceManagerState (line 23) | type ResourceManagerState interface type ResourceManagerStat (line 31) | type ResourceManagerStat struct method Limit (line 41) | func (s *resourceScope) Limit() Limit { method SetLimit (line 48) | func (s *resourceScope) SetLimit(limit Limit) { method SetLimit (line 55) | func (s *protocolScope) SetLimit(limit Limit) { method SetLimit (line 60) | func (s *peerScope) SetLimit(limit Limit) { method ListServices (line 65) | func (r *resourceManager) ListServices() []string { method ListProtocols (line 81) | func (r *resourceManager) ListProtocols() []protocol.ID { method ListPeers (line 95) | func (r *resourceManager) ListPeers() []peer.ID { method Stat (line 111) | func (r *resourceManager) Stat() (result ResourceManagerStat) { method GetConnLimit (line 148) | func (r *resourceManager) GetConnLimit() int { FILE: p2p/host/resource-manager/limit.go type Limit (line 23) | type Limit interface type Limiter (line 39) | type Limiter interface function NewDefaultLimiterFromJSON (line 55) | func NewDefaultLimiterFromJSON(in io.Reader) (Limiter, error) { function NewLimiterFromJSON (line 60) | func NewLimiterFromJSON(in io.Reader, defaults ConcreteLimitConfig) (Lim... function readLimiterConfigFromJSON (line 68) | func readLimiterConfigFromJSON(in io.Reader, defaults ConcreteLimitConfi... type fixedLimiter (line 77) | type fixedLimiter struct method GetSystemLimits (line 235) | func (l *fixedLimiter) GetSystemLimits() Limit { method GetTransientLimits (line 239) | func (l *fixedLimiter) GetTransientLimits() Limit { method GetAllowlistedSystemLimits (line 243) | func (l *fixedLimiter) GetAllowlistedSystemLimits() Limit { method GetAllowlistedTransientLimits (line 247) | func (l *fixedLimiter) GetAllowlistedTransientLimits() Limit { method GetServiceLimits (line 251) | func (l *fixedLimiter) GetServiceLimits(svc string) Limit { method GetServicePeerLimits (line 259) | func (l *fixedLimiter) GetServicePeerLimits(svc string) Limit { method GetProtocolLimits (line 267) | func (l *fixedLimiter) GetProtocolLimits(proto protocol.ID) Limit { method GetProtocolPeerLimits (line 275) | func (l *fixedLimiter) GetProtocolPeerLimits(proto protocol.ID) Limit { method GetPeerLimits (line 283) | func (l *fixedLimiter) GetPeerLimits(p peer.ID) Limit { method GetStreamLimits (line 291) | func (l *fixedLimiter) GetStreamLimits(_ peer.ID) Limit { method GetConnLimits (line 295) | func (l *fixedLimiter) GetConnLimits() Limit { function NewFixedLimiter (line 83) | func NewFixedLimiter(conf ConcreteLimitConfig) Limiter { type BaseLimit (line 89) | type BaseLimit struct method ToResourceLimits (line 118) | func (l BaseLimit) ToResourceLimits() ResourceLimits { method Apply (line 133) | func (l *BaseLimit) Apply(l2 BaseLimit) { method GetStreamLimit (line 203) | func (l BaseLimit) GetStreamLimit(dir network.Direction) int { method GetStreamTotalLimit (line 211) | func (l BaseLimit) GetStreamTotalLimit() int { method GetConnLimit (line 215) | func (l BaseLimit) GetConnLimit(dir network.Direction) int { method GetConnTotalLimit (line 223) | func (l BaseLimit) GetConnTotalLimit() int { method GetFDLimit (line 227) | func (l BaseLimit) GetFDLimit() int { method GetMemoryLimit (line 231) | func (l BaseLimit) GetMemoryLimit() int64 { function valueOrBlockAll (line 100) | func valueOrBlockAll(n int) LimitVal { function valueOrBlockAll64 (line 108) | func valueOrBlockAll64(n int64) LimitVal64 { type BaseLimitIncrease (line 161) | type BaseLimitIncrease struct method Apply (line 176) | func (l *BaseLimitIncrease) Apply(l2 BaseLimitIncrease) { FILE: p2p/host/resource-manager/limit_config_test.go function withMemoryLimit (line 14) | func withMemoryLimit(l BaseLimit, m int64) BaseLimit { function TestLimitConfigParserBackwardsCompat (line 20) | func TestLimitConfigParserBackwardsCompat(t *testing.T) { function TestLimitConfigParser (line 59) | func TestLimitConfigParser(t *testing.T) { function TestLimitConfigRoundTrip (line 105) | func TestLimitConfigRoundTrip(t *testing.T) { function TestDefaultsDontChange (line 126) | func TestDefaultsDontChange(t *testing.T) { function TestReadmeLimitConfigSerialization (line 145) | func TestReadmeLimitConfigSerialization(t *testing.T) { FILE: p2p/host/resource-manager/limit_defaults.go type baseLimitConfig (line 17) | type baseLimitConfig struct type ScalingLimitConfig (line 25) | type ScalingLimitConfig struct method AddServiceLimit (line 65) | func (cfg *ScalingLimitConfig) AddServiceLimit(svc string, base BaseLi... method AddProtocolLimit (line 75) | func (cfg *ScalingLimitConfig) AddProtocolLimit(proto protocol.ID, bas... method AddPeerLimit (line 85) | func (cfg *ScalingLimitConfig) AddPeerLimit(p peer.ID, base BaseLimit,... method AddServicePeerLimit (line 95) | func (cfg *ScalingLimitConfig) AddServicePeerLimit(svc string, base Ba... method AddProtocolPeerLimit (line 105) | func (cfg *ScalingLimitConfig) AddProtocolPeerLimit(proto protocol.ID,... method Scale (line 582) | func (cfg *ScalingLimitConfig) Scale(memory int64, numFD int) Concrete... method AutoScale (line 629) | func (cfg *ScalingLimitConfig) AutoScale() ConcreteLimitConfig { type LimitVal (line 115) | type LimitVal method MarshalJSON (line 126) | func (l LimitVal) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 137) | func (l *LimitVal) UnmarshalJSON(b []byte) error { method Build (line 164) | func (l LimitVal) Build(defaultVal int) int { constant DefaultLimit (line 119) | DefaultLimit LimitVal = 0 constant Unlimited (line 121) | Unlimited LimitVal = -1 constant BlockAllLimit (line 123) | BlockAllLimit LimitVal = -2 type LimitVal64 (line 177) | type LimitVal64 method MarshalJSON (line 188) | func (l LimitVal64) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 201) | func (l *LimitVal64) UnmarshalJSON(b []byte) error { method Build (line 246) | func (l LimitVal64) Build(defaultVal int64) int64 { constant DefaultLimit64 (line 181) | DefaultLimit64 LimitVal64 = 0 constant Unlimited64 (line 183) | Unlimited64 LimitVal64 = -1 constant BlockAllLimit64 (line 185) | BlockAllLimit64 LimitVal64 = -2 type ResourceLimits (line 260) | type ResourceLimits struct method IsDefault (line 271) | func (l *ResourceLimits) IsDefault() bool { method ToMaybeNilPtr (line 289) | func (l *ResourceLimits) ToMaybeNilPtr() *ResourceLimits { method Apply (line 297) | func (l *ResourceLimits) Apply(l2 ResourceLimits) { method Build (line 324) | func (l *ResourceLimits) Build(defaults Limit) BaseLimit { type PartialLimitConfig (line 350) | type PartialLimitConfig struct method MarshalJSON (line 379) | func (cfg *PartialLimitConfig) MarshalJSON() ([]byte, error) { method Apply (line 447) | func (cfg *PartialLimitConfig) Apply(c PartialLimitConfig) { method Build (line 467) | func (cfg PartialLimitConfig) Build(defaults ConcreteLimitConfig) Conc... function applyResourceLimitsMap (line 428) | func applyResourceLimitsMap[K comparable](this *map[K]ResourceLimits, ot... function buildMapWithDefault (line 491) | func buildMapWithDefault[K comparable](definedLimits map[K]ResourceLimit... type ConcreteLimitConfig (line 513) | type ConcreteLimitConfig struct method ToPartialLimitConfig (line 557) | func (cfg ConcreteLimitConfig) ToPartialLimitConfig() PartialLimitConf... function resourceLimitsMapFromBaseLimitMap (line 542) | func resourceLimitsMapFromBaseLimitMap[K comparable](baseLimitMap map[K]... function scale (line 636) | func scale(base BaseLimit, inc BaseLimitIncrease, memory int64, numFD in... FILE: p2p/host/resource-manager/limit_test.go function TestFileDescriptorCounting (line 12) | func TestFileDescriptorCounting(t *testing.T) { function TestScaling (line 21) | func TestScaling(t *testing.T) { function TestReadmeExample (line 116) | func TestReadmeExample(t *testing.T) { function TestJSONMarshalling (line 146) | func TestJSONMarshalling(t *testing.T) { function TestJSONRoundTripInt64 (line 169) | func TestJSONRoundTripInt64(t *testing.T) { function TestRoundTripFromConcreteAndBack (line 187) | func TestRoundTripFromConcreteAndBack(t *testing.T) { function TestSerializeJSON (line 212) | func TestSerializeJSON(t *testing.T) { function TestWhatIsZeroInResourceLimits (line 230) | func TestWhatIsZeroInResourceLimits(t *testing.T) { FILE: p2p/host/resource-manager/limits_metrics_test.go function TestReportSystemLimits (line 10) | func TestReportSystemLimits(t *testing.T) { function TestReportSystemLimitsNilLimiter (line 141) | func TestReportSystemLimitsNilLimiter(t *testing.T) { FILE: p2p/host/resource-manager/metrics.go type MetricsReporter (line 10) | type MetricsReporter interface type metrics (line 46) | type metrics struct method AllowConn (line 58) | func (m *metrics) AllowConn(dir network.Direction, usefd bool) { method BlockConn (line 66) | func (m *metrics) BlockConn(dir network.Direction, usefd bool) { method AllowStream (line 74) | func (m *metrics) AllowStream(p peer.ID, dir network.Direction) { method BlockStream (line 82) | func (m *metrics) BlockStream(p peer.ID, dir network.Direction) { method AllowPeer (line 90) | func (m *metrics) AllowPeer(p peer.ID) { method BlockPeer (line 98) | func (m *metrics) BlockPeer(p peer.ID) { method AllowProtocol (line 106) | func (m *metrics) AllowProtocol(proto protocol.ID) { method BlockProtocol (line 114) | func (m *metrics) BlockProtocol(proto protocol.ID) { method BlockProtocolPeer (line 122) | func (m *metrics) BlockProtocolPeer(proto protocol.ID, p peer.ID) { method AllowService (line 130) | func (m *metrics) AllowService(svc string) { method BlockService (line 138) | func (m *metrics) BlockService(svc string) { method BlockServicePeer (line 146) | func (m *metrics) BlockServicePeer(svc string, p peer.ID) { method AllowMemory (line 154) | func (m *metrics) AllowMemory(size int) { method BlockMemory (line 162) | func (m *metrics) BlockMemory(size int) { function WithMetrics (line 51) | func WithMetrics(reporter MetricsReporter) Option { FILE: p2p/host/resource-manager/noalloc_test.go function randomTraceEvt (line 15) | func randomTraceEvt(rng *rand.Rand) TraceEvt { function BenchmarkMetricsRecording (line 64) | func BenchmarkMetricsRecording(b *testing.B) { function TestNoAllocsNoCover (line 89) | func TestNoAllocsNoCover(t *testing.T) { FILE: p2p/host/resource-manager/rcmgr.go type resourceManager (line 25) | type resourceManager struct method GetAllowlist (line 227) | func (r *resourceManager) GetAllowlist() *Allowlist { method ViewSystem (line 243) | func (r *resourceManager) ViewSystem(f func(network.ResourceScope) err... method ViewTransient (line 247) | func (r *resourceManager) ViewTransient(f func(network.ResourceScope) ... method ViewService (line 251) | func (r *resourceManager) ViewService(srv string, f func(network.Servi... method ViewProtocol (line 258) | func (r *resourceManager) ViewProtocol(proto protocol.ID, f func(netwo... method ViewPeer (line 265) | func (r *resourceManager) ViewPeer(p peer.ID, f func(network.PeerScope... method getServiceScope (line 272) | func (r *resourceManager) getServiceScope(svc string) *serviceScope { method getProtocolScope (line 286) | func (r *resourceManager) getProtocolScope(proto protocol.ID) *protoco... method setStickyProtocol (line 300) | func (r *resourceManager) setStickyProtocol(proto protocol.ID) { method getPeerScope (line 310) | func (r *resourceManager) getPeerScope(p peer.ID) *peerScope { method setStickyPeer (line 324) | func (r *resourceManager) setStickyPeer(p peer.ID) { method nextConnId (line 335) | func (r *resourceManager) nextConnId() int64 { method nextStreamId (line 343) | func (r *resourceManager) nextStreamId() int64 { method VerifySourceAddress (line 353) | func (r *resourceManager) VerifySourceAddress(addr net.Addr) bool { method OpenConnectionNoIP (line 367) | func (r *resourceManager) OpenConnectionNoIP(dir network.Direction, us... method OpenConnection (line 371) | func (r *resourceManager) OpenConnection(dir network.Direction, usefd ... method openConnection (line 385) | func (r *resourceManager) openConnection(dir network.Direction, usefd ... method OpenStream (line 421) | func (r *resourceManager) OpenStream(p peer.ID, dir network.Direction)... method Close (line 437) | func (r *resourceManager) Close() error { method background (line 445) | func (r *resourceManager) background() { method gc (line 462) | func (r *resourceManager) gc() { type systemScope (line 61) | type systemScope struct type transientScope (line 67) | type transientScope struct type serviceScope (line 75) | type serviceScope struct method Name (line 659) | func (s *serviceScope) Name() string { method getPeerScope (line 663) | func (s *serviceScope) getPeerScope(p peer.ID) *resourceScope { type protocolScope (line 86) | type protocolScope struct method Protocol (line 686) | func (s *protocolScope) Protocol() protocol.ID { method getPeerScope (line 690) | func (s *protocolScope) getPeerScope(p peer.ID) *resourceScope { type peerScope (line 97) | type peerScope struct method Peer (line 713) | func (s *peerScope) Peer() peer.ID { type connectionScope (line 106) | type connectionScope struct method PeerScope (line 717) | func (s *connectionScope) PeerScope() network.PeerScope { method Done (line 729) | func (s *connectionScope) Done() { method transferAllowedToStandard (line 745) | func (s *connectionScope) transferAllowedToStandard() (err error) { method SetPeer (line 784) | func (s *connectionScope) SetPeer(p peer.ID) error { type streamScope (line 121) | type streamScope struct method ProtocolScope (line 844) | func (s *streamScope) ProtocolScope() network.ProtocolScope { method SetProtocol (line 856) | func (s *streamScope) SetProtocol(proto protocol.ID) error { method ServiceScope (line 902) | func (s *streamScope) ServiceScope() network.ServiceScope { method SetService (line 914) | func (s *streamScope) SetService(svc string) error { method PeerScope (line 963) | func (s *streamScope) PeerScope() network.PeerScope { type Option (line 137) | type Option function NewResourceManager (line 139) | func NewResourceManager(limits Limiter, opts ...Option) (network.Resourc... function GetAllowlist (line 234) | func GetAllowlist(rcmgr network.ResourceManager) *Allowlist { function newSystemScope (line 516) | func newSystemScope(limit Limit, rcmgr *resourceManager, name string) *s... function newTransientScope (line 522) | func newTransientScope(limit Limit, rcmgr *resourceManager, name string,... function newServiceScope (line 531) | func newServiceScope(service string, limit Limit, rcmgr *resourceManager... function newProtocolScope (line 541) | func newProtocolScope(proto protocol.ID, limit Limit, rcmgr *resourceMan... function newPeerScope (line 551) | func newPeerScope(p peer.ID, limit Limit, rcmgr *resourceManager) *peerS... function newConnectionScope (line 561) | func newConnectionScope(dir network.Direction, usefd bool, limit Limit, ... function newAllowListedConnectionScope (line 574) | func newAllowListedConnectionScope(dir network.Direction, usefd bool, li... function newStreamScope (line 587) | func newStreamScope(dir network.Direction, limit Limit, peer *peerScope,... function IsSystemScope (line 598) | func IsSystemScope(name string) bool { function IsTransientScope (line 602) | func IsTransientScope(name string) bool { function streamScopeName (line 606) | func streamScopeName(streamId int64) string { function IsStreamScope (line 610) | func IsStreamScope(name string) bool { function connScopeName (line 614) | func connScopeName(streamId int64) string { function IsConnScope (line 618) | func IsConnScope(name string) bool { function peerScopeName (line 622) | func peerScopeName(p peer.ID) string { function PeerStrInScopeName (line 627) | func PeerStrInScopeName(name string) string { function ParseProtocolScopeName (line 642) | func ParseProtocolScopeName(name string) string { FILE: p2p/host/resource-manager/rcmgr_test.go function TestResourceManager (line 20) | func TestResourceManager(t *testing.T) { function TestResourceManagerWithAllowlist (line 982) | func TestResourceManagerWithAllowlist(t *testing.T) { function TestAllowlistAndConnLimiterPlayNice (line 1060) | func TestAllowlistAndConnLimiterPlayNice(t *testing.T) { function TestResourceManagerRateLimiting (line 1117) | func TestResourceManagerRateLimiting(t *testing.T) { function TestVerifySourceAddressRateLimiter (line 1148) | func TestVerifySourceAddressRateLimiter(t *testing.T) { FILE: p2p/host/resource-manager/scope.go type resources (line 14) | type resources struct method checkMemory (line 105) | func (rc *resources) checkMemory(rsvp int64, prio uint8) error { method reserveMemory (line 142) | func (rc *resources) reserveMemory(size int64, prio uint8) error { method releaseMemory (line 151) | func (rc *resources) releaseMemory(size int64) { method addStream (line 161) | func (rc *resources) addStream(dir network.Direction) error { method addStreams (line 168) | func (rc *resources) addStreams(incount, outcount int) error { method removeStream (line 206) | func (rc *resources) removeStream(dir network.Direction) { method removeStreams (line 214) | func (rc *resources) removeStreams(incount, outcount int) { method addConn (line 228) | func (rc *resources) addConn(dir network.Direction, usefd bool) error { method addConns (line 241) | func (rc *resources) addConns(incount, outcount, fdcount int) error { method removeConn (line 291) | func (rc *resources) removeConn(dir network.Direction, usefd bool) { method removeConns (line 304) | func (rc *resources) removeConns(incount, outcount, fdcount int) { method stat (line 323) | func (rc *resources) stat() network.ScopeStat { type resourceScope (line 33) | type resourceScope struct method wrapError (line 335) | func (s *resourceScope) wrapError(err error) error { method ReserveMemory (line 339) | func (s *resourceScope) ReserveMemory(size int, prio uint8) error { method reserveMemoryForEdges (line 365) | func (s *resourceScope) reserveMemoryForEdges(size int, prio uint8) er... method releaseMemoryForEdges (line 393) | func (s *resourceScope) releaseMemoryForEdges(size int) { method ReserveMemoryForChild (line 404) | func (s *resourceScope) ReserveMemoryForChild(size int64, prio uint8) ... method ReleaseMemory (line 421) | func (s *resourceScope) ReleaseMemory(size int) { method ReleaseMemoryForChild (line 434) | func (s *resourceScope) ReleaseMemoryForChild(size int64) { method AddStream (line 446) | func (s *resourceScope) AddStream(dir network.Direction) error { method addStreamForEdges (line 469) | func (s *resourceScope) addStreamForEdges(dir network.Direction) error { method AddStreamForChild (line 495) | func (s *resourceScope) AddStreamForChild(dir network.Direction) (netw... method RemoveStream (line 512) | func (s *resourceScope) RemoveStream(dir network.Direction) { method removeStreamForEdges (line 525) | func (s *resourceScope) removeStreamForEdges(dir network.Direction) { method RemoveStreamForChild (line 536) | func (s *resourceScope) RemoveStreamForChild(dir network.Direction) { method AddConn (line 548) | func (s *resourceScope) AddConn(dir network.Direction, usefd bool) err... method addConnForEdges (line 571) | func (s *resourceScope) addConnForEdges(dir network.Direction, usefd b... method AddConnForChild (line 597) | func (s *resourceScope) AddConnForChild(dir network.Direction, usefd b... method RemoveConn (line 614) | func (s *resourceScope) RemoveConn(dir network.Direction, usefd bool) { method removeConnForEdges (line 627) | func (s *resourceScope) removeConnForEdges(dir network.Direction, usef... method RemoveConnForChild (line 637) | func (s *resourceScope) RemoveConnForChild(dir network.Direction, usef... method ReserveForChild (line 649) | func (s *resourceScope) ReserveForChild(st network.ScopeStat) error { method ReleaseForChild (line 683) | func (s *resourceScope) ReleaseForChild(st network.ScopeStat) { method ReleaseResources (line 700) | func (s *resourceScope) ReleaseResources(st network.ScopeStat) { method nextSpanID (line 725) | func (s *resourceScope) nextSpanID() int { method BeginSpan (line 730) | func (s *resourceScope) BeginSpan() (network.ResourceScopeSpan, error) { method Done (line 742) | func (s *resourceScope) Done() { method doneUnlocked (line 749) | func (s *resourceScope) doneUnlocked() { method Stat (line 776) | func (s *resourceScope) Stat() network.ScopeStat { method IncRef (line 783) | func (s *resourceScope) IncRef() { method DecRef (line 790) | func (s *resourceScope) DecRef() { method IsUnused (line 797) | func (s *resourceScope) IsUnused() bool { function newResourceScope (line 52) | func newResourceScope(limit Limit, edges []*resourceScope, name string, ... function newResourceScopeSpan (line 67) | func newResourceScopeSpan(owner *resourceScope, id int) *resourceScope { function IsSpan (line 80) | func IsSpan(name string) bool { function addInt64WithOverflow (line 84) | func addInt64WithOverflow(a int64, b int64) (c int64, ok bool) { function mulInt64WithOverflow (line 91) | func mulInt64WithOverflow(a, b int64) (c int64, ok bool) { FILE: p2p/host/resource-manager/scope_test.go function checkResources (line 12) | func checkResources(t *testing.T, rc *resources, st network.ScopeStat) { function TestCheckMemory (line 35) | func TestCheckMemory(t *testing.T) { function TestResources (line 104) | func TestResources(t *testing.T) { function TestResourceScopeSimple (line 316) | func TestResourceScopeSimple(t *testing.T) { function testResourceScopeBasic (line 343) | func testResourceScopeBasic(t *testing.T, s *resourceScope) { function TestResourceScopeTxnBasic (line 448) | func TestResourceScopeTxnBasic(t *testing.T) { function TestResourceScopeTxnZombie (line 483) | func TestResourceScopeTxnZombie(t *testing.T) { function TestResourceScopeTxnTree (line 525) | func TestResourceScopeTxnTree(t *testing.T) { function TestResourceScopeDAG (line 624) | func TestResourceScopeDAG(t *testing.T) { function TestResourceScopeDAGTxn (line 1136) | func TestResourceScopeDAGTxn(t *testing.T) { FILE: p2p/host/resource-manager/stats.go constant metricNamespace (line 11) | metricNamespace = "libp2p_rcmgr" function MustRegisterWith (line 151) | func MustRegisterWith(reg prometheus.Registerer) { function WithMetricsDisabled (line 172) | func WithMetricsDisabled() Option { type StatsTraceReporter (line 180) | type StatsTraceReporter struct method ReportSystemLimits (line 196) | func (r StatsTraceReporter) ReportSystemLimits(limiter Limiter) { method ConsumeEvent (line 224) | func (r StatsTraceReporter) ConsumeEvent(evt TraceEvt) { method consumeEventWithLabelSlice (line 232) | func (r StatsTraceReporter) consumeEventWithLabelSlice(evt TraceEvt, t... function NewStatsTraceReporter (line 182) | func NewStatsTraceReporter() (StatsTraceReporter, error) { function reportLimit (line 187) | func reportLimit(scope, resource string, value int64) { FILE: p2p/host/resource-manager/stats_test.go function TestTraceReporterStartAndClose (line 13) | func TestTraceReporterStartAndClose(t *testing.T) { function TestConsumeEvent (line 21) | func TestConsumeEvent(t *testing.T) { FILE: p2p/host/resource-manager/sys_not_unix.go function getNumFDs (line 8) | func getNumFDs() int { FILE: p2p/host/resource-manager/sys_unix.go function getNumFDs (line 9) | func getNumFDs() int { FILE: p2p/host/resource-manager/sys_windows.go function getNumFDs (line 9) | func getNumFDs() int { FILE: p2p/host/resource-manager/trace.go type trace (line 17) | type trace struct method push (line 213) | func (t *trace) push(evt TraceEvt) { method backgroundWriter (line 234) | func (t *trace) backgroundWriter(out io.WriteCloser) { method writeEvents (line 302) | func (t *trace) writeEvents(pend []any, jout *json.Encoder) error { method Start (line 312) | func (t *trace) Start(limits Limiter) error { method Close (line 337) | func (t *trace) Close() error { method CreateScope (line 357) | func (t *trace) CreateScope(scope string, limit Limit) { method DestroyScope (line 369) | func (t *trace) DestroyScope(scope string) { method ReserveMemory (line 380) | func (t *trace) ReserveMemory(scope string, prio uint8, size, mem int6... method BlockReserveMemory (line 398) | func (t *trace) BlockReserveMemory(scope string, prio uint8, size, mem... method ReleaseMemory (line 416) | func (t *trace) ReleaseMemory(scope string, size, mem int64) { method AddStream (line 433) | func (t *trace) AddStream(scope string, dir network.Direction, nstream... method BlockAddStream (line 455) | func (t *trace) BlockAddStream(scope string, dir network.Direction, ns... method RemoveStream (line 477) | func (t *trace) RemoveStream(scope string, dir network.Direction, nstr... method AddStreams (line 499) | func (t *trace) AddStreams(scope string, deltaIn, deltaOut, nstreamsIn... method BlockAddStreams (line 518) | func (t *trace) BlockAddStreams(scope string, deltaIn, deltaOut, nstre... method RemoveStreams (line 537) | func (t *trace) RemoveStreams(scope string, deltaIn, deltaOut, nstream... method AddConn (line 556) | func (t *trace) AddConn(scope string, dir network.Direction, usefd boo... method BlockAddConn (line 583) | func (t *trace) BlockAddConn(scope string, dir network.Direction, usef... method RemoveConn (line 610) | func (t *trace) RemoveConn(scope string, dir network.Direction, usefd ... method AddConns (line 637) | func (t *trace) AddConns(scope string, deltaIn, deltaOut, deltafd, nco... method BlockAddConns (line 658) | func (t *trace) BlockAddConns(scope string, deltaIn, deltaOut, deltafd... method RemoveConns (line 679) | func (t *trace) RemoveConns(scope string, deltaIn, deltaOut, deltafd, ... type TraceReporter (line 30) | type TraceReporter interface function WithTrace (line 36) | func WithTrace(path string) Option { function WithTraceReporter (line 47) | func WithTraceReporter(reporter TraceReporter) Option { type TraceEvtTyp (line 57) | type TraceEvtTyp constant TraceStartEvt (line 60) | TraceStartEvt TraceEvtTyp = "start" constant TraceCreateScopeEvt (line 61) | TraceCreateScopeEvt TraceEvtTyp = "create_scope" constant TraceDestroyScopeEvt (line 62) | TraceDestroyScopeEvt TraceEvtTyp = "destroy_scope" constant TraceReserveMemoryEvt (line 63) | TraceReserveMemoryEvt TraceEvtTyp = "reserve_memory" constant TraceBlockReserveMemoryEvt (line 64) | TraceBlockReserveMemoryEvt TraceEvtTyp = "block_reserve_memory" constant TraceReleaseMemoryEvt (line 65) | TraceReleaseMemoryEvt TraceEvtTyp = "release_memory" constant TraceAddStreamEvt (line 66) | TraceAddStreamEvt TraceEvtTyp = "add_stream" constant TraceBlockAddStreamEvt (line 67) | TraceBlockAddStreamEvt TraceEvtTyp = "block_add_stream" constant TraceRemoveStreamEvt (line 68) | TraceRemoveStreamEvt TraceEvtTyp = "remove_stream" constant TraceAddConnEvt (line 69) | TraceAddConnEvt TraceEvtTyp = "add_conn" constant TraceBlockAddConnEvt (line 70) | TraceBlockAddConnEvt TraceEvtTyp = "block_add_conn" constant TraceRemoveConnEvt (line 71) | TraceRemoveConnEvt TraceEvtTyp = "remove_conn" type scopeClass (line 74) | type scopeClass struct method MarshalJSON (line 78) | func (s scopeClass) MarshalJSON() ([]byte, error) { type TraceEvt (line 187) | type TraceEvt struct FILE: p2p/host/routed/routed.go constant AddressTTL (line 25) | AddressTTL = time.Second * 10 type RoutedHost (line 30) | type RoutedHost struct method Connect (line 48) | func (rh *RoutedHost) Connect(ctx context.Context, pi peer.AddrInfo) e... method findPeerAddrs (line 147) | func (rh *RoutedHost) findPeerAddrs(ctx context.Context, id peer.ID) (... method ID (line 166) | func (rh *RoutedHost) ID() peer.ID { method Peerstore (line 170) | func (rh *RoutedHost) Peerstore() peerstore.Peerstore { method Addrs (line 174) | func (rh *RoutedHost) Addrs() []ma.Multiaddr { method Network (line 178) | func (rh *RoutedHost) Network() network.Network { method Mux (line 182) | func (rh *RoutedHost) Mux() protocol.Switch { method EventBus (line 186) | func (rh *RoutedHost) EventBus() event.Bus { method SetStreamHandler (line 190) | func (rh *RoutedHost) SetStreamHandler(pid protocol.ID, handler networ... method SetStreamHandlerMatch (line 194) | func (rh *RoutedHost) SetStreamHandlerMatch(pid protocol.ID, m func(pr... method RemoveStreamHandler (line 198) | func (rh *RoutedHost) RemoveStreamHandler(pid protocol.ID) { method NewStream (line 202) | func (rh *RoutedHost) NewStream(ctx context.Context, p peer.ID, pids .... method Close (line 216) | func (rh *RoutedHost) Close() error { method ConnManager (line 220) | func (rh *RoutedHost) ConnManager() connmgr.ConnManager { type Routing (line 35) | type Routing interface function Wrap (line 39) | func Wrap(h host.Host, r Routing) *RoutedHost { FILE: p2p/host/routed/routed_test.go type mockRouting (line 17) | type mockRouting struct method FindPeer (line 22) | func (m *mockRouting) FindPeer(ctx context.Context, pid peer.ID) (peer... function TestRoutedHostConnectToObsoleteAddresses (line 27) | func TestRoutedHostConnectToObsoleteAddresses(t *testing.T) { function TestRoutedHostConnectFindPeerNoUsefulAddrs (line 65) | func TestRoutedHostConnectFindPeerNoUsefulAddrs(t *testing.T) { FILE: p2p/http/auth/auth.go constant PeerIDAuthScheme (line 8) | PeerIDAuthScheme = handshake.PeerIDAuthScheme constant ProtocolID (line 9) | ProtocolID = "/http-peer-id-auth/1.0.0" FILE: p2p/http/auth/auth_test.go function TestMutualAuth (line 25) | func TestMutualAuth(t *testing.T) { function TestBodyNotSentDuringRedirect (line 208) | func TestBodyNotSentDuringRedirect(t *testing.T) { type instrumentedRoundTripper (line 236) | type instrumentedRoundTripper struct method RoundTrip (line 241) | func (irt *instrumentedRoundTripper) RoundTrip(req *http.Request) (*ht... method TLSClientConfig (line 246) | func (irt *instrumentedRoundTripper) TLSClientConfig() *tls.Config { function TestConcurrentAuth (line 250) | func TestConcurrentAuth(t *testing.T) { FILE: p2p/http/auth/client.go type ClientPeerIDAuth (line 16) | type ClientPeerIDAuth struct method AuthenticatedDo (line 37) | func (a *ClientPeerIDAuth) AuthenticatedDo(client *http.Client, req *h... method AuthenticateWithRoundTripper (line 41) | func (a *ClientPeerIDAuth) AuthenticateWithRoundTripper(rt http.RoundT... method HasToken (line 89) | func (a *ClientPeerIDAuth) HasToken(hostname string) bool { method runHandshake (line 94) | func (a *ClientPeerIDAuth) runHandshake(rt http.RoundTripper, req *htt... method doWithToken (line 139) | func (a *ClientPeerIDAuth) doWithToken(rt http.RoundTripper, req *http... type clientAsRoundTripper (line 23) | type clientAsRoundTripper struct method RoundTrip (line 27) | func (c clientAsRoundTripper) RoundTrip(req *http.Request) (*http.Resp... type bodyMeta (line 160) | type bodyMeta struct method setBody (line 175) | func (b *bodyMeta) setBody(req *http.Request) { function clearBody (line 166) | func clearBody(req *http.Request) bodyMeta { type tokenInfo (line 181) | type tokenInfo struct type tokenMap (line 187) | type tokenMap struct method get (line 192) | func (tm *tokenMap) get(hostname string, ttl time.Duration) (tokenInfo... method set (line 204) | func (tm *tokenMap) set(hostname string, ti tokenInfo) { FILE: p2p/http/auth/internal/handshake/alloc_test.go function TestParsePeerIDAuthSchemeParamsNoAllocNoCover (line 7) | func TestParsePeerIDAuthSchemeParamsNoAllocNoCover(t *testing.T) { FILE: p2p/http/auth/internal/handshake/client.go type peerIDAuthClientState (line 14) | type peerIDAuthClientState constant peerIDAuthClientStateSignChallenge (line 17) | peerIDAuthClientStateSignChallenge peerIDAuthClientState = iota constant peerIDAuthClientStateVerifyChallenge (line 18) | peerIDAuthClientStateVerifyChallenge constant peerIDAuthClientStateDone (line 19) | peerIDAuthClientStateDone constant peerIDAuthClientInitiateChallenge (line 22) | peerIDAuthClientInitiateChallenge constant peerIDAuthClientStateVerifyAndSignChallenge (line 23) | peerIDAuthClientStateVerifyAndSignChallenge constant peerIDAuthClientStateWaitingForBearer (line 24) | peerIDAuthClientStateWaitingForBearer type PeerIDAuthHandshakeClient (line 27) | type PeerIDAuthHandshakeClient struct method SetInitiateChallenge (line 42) | func (h *PeerIDAuthHandshakeClient) SetInitiateChallenge() { method ParseHeader (line 46) | func (h *PeerIDAuthHandshakeClient) ParseHeader(header http.Header) er... method Run (line 87) | func (h *PeerIDAuthHandshakeClient) Run() error { method addChallengeServerParam (line 158) | func (h *PeerIDAuthHandshakeClient) addChallengeServerParam() error { method verifySig (line 169) | func (h *PeerIDAuthHandshakeClient) verifySig(clientPubKeyBytes []byte... method addSigParam (line 185) | func (h *PeerIDAuthHandshakeClient) addSigParam() error { method PeerID (line 207) | func (h *PeerIDAuthHandshakeClient) PeerID() (peer.ID, error) { method AddHeader (line 221) | func (h *PeerIDAuthHandshakeClient) AddHeader(hdr http.Header) { method BearerToken (line 227) | func (h *PeerIDAuthHandshakeClient) BearerToken() string { method ServerAuthenticated (line 234) | func (h *PeerIDAuthHandshakeClient) ServerAuthenticated() bool { method HandshakeDone (line 245) | func (h *PeerIDAuthHandshakeClient) HandshakeDone() bool { FILE: p2p/http/auth/internal/handshake/handshake.go constant PeerIDAuthScheme (line 20) | PeerIDAuthScheme = "libp2p-PeerID" constant challengeLen (line 21) | challengeLen = 32 constant maxHeaderSize (line 22) | maxHeaderSize = 2048 type params (line 34) | type params struct method parsePeerIDAuthSchemeParams (line 45) | func (p *params) parsePeerIDAuthSchemeParams(headerVal []byte) error { function splitAuthHeaderParams (line 90) | func splitAuthHeaderParams(data []byte, atEOF bool) (advance int, token ... type headerBuilder (line 117) | type headerBuilder struct method clear (line 122) | func (h *headerBuilder) clear() { method writeScheme (line 127) | func (h *headerBuilder) writeScheme(scheme string) { method maybeAddComma (line 132) | func (h *headerBuilder) maybeAddComma() { method writeParamB64 (line 142) | func (h *headerBuilder) writeParamB64(buf []byte, key string, val []by... method writeParam (line 151) | func (h *headerBuilder) writeParam(key string, val []byte) { type sigParam (line 165) | type sigParam struct function verifySig (line 170) | func verifySig(publicKey crypto.PubKey, prefix string, signedParts []sig... function sign (line 192) | func sign(privKey crypto.PrivKey, prefix string, partsToSign []sigParam)... function genDataToSign (line 205) | func genDataToSign(buf []byte, prefix string, parts []sigParam) ([]byte,... FILE: p2p/http/auth/internal/handshake/handshake_test.go function TestHandshake (line 22) | func TestHandshake(t *testing.T) { function TestServerRefusesClientInitiatedHandshake (line 97) | func TestServerRefusesClientInitiatedHandshake(t *testing.T) { function BenchmarkServerHandshake (line 158) | func BenchmarkServerHandshake(b *testing.B) { function TestParsePeerIDAuthSchemeParams (line 230) | func TestParsePeerIDAuthSchemeParams(t *testing.T) { function BenchmarkParsePeerIDAuthSchemeParams (line 243) | func BenchmarkParsePeerIDAuthSchemeParams(b *testing.B) { function TestHeaderBuilder (line 256) | func TestHeaderBuilder(t *testing.T) { function BenchmarkHeaderBuilder (line 267) | func BenchmarkHeaderBuilder(b *testing.B) { function TestOpaqueStateRoundTrip (line 287) | func TestOpaqueStateRoundTrip(t *testing.T) { function FuzzServerHandshakeNoPanic (line 317) | func FuzzServerHandshakeNoPanic(f *testing.F) { function BenchmarkOpaqueStateWrite (line 340) | func BenchmarkOpaqueStateWrite(b *testing.B) { function BenchmarkOpaqueStateRead (line 359) | func BenchmarkOpaqueStateRead(b *testing.B) { function FuzzParsePeerIDAuthSchemeParamsNoPanic (line 380) | func FuzzParsePeerIDAuthSchemeParamsNoPanic(f *testing.F) { type specsExampleParameters (line 388) | type specsExampleParameters struct function TestSpecsExample (line 395) | func TestSpecsExample(t *testing.T) { function TestSpecsClientInitiatedExample (line 501) | func TestSpecsClientInitiatedExample(t *testing.T) { function TestSigningExample (line 607) | func TestSigningExample(t *testing.T) { FILE: p2p/http/auth/internal/handshake/server.go constant challengeTTL (line 24) | challengeTTL = 5 * time.Minute type peerIDAuthServerState (line 26) | type peerIDAuthServerState constant peerIDAuthServerStateChallengeClient (line 30) | peerIDAuthServerStateChallengeClient peerIDAuthServerState = iota constant peerIDAuthServerStateVerifyChallenge (line 31) | peerIDAuthServerStateVerifyChallenge constant peerIDAuthServerStateVerifyBearer (line 32) | peerIDAuthServerStateVerifyBearer constant peerIDAuthServerStateSignChallenge (line 35) | peerIDAuthServerStateSignChallenge type opaqueState (line 38) | type opaqueState struct method Marshal (line 48) | func (o *opaqueState) Marshal(hmac hash.Hash, b []byte) ([]byte, error) { method Unmarshal (line 63) | func (o *opaqueState) Unmarshal(hmacImpl hash.Hash, d []byte) error { type PeerIDAuthHandshakeServer (line 86) | type PeerIDAuthHandshakeServer struct method Reset (line 105) | func (h *PeerIDAuthHandshakeServer) Reset() { method ParseHeaderVal (line 115) | func (h *PeerIDAuthHandshakeServer) ParseHeaderVal(headerVal []byte) e... method Run (line 138) | func (h *PeerIDAuthHandshakeServer) Run() error { method addChallengeClientParam (line 265) | func (h *PeerIDAuthHandshakeServer) addChallengeClientParam() error { method addOpaqueParam (line 278) | func (h *PeerIDAuthHandshakeServer) addOpaqueParam() error { method addServerSigParam (line 287) | func (h *PeerIDAuthHandshakeServer) addServerSigParam(clientPublicKeyB... method addBearerParam (line 303) | func (h *PeerIDAuthHandshakeServer) addBearerParam() error { method addPublicKeyParam (line 312) | func (h *PeerIDAuthHandshakeServer) addPublicKeyParam() error { method verifySig (line 322) | func (h *PeerIDAuthHandshakeServer) verifySig(clientPubKey crypto.PubK... method PeerID (line 344) | func (h *PeerIDAuthHandshakeServer) PeerID() (peer.ID, error) { method SetHeader (line 360) | func (h *PeerIDAuthHandshakeServer) SetHeader(hdr http.Header) { FILE: p2p/http/auth/server.go type hmacPool (line 19) | type hmacPool struct method Get (line 33) | func (p *hmacPool) Get() hash.Hash { method Put (line 39) | func (p *hmacPool) Put(h hash.Hash) { function newHmacPool (line 23) | func newHmacPool(key []byte) *hmacPool { type ServerPeerIDAuth (line 43) | type ServerPeerIDAuth struct method ServeHTTP (line 63) | func (a *ServerPeerIDAuth) ServeHTTP(w http.ResponseWriter, r *http.Re... method ServeHTTPWithNextHandler (line 67) | func (a *ServerPeerIDAuth) ServeHTTPWithNextHandler(w http.ResponseWri... function HasAuthHeader (line 166) | func HasAuthHeader(r *http.Request) bool { FILE: p2p/http/example_test.go function ExampleHost_authenticatedHTTP (line 21) | func ExampleHost_authenticatedHTTP() { function ExampleHost_withAStockGoHTTPClient (line 91) | func ExampleHost_withAStockGoHTTPClient() { function ExampleHost_listenOnHTTPTransportAndStreams (line 133) | func ExampleHost_listenOnHTTPTransportAndStreams() { function ExampleHost_overLibp2pStreams (line 156) | func ExampleHost_overLibp2pStreams() { function ExampleHost_Serve (line 204) | func ExampleHost_Serve() { function ExampleHost_SetHTTPHandler (line 222) | func ExampleHost_SetHTTPHandler() { function ExampleHost_SetHTTPHandlerAtPath (line 256) | func ExampleHost_SetHTTPHandlerAtPath() { function ExampleHost_NamespacedClient (line 290) | func ExampleHost_NamespacedClient() { function ExampleHost_NamespaceRoundTripper (line 328) | func ExampleHost_NamespaceRoundTripper() { function ExampleHost_NewConstrainedRoundTripper (line 372) | func ExampleHost_NewConstrainedRoundTripper() { function ExampleWellKnownHandler (line 410) | func ExampleWellKnownHandler() { function ExampleHost_RoundTrip (line 441) | func ExampleHost_RoundTrip() { FILE: p2p/http/libp2phttp.go constant ProtocolIDForMultistreamSelect (line 38) | ProtocolIDForMultistreamSelect = "/http/1.1" constant WellKnownProtocols (line 39) | WellKnownProtocols = "/.well-known/libp2p/protocols" constant LegacyWellKnownProtocols (line 44) | LegacyWellKnownProtocols = "/.well-known/libp2p" constant peerMetadataLimit (line 46) | peerMetadataLimit = 8 << 10 constant peerMetadataLRUSize (line 47) | peerMetadataLRUSize = 256 type clientPeerIDContextKey (line 53) | type clientPeerIDContextKey struct type serverPeerIDContextKey (line 54) | type serverPeerIDContextKey struct function ClientPeerID (line 56) | func ClientPeerID(r *http.Request) peer.ID { function ServerPeerID (line 63) | func ServerPeerID(r *http.Response) peer.ID { type ProtocolMeta (line 71) | type ProtocolMeta struct type PeerMeta (line 76) | type PeerMeta type WellKnownHandler (line 79) | type WellKnownHandler struct method ServeHTTP (line 90) | func (h *WellKnownHandler) ServeHTTP(w http.ResponseWriter, r *http.Re... method AddProtocolMeta (line 123) | func (h *WellKnownHandler) AddProtocolMeta(p protocol.ID, protocolMeta... method RemoveProtocolMeta (line 133) | func (h *WellKnownHandler) RemoveProtocolMeta(p protocol.ID) { function streamHostListen (line 86) | func streamHostListen(streamHost host.Host) (net.Listener, error) { type Host (line 148) | type Host struct method httpTransportInit (line 226) | func (h *Host) httpTransportInit() { method serveMuxInit (line 235) | func (h *Host) serveMuxInit() { method Addrs (line 243) | func (h *Host) Addrs() []ma.Multiaddr { method PeerID (line 250) | func (h *Host) PeerID() peer.ID { method setupListeners (line 259) | func (h *Host) setupListeners(listenerErrCh chan error) error { method Serve (line 322) | func (h *Host) Serve() error { method Close (line 424) | func (h *Host) Close() error { method SetHTTPHandler (line 434) | func (h *Host) SetHTTPHandler(p protocol.ID, handler http.Handler) { method SetHTTPHandlerAtPath (line 442) | func (h *Host) SetHTTPHandlerAtPath(p protocol.ID, path string, handle... method NamespaceRoundTripper (line 724) | func (h *Host) NamespaceRoundTripper(roundtripper http.RoundTripper, p... method NamespacedClient (line 761) | func (h *Host) NamespacedClient(p protocol.ID, server peer.AddrInfo, o... method initDefaultRT (line 774) | func (h *Host) initDefaultRT() { method RoundTrip (line 790) | func (h *Host) RoundTrip(r *http.Request) (*http.Response, error) { method NewConstrainedRoundTripper (line 921) | func (h *Host) NewConstrainedRoundTripper(server peer.AddrInfo, opts .... method getAndStorePeerMetadata (line 1085) | func (h *Host) getAndStorePeerMetadata(ctx context.Context, roundtripp... method SetPeerMetadata (line 1178) | func (h *Host) SetPeerMetadata(server peer.ID, meta PeerMeta) { method AddPeerMetadata (line 1187) | func (h *Host) AddPeerMetadata(server peer.ID, meta PeerMeta) { method GetPeerMetadata (line 1201) | func (h *Host) GetPeerMetadata(server peer.ID) (PeerMeta, bool) { method RemovePeerMetadata (line 1209) | func (h *Host) RemovePeerMetadata(server peer.ID) { type httpTransport (line 210) | type httpTransport struct function newPeerMetadataCache (line 217) | func newPeerMetadataCache() *lru.Cache[peer.ID, PeerMeta] { type PeerMetadataGetter (line 455) | type PeerMetadataGetter interface type streamRoundTripper (line 459) | type streamRoundTripper struct method GetPeerMetadata (line 485) | func (rt *streamRoundTripper) GetPeerMetadata() (PeerMeta, error) { method RoundTrip (line 493) | func (rt *streamRoundTripper) RoundTrip(r *http.Request) (*http.Respon... type streamReadCloser (line 475) | type streamReadCloser struct method Close (line 480) | func (s *streamReadCloser) Close() error { function locationHeaderToMultiaddrURI (line 564) | func locationHeaderToMultiaddrURI(original *url.URL, locationHeader stri... type roundTripperForSpecificServer (line 631) | type roundTripperForSpecificServer struct method GetPeerMetadata (line 642) | func (rt *roundTripperForSpecificServer) GetPeerMetadata() (PeerMeta, ... method RoundTrip (line 669) | func (rt *roundTripperForSpecificServer) RoundTrip(r *http.Request) (*... method CloseIdleConnections (line 679) | func (rt *roundTripperForSpecificServer) CloseIdleConnections() { type namespacedRoundTripper (line 697) | type namespacedRoundTripper struct method GetPeerMetadata (line 703) | func (rt *namespacedRoundTripper) GetPeerMetadata() (PeerMeta, error) { method RoundTrip (line 712) | func (rt *namespacedRoundTripper) RoundTrip(r *http.Request) (*http.Re... type explodedMultiaddr (line 1000) | type explodedMultiaddr struct function parseMultiaddr (line 1009) | func parseMultiaddr(addr ma.Multiaddr) (explodedMultiaddr, error) { function normalizeHTTPMultiaddr (line 1050) | func normalizeHTTPMultiaddr(addr ma.Multiaddr) (ma.Multiaddr, bool) { function requestPeerMeta (line 1146) | func requestPeerMeta(ctx context.Context, roundtripper http.RoundTripper... function connectionCloseHeaderMiddleware (line 1216) | func connectionCloseHeaderMiddleware(next http.Handler) http.Handler { function maybeDecorateContextWithAuthMiddleware (line 1226) | func maybeDecorateContextWithAuthMiddleware(serverAuth *httpauth.ServerP... FILE: p2p/http/libp2phttp_test.go function TestHTTPOverStreams (line 39) | func TestHTTPOverStreams(t *testing.T) { function TestHTTPOverStreamsSendsConnectionClose (line 78) | func TestHTTPOverStreamsSendsConnectionClose(t *testing.T) { function TestHTTPOverStreamsContextAndClientTimeout (line 118) | func TestHTTPOverStreamsContextAndClientTimeout(t *testing.T) { function TestHTTPOverStreamsReturnsConnectionClose (line 175) | func TestHTTPOverStreamsReturnsConnectionClose(t *testing.T) { function TestRoundTrippers (line 213) | func TestRoundTrippers(t *testing.T) { function TestPlainOldHTTPServer (line 361) | func TestPlainOldHTTPServer(t *testing.T) { function TestHostZeroValue (line 454) | func TestHostZeroValue(t *testing.T) { function TestHTTPS (line 477) | func TestHTTPS(t *testing.T) { function selfSignedTLSConfig (line 499) | func selfSignedTLSConfig(t *testing.T) *tls.Config { function TestCustomServeMux (line 537) | func TestCustomServeMux(t *testing.T) { function TestSetHandlerAtPath (line 566) | func TestSetHandlerAtPath(t *testing.T) { function TestServerLegacyWellKnownResource (line 630) | func TestServerLegacyWellKnownResource(t *testing.T) { function TestResponseWriterShouldNotHaveCancelledContext (line 727) | func TestResponseWriterShouldNotHaveCancelledContext(t *testing.T) { function TestHTTPHostAsRoundTripper (line 763) | func TestHTTPHostAsRoundTripper(t *testing.T) { function TestHTTPHostAsRoundTripperFailsWhenNoStreamHostPresent (line 825) | func TestHTTPHostAsRoundTripperFailsWhenNoStreamHostPresent(t *testing.T) { function TestRedirects (line 836) | func TestRedirects(t *testing.T) { function TestMultiaddrURIRedirect (line 924) | func TestMultiaddrURIRedirect(t *testing.T) { function TestImpliedHostIsSet (line 967) | func TestImpliedHostIsSet(t *testing.T) { function TestErrServerClosed (line 1019) | func TestErrServerClosed(t *testing.T) { function TestHTTPOverStreamsGetClientID (line 1036) | func TestHTTPOverStreamsGetClientID(t *testing.T) { function TestAuthenticatedRequest (line 1076) | func TestAuthenticatedRequest(t *testing.T) { FILE: p2p/http/options.go type RoundTripperOption (line 3) | type RoundTripperOption type roundTripperOpts (line 5) | type roundTripperOpts struct function PreferHTTPTransport (line 13) | func PreferHTTPTransport(o roundTripperOpts) roundTripperOpts { function ServerMustAuthenticatePeerID (line 21) | func ServerMustAuthenticatePeerID(o roundTripperOpts) roundTripperOpts { FILE: p2p/http/ping/ping.go constant pingSize (line 13) | pingSize = 32 constant PingProtocolID (line 14) | PingProtocolID = "/http-ping/1" type Ping (line 16) | type Ping struct method ServeHTTP (line 21) | func (Ping) ServeHTTP(w http.ResponseWriter, r *http.Request) { function SendPing (line 35) | func SendPing(client http.Client) error { FILE: p2p/metricshelper/conn.go function GetTransport (line 7) | func GetTransport(a ma.Multiaddr) string { function GetIPVersion (line 22) | func GetIPVersion(addr ma.Multiaddr) string { FILE: p2p/metricshelper/conn_test.go function TestGetTransport (line 10) | func TestGetTransport(t *testing.T) { function TestIPVersion (line 38) | func TestIPVersion(t *testing.T) { FILE: p2p/metricshelper/dir.go function GetDirection (line 5) | func GetDirection(dir network.Direction) string { FILE: p2p/metricshelper/pool.go constant capacity (line 8) | capacity = 8 function GetStringSlice (line 15) | func GetStringSlice() *[]string { function PutStringSlice (line 21) | func PutStringSlice(s *[]string) { FILE: p2p/metricshelper/pool_test.go function TestStringSlicePool (line 10) | func TestStringSlicePool(t *testing.T) { FILE: p2p/metricshelper/registerer.go function RegisterCollectors (line 11) | func RegisterCollectors(reg prometheus.Registerer, collectors ...prometh... FILE: p2p/metricshelper/registerer_test.go function TestRegisterCollectors (line 11) | func TestRegisterCollectors(t *testing.T) { FILE: p2p/muxer/testsuite/mux.go function init (line 30) | func init() { function getFunctionName (line 43) | func getFunctionName(i any) string { type peerScope (line 47) | type peerScope struct method ReserveMemory (line 52) | func (p *peerScope) ReserveMemory(size int, _ uint8) error { method ReleaseMemory (line 59) | func (p *peerScope) ReleaseMemory(size int) { method Check (line 69) | func (p *peerScope) Check(t *testing.T) { method Stat (line 85) | func (p *peerScope) Stat() network.ScopeStat { r... method BeginSpan (line 86) | func (p *peerScope) BeginSpan() (network.ResourceScopeSpan, error) { r... method Peer (line 87) | func (p *peerScope) Peer() peer.ID { p... type peerScopeSpan (line 75) | type peerScopeSpan struct method Done (line 79) | func (p *peerScopeSpan) Done() { type Options (line 91) | type Options struct function randBuf (line 100) | func randBuf(size int) []byte { function checkErr (line 110) | func checkErr(t *testing.T, err error) { function echoStream (line 117) | func echoStream(s network.MuxedStream) { function GoServe (line 122) | func GoServe(t *testing.T, tr network.Multiplexer, l net.Listener) (done... function SubtestSimpleWrite (line 156) | func SubtestSimpleWrite(t *testing.T, tr network.Multiplexer) { function SubtestStress (line 193) | func SubtestStress(t *testing.T, opt Options) { function tcpPipe (line 319) | func tcpPipe(t *testing.T) (net.Conn, net.Conn) { function SubtestStreamOpenStress (line 338) | func SubtestStreamOpenStress(t *testing.T, tr network.Multiplexer) { function SubtestStreamReset (line 436) | func SubtestStreamReset(t *testing.T, tr network.Multiplexer) { function SubtestWriteAfterClose (line 490) | func SubtestWriteAfterClose(t *testing.T, tr network.Multiplexer) { function SubtestStreamLeftOpen (line 515) | func SubtestStreamLeftOpen(t *testing.T, tr network.Multiplexer) { function SubtestStress1Conn1Stream1Msg (line 569) | func SubtestStress1Conn1Stream1Msg(t *testing.T, tr network.Multiplexer) { function SubtestStress1Conn1Stream100Msg (line 580) | func SubtestStress1Conn1Stream100Msg(t *testing.T, tr network.Multiplexe... function SubtestStress1Conn100Stream100Msg (line 591) | func SubtestStress1Conn100Stream100Msg(t *testing.T, tr network.Multiple... function SubtestStress10Conn10Stream50Msg (line 602) | func SubtestStress10Conn10Stream50Msg(t *testing.T, tr network.Multiplex... function SubtestStress1Conn1000Stream10Msg (line 613) | func SubtestStress1Conn1000Stream10Msg(t *testing.T, tr network.Multiple... function SubtestStress1Conn100Stream100Msg10MB (line 624) | func SubtestStress1Conn100Stream100Msg10MB(t *testing.T, tr network.Mult... function SubtestAll (line 652) | func SubtestAll(t *testing.T, tr network.Multiplexer) { type TransportTest (line 661) | type TransportTest FILE: p2p/muxer/yamux/conn.go type conn (line 12) | type conn method As (line 16) | func (c *conn) As(target any) bool { method Close (line 30) | func (c *conn) Close() error { method CloseWithError (line 34) | func (c *conn) CloseWithError(errCode network.ConnErrorCode) error { method IsClosed (line 39) | func (c *conn) IsClosed() bool { method OpenStream (line 44) | func (c *conn) OpenStream(ctx context.Context) (network.MuxedStream, e... method AcceptStream (line 54) | func (c *conn) AcceptStream() (network.MuxedStream, error) { method yamux (line 59) | func (c *conn) yamux() *yamux.Session { function NewMuxedConn (line 25) | func NewMuxedConn(m *yamux.Session) network.MuxedConn { FILE: p2p/muxer/yamux/stream.go type stream (line 14) | type stream method Read (line 36) | func (s *stream) Read(b []byte) (n int, err error) { method Write (line 41) | func (s *stream) Write(b []byte) (n int, err error) { method Close (line 46) | func (s *stream) Close() error { method Reset (line 50) | func (s *stream) Reset() error { method ResetWithError (line 54) | func (s *stream) ResetWithError(errCode network.StreamErrorCode) error { method CloseRead (line 58) | func (s *stream) CloseRead() error { method CloseWrite (line 62) | func (s *stream) CloseWrite() error { method SetDeadline (line 66) | func (s *stream) SetDeadline(t time.Time) error { method SetReadDeadline (line 70) | func (s *stream) SetReadDeadline(t time.Time) error { method SetWriteDeadline (line 74) | func (s *stream) SetWriteDeadline(t time.Time) error { method yamux (line 78) | func (s *stream) yamux() *yamux.Stream { function parseError (line 18) | func parseError(err error) error { FILE: p2p/muxer/yamux/transport.go constant ID (line 15) | ID = "/yamux/1.0.0" function init (line 17) | func init() { type Transport (line 38) | type Transport method NewConn (line 42) | func (t *Transport) NewConn(nc net.Conn, isServer bool, scope network.... method Config (line 61) | func (t *Transport) Config() *yamux.Config { FILE: p2p/muxer/yamux/transport_test.go function TestDefaultTransport (line 9) | func TestDefaultTransport(t *testing.T) { FILE: p2p/net/conngater/conngater.go type BasicConnectionGater (line 24) | type BasicConnectionGater struct method loadRules (line 64) | func (cg *BasicConnectionGater) loadRules(ctx context.Context) error { method BlockPeer (line 126) | func (cg *BasicConnectionGater) BlockPeer(p peer.ID) error { method UnblockPeer (line 143) | func (cg *BasicConnectionGater) UnblockPeer(p peer.ID) error { method ListBlockedPeers (line 161) | func (cg *BasicConnectionGater) ListBlockedPeers() []peer.ID { method BlockAddr (line 175) | func (cg *BasicConnectionGater) BlockAddr(ip net.IP) error { method UnblockAddr (line 193) | func (cg *BasicConnectionGater) UnblockAddr(ip net.IP) error { method ListBlockedAddrs (line 211) | func (cg *BasicConnectionGater) ListBlockedAddrs() []net.IP { method BlockSubnet (line 226) | func (cg *BasicConnectionGater) BlockSubnet(ipnet *net.IPNet) error { method UnblockSubnet (line 244) | func (cg *BasicConnectionGater) UnblockSubnet(ipnet *net.IPNet) error { method ListBlockedSubnets (line 262) | func (cg *BasicConnectionGater) ListBlockedSubnets() []*net.IPNet { method InterceptPeerDial (line 277) | func (cg *BasicConnectionGater) InterceptPeerDial(p peer.ID) (allow bo... method InterceptAddrDial (line 285) | func (cg *BasicConnectionGater) InterceptAddrDial(_ peer.ID, a ma.Mult... method InterceptAccept (line 310) | func (cg *BasicConnectionGater) InterceptAccept(cma network.ConnMultia... method InterceptSecured (line 336) | func (cg *BasicConnectionGater) InterceptSecured(dir network.Direction... method InterceptUpgraded (line 350) | func (cg *BasicConnectionGater) InterceptUpgraded(network.Conn) (allow... constant ns (line 37) | ns = "/libp2p/net/conngater" constant keyPeer (line 38) | keyPeer = "/peer/" constant keyAddr (line 39) | keyAddr = "/addr/" constant keySubnet (line 40) | keySubnet = "/subnet/" function NewBasicConnectionGater (line 46) | func NewBasicConnectionGater(ds datastore.Datastore) (*BasicConnectionGa... FILE: p2p/net/conngater/conngater_test.go function TestConnectionGater (line 14) | func TestConnectionGater(t *testing.T) { type mockConnMultiaddrs (line 364) | type mockConnMultiaddrs struct method LocalMultiaddr (line 368) | func (cma *mockConnMultiaddrs) LocalMultiaddr() ma.Multiaddr { method RemoteMultiaddr (line 372) | func (cma *mockConnMultiaddrs) RemoteMultiaddr() ma.Multiaddr { FILE: p2p/net/connmgr/bench_test.go function randomConns (line 13) | func randomConns(tb testing.TB) (c [5000]network.Conn) { function BenchmarkLockContention (line 20) | func BenchmarkLockContention(b *testing.B) { FILE: p2p/net/connmgr/connmgr.go type BasicConnMgr (line 30) | type BasicConnMgr struct method ForceTrim (line 157) | func (cm *BasicConnMgr) ForceTrim() { method Close (line 184) | func (cm *BasicConnMgr) Close() error { method Protect (line 196) | func (cm *BasicConnMgr) Protect(id peer.ID, tag string) { method Unprotect (line 208) | func (cm *BasicConnMgr) Unprotect(id peer.ID, tag string) (protected b... method IsProtected (line 223) | func (cm *BasicConnMgr) IsProtected(id peer.ID, tag string) (protected... method CheckLimit (line 240) | func (cm *BasicConnMgr) CheckLimit(systemLimit connmgr.GetConnLimiter)... method TrimOpenConns (line 337) | func (cm *BasicConnMgr) TrimOpenConns(_ context.Context) { method background (line 344) | func (cm *BasicConnMgr) background() { method doTrim (line 369) | func (cm *BasicConnMgr) doTrim() { method trim (line 384) | func (cm *BasicConnMgr) trim() { method getConnsToCloseEmergency (line 392) | func (cm *BasicConnMgr) getConnsToCloseEmergency(target int) []network... method getConnsToClose (line 462) | func (cm *BasicConnMgr) getConnsToClose() []network.Conn { method GetTagInfo (line 541) | func (cm *BasicConnMgr) GetTagInfo(p peer.ID) *connmgr.TagInfo { method TagPeer (line 570) | func (cm *BasicConnMgr) TagPeer(p peer.ID, tag string, val int) { method UntagPeer (line 583) | func (cm *BasicConnMgr) UntagPeer(p peer.ID, tag string) { method UpsertTag (line 600) | func (cm *BasicConnMgr) UpsertTag(p peer.ID, tag string, upsert func(i... method GetInfo (line 632) | func (cm *BasicConnMgr) GetInfo() CMInfo { method Notifee (line 649) | func (cm *BasicConnMgr) Notifee() network.Notifiee { type segment (line 62) | type segment struct method tagInfoFor (line 89) | func (s *segment) tagInfoFor(p peer.ID, now time.Time) *peerInfo { type segments (line 67) | type segments struct method get (line 76) | func (ss *segments) get(p peer.ID) *segment { method countPeers (line 80) | func (ss *segments) countPeers() (count int) { function NewConnManager (line 111) | func NewConnManager(low, hi int, opts ...Option) (*BasicConnMgr, error) { type peerInfo (line 252) | type peerInfo struct type peerInfos (line 265) | type peerInfos method SortByValueAndStreams (line 271) | func (p peerInfos) SortByValueAndStreams(segments *segments, sortByMor... type CMInfo (line 614) | type CMInfo struct type cmNotifee (line 653) | type cmNotifee method cm (line 655) | func (nn *cmNotifee) cm() *BasicConnMgr { method Connected (line 662) | func (nn *cmNotifee) Connected(_ network.Network, c network.Conn) { method Disconnected (line 701) | func (nn *cmNotifee) Disconnected(_ network.Network, c network.Conn) { method Listen (line 729) | func (nn *cmNotifee) Listen(_ network.Network, _ ma.Multiaddr) {} method ListenClose (line 732) | func (nn *cmNotifee) ListenClose(_ network.Network, _ ma.Multiaddr) {} FILE: p2p/net/connmgr/connmgr_test.go type tconn (line 23) | type tconn struct method Close (line 31) | func (c *tconn) Close() error { method CloseWithError (line 39) | func (c *tconn) CloseWithError(_ network.ConnErrorCode) error { method isClosed (line 47) | func (c *tconn) isClosed() bool { method RemotePeer (line 51) | func (c *tconn) RemotePeer() peer.ID { method Stat (line 55) | func (c *tconn) Stat() network.ConnStats { method RemoteMultiaddr (line 64) | func (c *tconn) RemoteMultiaddr() ma.Multiaddr { function randConn (line 72) | func randConn(t testing.TB, discNotify func(network.Network, network.Con... function TestTrimBlocks (line 78) | func TestTrimBlocks(t *testing.T) { function TestTrimClosed (line 107) | func TestTrimClosed(t *testing.T) { function TestTrimJoin (line 115) | func TestTrimJoin(t *testing.T) { function TestConnTrimming (line 141) | func TestConnTrimming(t *testing.T) { function TestConnsToClose (line 180) | func TestConnsToClose(t *testing.T) { function TestGetTagInfo (line 222) | func TestGetTagInfo(t *testing.T) { function TestTagPeerNonExistant (line 296) | func TestTagPeerNonExistant(t *testing.T) { function TestUntagPeer (line 309) | func TestUntagPeer(t *testing.T) { function TestGetInfo (line 341) | func TestGetInfo(t *testing.T) { function TestDoubleConnection (line 371) | func TestDoubleConnection(t *testing.T) { function TestDisconnected (line 389) | func TestDisconnected(t *testing.T) { function TestGracePeriod (line 424) | func TestGracePeriod(t *testing.T) { function TestQuickBurstRespectsSilencePeriod (line 480) | func TestQuickBurstRespectsSilencePeriod(t *testing.T) { function TestPeerProtectionSingleTag (line 514) | func TestPeerProtectionSingleTag(t *testing.T) { function TestPeerProtectionMultipleTags (line 597) | func TestPeerProtectionMultipleTags(t *testing.T) { function TestPeerProtectionIdempotent (line 678) | func TestPeerProtectionIdempotent(t *testing.T) { function TestUpsertTag (line 710) | func TestUpsertTag(t *testing.T) { function TestTemporaryEntriesClearedFirst (line 747) | func TestTemporaryEntriesClearedFirst(t *testing.T) { function TestTemporaryEntryConvertedOnConnection (line 769) | func TestTemporaryEntryConvertedOnConnection(t *testing.T) { function TestConcurrentCleanupAndTagging (line 792) | func TestConcurrentCleanupAndTagging(t *testing.T) { type mockConn (line 803) | type mockConn struct method Close (line 807) | func (m mockConn) Close() error ... method CloseWithError (line 808) | func (m mockConn) CloseWithError(_ network.ConnErrorCode) error ... method LocalPeer (line 809) | func (m mockConn) LocalPeer() peer.ID ... method RemotePeer (line 810) | func (m mockConn) RemotePeer() peer.ID ... method RemotePublicKey (line 811) | func (m mockConn) RemotePublicKey() crypto.PubKey ... method LocalMultiaddr (line 812) | func (m mockConn) LocalMultiaddr() ma.Multiaddr ... method RemoteMultiaddr (line 813) | func (m mockConn) RemoteMultiaddr() ma.Multiaddr ... method Stat (line 814) | func (m mockConn) Stat() network.ConnStats ... method ID (line 815) | func (m mockConn) ID() string ... method IsClosed (line 816) | func (m mockConn) IsClosed() bool ... method NewStream (line 817) | func (m mockConn) NewStream(_ context.Context) (network.Stream, error)... method GetStreams (line 818) | func (m mockConn) GetStreams() []network.Stream ... method Scope (line 819) | func (m mockConn) Scope() network.ConnScope ... method ConnState (line 820) | func (m mockConn) ConnState() network.ConnectionState ... method As (line 821) | func (m mockConn) As(_ any) bool ... function makeSegmentsWithPeerInfos (line 823) | func makeSegmentsWithPeerInfos(peerInfos peerInfos) *segments { function TestPeerInfoSorting (line 844) | func TestPeerInfoSorting(t *testing.T) { function TestSafeConcurrency (line 940) | func TestSafeConcurrency(t *testing.T) { function TestCheckLimit (line 982) | func TestCheckLimit(t *testing.T) { type testLimitGetter (line 995) | type testLimitGetter struct method GetConnLimit (line 999) | func (g testLimitGetter) GetConnLimit() int { function TestErrorCode (line 1003) | func TestErrorCode(t *testing.T) { FILE: p2p/net/connmgr/decay.go type bumpCmd (line 19) | type bumpCmd struct type removeCmd (line 26) | type removeCmd struct type decayer (line 32) | type decayer struct method RegisterDecayingTag (line 101) | func (d *decayer) RegisterDecayingTag(name string, interval time.Durat... method Close (line 137) | func (d *decayer) Close() error { method process (line 154) | func (d *decayer) process() { type DecayerCfg (line 57) | type DecayerCfg struct method WithDefaults (line 68) | func (cfg *DecayerCfg) WithDefaults() *DecayerCfg { function NewDecayer (line 74) | func NewDecayer(cfg *DecayerCfg, mgr *BasicConnMgr) (*decayer, error) { type decayingTag (line 288) | type decayingTag struct method Name (line 303) | func (t *decayingTag) Name() string { method Interval (line 307) | func (t *decayingTag) Interval() time.Duration { method Bump (line 312) | func (t *decayingTag) Bump(p peer.ID, delta int) error { method Remove (line 329) | func (t *decayingTag) Remove(p peer.ID) error { method Close (line 346) | func (t *decayingTag) Close() error { FILE: p2p/net/connmgr/decay_test.go constant TestResolution (line 16) | TestResolution = 50 * time.Millisecond function waitForTag (line 18) | func waitForTag(t *testing.T, mgr *BasicConnMgr, id peer.ID) { function TestDecayExpire (line 23) | func TestDecayExpire(t *testing.T) { function TestMultipleBumps (line 42) | func TestMultipleBumps(t *testing.T) { function TestMultipleTagsNoDecay (line 58) | func TestMultipleTagsNoDecay(t *testing.T) { function TestCustomFunctions (line 89) | func TestCustomFunctions(t *testing.T) { function TestMultiplePeers (line 122) | func TestMultiplePeers(t *testing.T) { function eventuallyEqual (line 169) | func eventuallyEqual(t *testing.T, f func() int, val int) { function TestLinearDecayOverwrite (line 181) | func TestLinearDecayOverwrite(t *testing.T) { function TestResolutionMisaligned (line 202) | func TestResolutionMisaligned(t *testing.T) { function TestTagRemoval (line 238) | func TestTagRemoval(t *testing.T) { function TestTagClosure (line 281) | func TestTagClosure(t *testing.T) { function testDecayTracker (line 319) | func testDecayTracker(tb testing.TB) (*BasicConnMgr, connmgr.Decayer, *c... FILE: p2p/net/connmgr/options.go type config (line 11) | type config struct type Option (line 21) | type Option function DecayerConfig (line 24) | func DecayerConfig(opts *DecayerCfg) Option { function WithClock (line 32) | func WithClock(c clock.Clock) Option { function WithGracePeriod (line 42) | func WithGracePeriod(p time.Duration) Option { function WithSilencePeriod (line 55) | func WithSilencePeriod(p time.Duration) Option { FILE: p2p/net/gostream/addr.go type addr (line 6) | type addr struct method Network (line 10) | func (a *addr) Network() string { return Network } method String (line 14) | func (a *addr) String() string { return a.id.String() } FILE: p2p/net/gostream/conn.go type conn (line 16) | type conn struct method Read (line 21) | func (c *conn) Read(b []byte) (int, error) { method LocalAddr (line 35) | func (c *conn) LocalAddr() net.Addr { method RemoteAddr (line 40) | func (c *conn) RemoteAddr() net.Addr { function newConn (line 30) | func newConn(s network.Stream, ignoreEOF bool) net.Conn { function Dial (line 47) | func Dial(ctx context.Context, h host.Host, pid peer.ID, tag protocol.ID... FILE: p2p/net/gostream/gostream_test.go function newHost (line 18) | func newHost(t *testing.T, listen multiaddr.Multiaddr) host.Host { function TestServerClient (line 28) | func TestServerClient(t *testing.T) { FILE: p2p/net/gostream/listener.go type listener (line 15) | type listener struct method Accept (line 30) | func (l *listener) Accept() (net.Conn, error) { method Close (line 41) | func (l *listener) Close() error { method Addr (line 48) | func (l *listener) Addr() net.Addr { function Listen (line 55) | func Listen(h host.Host, tag protocol.ID, opts ...ListenerOption) (net.L... type ListenerOption (line 82) | type ListenerOption function IgnoreEOF (line 84) | func IgnoreEOF() ListenerOption { FILE: p2p/net/mock/complement.go function StreamComplement (line 9) | func StreamComplement(s network.Stream) network.Stream { function ConnComplement (line 15) | func ConnComplement(c network.Conn) network.Conn { FILE: p2p/net/mock/interface.go type PeerOptions (line 23) | type PeerOptions struct type Mocknet (line 31) | type Mocknet interface type LinkOptions (line 82) | type LinkOptions struct type Link (line 93) | type Link interface type LinkMap (line 105) | type LinkMap type Printer (line 108) | type Printer interface function PrinterTo (line 115) | func PrinterTo(w io.Writer) Printer { FILE: p2p/net/mock/mock.go function WithNPeers (line 10) | func WithNPeers(n int) (Mocknet, error) { function FullMeshLinked (line 23) | func FullMeshLinked(n int) (Mocknet, error) { function FullMeshConnected (line 38) | func FullMeshConnected(n int) (Mocknet, error) { FILE: p2p/net/mock/mock_conn.go type conn (line 22) | type conn struct method IsClosed (line 72) | func (c *conn) IsClosed() bool { method ID (line 76) | func (c *conn) ID() string { method Close (line 80) | func (c *conn) Close() error { method As (line 89) | func (c *conn) As(_ any) bool { method teardown (line 93) | func (c *conn) teardown() { method addStream (line 101) | func (c *conn) addStream(s *stream) { method removeStream (line 108) | func (c *conn) removeStream(s *stream) { method allStreams (line 119) | func (c *conn) allStreams() []network.Stream { method remoteOpenedStream (line 131) | func (c *conn) remoteOpenedStream(s *stream) { method openStream (line 136) | func (c *conn) openStream() *stream { method NewStream (line 143) | func (c *conn) NewStream(context.Context) (network.Stream, error) { method GetStreams (line 150) | func (c *conn) GetStreams() []network.Stream { method LocalMultiaddr (line 155) | func (c *conn) LocalMultiaddr() ma.Multiaddr { method LocalPeer (line 160) | func (c *conn) LocalPeer() peer.ID { method RemoteMultiaddr (line 165) | func (c *conn) RemoteMultiaddr() ma.Multiaddr { method RemotePeer (line 170) | func (c *conn) RemotePeer() peer.ID { method RemotePublicKey (line 175) | func (c *conn) RemotePublicKey() ic.PubKey { method ConnState (line 180) | func (c *conn) ConnState() network.ConnectionState { method Stat (line 185) | func (c *conn) Stat() network.ConnStats { method Scope (line 189) | func (c *conn) Scope() network.ConnScope { method CloseWithError (line 193) | func (c *conn) CloseWithError(_ network.ConnErrorCode) error { function newConn (line 49) | func newConn(ln, rn *peernet, l *link, dir network.Direction) *conn { FILE: p2p/net/mock/mock_link.go type link (line 13) | type link struct method newConnPair (line 30) | func (l *link) newConnPair(dialer *peernet) (*conn, *conn) { method Networks (line 45) | func (l *link) Networks() []network.Network { method Peers (line 56) | func (l *link) Peers() []peer.ID { method SetOptions (line 67) | func (l *link) SetOptions(o LinkOptions) { method Options (line 74) | func (l *link) Options() LinkOptions { method GetLatency (line 80) | func (l *link) GetLatency() time.Duration { method RateLimit (line 86) | func (l *link) RateLimit(dataSize int) time.Duration { function newLink (line 23) | func newLink(mn *mocknet, opts LinkOptions) *link { FILE: p2p/net/mock/mock_net.go type mocknet (line 28) | type mocknet struct method Close (line 55) | func (mn *mocknet) Close() error { method GenPeer (line 66) | func (mn *mocknet) GenPeer() (host.Host, error) { method GenPeerWithOptions (line 70) | func (mn *mocknet) GenPeerWithOptions(opts PeerOptions) (host.Host, er... method AddPeer (line 114) | func (mn *mocknet) AddPeer(k ic.PrivKey, a ma.Multiaddr) (host.Host, e... method AddPeerWithPeerstore (line 127) | func (mn *mocknet) AddPeerWithPeerstore(p peer.ID, ps peerstore.Peerst... method AddPeerWithOptions (line 131) | func (mn *mocknet) AddPeerWithOptions(p peer.ID, opts PeerOptions) (ho... method addDefaults (line 160) | func (mn *mocknet) addDefaults(opts *PeerOptions) error { method updatePeerstore (line 171) | func (mn *mocknet) updatePeerstore(k ic.PrivKey, a ma.Multiaddr, ps pe... method Peers (line 189) | func (mn *mocknet) Peers() []peer.ID { method Host (line 201) | func (mn *mocknet) Host(pid peer.ID) host.Host { method Net (line 208) | func (mn *mocknet) Net(pid peer.ID) network.Network { method Hosts (line 215) | func (mn *mocknet) Hosts() []host.Host { method Nets (line 228) | func (mn *mocknet) Nets() []network.Network { method Links (line 242) | func (mn *mocknet) Links() LinkMap { method LinkAll (line 261) | func (mn *mocknet) LinkAll() error { method LinkPeers (line 273) | func (mn *mocknet) LinkPeers(p1, p2 peer.ID) (Link, error) { method validate (line 290) | func (mn *mocknet) validate(n network.Network) (*peernet, error) { method LinkNets (line 305) | func (mn *mocknet) LinkNets(n1, n2 network.Network) (Link, error) { method Unlink (line 325) | func (mn *mocknet) Unlink(l2 Link) error { method UnlinkPeers (line 336) | func (mn *mocknet) UnlinkPeers(p1, p2 peer.ID) error { method UnlinkNets (line 350) | func (mn *mocknet) UnlinkNets(n1, n2 network.Network) error { method linksMapGet (line 355) | func (mn *mocknet) linksMapGet(p1, p2 peer.ID) map[*link]struct{} { method addLink (line 373) | func (mn *mocknet) addLink(l *link) { method removeLink (line 382) | func (mn *mocknet) removeLink(l *link) { method ConnectAllButSelf (line 391) | func (mn *mocknet) ConnectAllButSelf() error { method ConnectPeers (line 407) | func (mn *mocknet) ConnectPeers(a, b peer.ID) (network.Conn, error) { method ConnectNets (line 411) | func (mn *mocknet) ConnectNets(a, b network.Network) (network.Conn, er... method DisconnectPeers (line 415) | func (mn *mocknet) DisconnectPeers(p1, p2 peer.ID) error { method DisconnectNets (line 419) | func (mn *mocknet) DisconnectNets(n1, n2 network.Network) error { method LinksBetweenPeers (line 423) | func (mn *mocknet) LinksBetweenPeers(p1, p2 peer.ID) []Link { method LinksBetweenNets (line 435) | func (mn *mocknet) LinksBetweenNets(n1, n2 network.Network) []Link { method SetLinkDefaults (line 439) | func (mn *mocknet) SetLinkDefaults(o LinkOptions) { method LinkDefaults (line 445) | func (mn *mocknet) LinkDefaults() LinkOptions { function New (line 45) | func New() Mocknet { type netSlice (line 452) | type netSlice method Len (line 454) | func (es netSlice) Len() int { return len(es) } method Swap (line 455) | func (es netSlice) Swap(i, j int) { es[i], es[j] = es[j], es[i] } method Less (line 456) | func (es netSlice) Less(i, j int) bool { return string(es[i].LocalPeer... type hostSlice (line 459) | type hostSlice method Len (line 461) | func (es hostSlice) Len() int { return len(es) } method Swap (line 462) | func (es hostSlice) Swap(i, j int) { es[i], es[j] = es[j], es[i] } method Less (line 463) | func (es hostSlice) Less(i, j int) bool { return string(es[i].ID()) < ... FILE: p2p/net/mock/mock_notif_test.go function TestNotifications (line 18) | func TestNotifications(t *testing.T) { type netNotifiee (line 165) | type netNotifiee struct method Listen (line 191) | func (nn *netNotifiee) Listen(_ network.Network, a ma.Multiaddr) { method ListenClose (line 194) | func (nn *netNotifiee) ListenClose(_ network.Network, a ma.Multiaddr) { method Connected (line 197) | func (nn *netNotifiee) Connected(_ network.Network, v network.Conn) { method Disconnected (line 200) | func (nn *netNotifiee) Disconnected(_ network.Network, v network.Conn) { function newNetNotifiee (line 179) | func newNetNotifiee(t *testing.T, buffer int) *netNotifiee { FILE: p2p/net/mock/mock_peernet.go type peernet (line 19) | type peernet struct method Close (line 67) | func (pn *peernet) Close() error { method allConns (line 77) | func (pn *peernet) allConns() []*conn { method Peerstore (line 89) | func (pn *peernet) Peerstore() peerstore.Peerstore { method String (line 93) | func (pn *peernet) String() string { method handleNewStream (line 98) | func (pn *peernet) handleNewStream(s network.Stream) { method DialPeer (line 109) | func (pn *peernet) DialPeer(_ context.Context, p peer.ID) (network.Con... method connect (line 113) | func (pn *peernet) connect(p peer.ID) (*conn, error) { method openConn (line 154) | func (pn *peernet) openConn(_ peer.ID, l *link) (*conn, error) { method remoteOpenedConn (line 232) | func (pn *peernet) remoteOpenedConn(c *conn) { method addConn (line 239) | func (pn *peernet) addConn(c *conn) { method removeConn (line 253) | func (pn *peernet) removeConn(c *conn) { method LocalPeer (line 285) | func (pn *peernet) LocalPeer() peer.ID { method Peers (line 290) | func (pn *peernet) Peers() []peer.ID { method Conns (line 305) | func (pn *peernet) Conns() []network.Conn { method ConnsToPeer (line 318) | func (pn *peernet) ConnsToPeer(p peer.ID) []network.Conn { method ClosePeer (line 335) | func (pn *peernet) ClosePeer(p peer.ID) error { method BandwidthTotals (line 355) | func (pn *peernet) BandwidthTotals() (in uint64, out uint64) { method Listen (line 362) | func (pn *peernet) Listen(addrs ...ma.Multiaddr) error { method ListenAddresses (line 373) | func (pn *peernet) ListenAddresses() []ma.Multiaddr { method InterfaceListenAddresses (line 380) | func (pn *peernet) InterfaceListenAddresses() ([]ma.Multiaddr, error) { method Connectedness (line 386) | func (pn *peernet) Connectedness(p peer.ID) network.Connectedness { method NewStream (line 399) | func (pn *peernet) NewStream(ctx context.Context, p peer.ID) (network.... method SetStreamHandler (line 409) | func (pn *peernet) SetStreamHandler(h network.StreamHandler) { method Notify (line 416) | func (pn *peernet) Notify(f network.Notifiee) { method StopNotify (line 423) | func (pn *peernet) StopNotify(f network.Notifiee) { method notifyAll (line 430) | func (pn *peernet) notifyAll(notification func(f network.Notifiee)) { method ResourceManager (line 439) | func (pn *peernet) ResourceManager() network.ResourceManager { method CanDial (line 443) | func (pn *peernet) CanDial(_ peer.ID, _ ma.Multiaddr) bool { function newPeernet (line 45) | func newPeernet(m *mocknet, p peer.ID, opts PeerOptions, bus event.Bus) ... function checkSecureAndUpgrade (line 184) | func checkSecureAndUpgrade(dir network.Direction, gater connmgr.Connecti... function addConnPair (line 200) | func addConnPair(pn1, pn2 *peernet, c1, c2 *conn) { FILE: p2p/net/mock/mock_printer.go type printer (line 12) | type printer struct method MocknetLinks (line 16) | func (p *printer) MocknetLinks(mn Mocknet) { method NetworkConns (line 29) | func (p *printer) NetworkConns(ni network.Network) { FILE: p2p/net/mock/mock_stream.go type stream (line 18) | type stream struct method Write (line 72) | func (s *stream) Write(p []byte) (n int, err error) { method ID (line 89) | func (s *stream) ID() string { method Protocol (line 93) | func (s *stream) Protocol() protocol.ID { method Stat (line 101) | func (s *stream) Stat() network.Stats { method SetProtocol (line 105) | func (s *stream) SetProtocol(proto protocol.ID) error { method CloseWrite (line 110) | func (s *stream) CloseWrite() error { method CloseRead (line 122) | func (s *stream) CloseRead() error { method Close (line 126) | func (s *stream) Close() error { method Reset (line 131) | func (s *stream) Reset() error { method ResetWithError (line 148) | func (s *stream) ResetWithError(_ network.StreamErrorCode) error { method teardown (line 164) | func (s *stream) teardown() { method Conn (line 172) | func (s *stream) Conn() network.Conn { method SetDeadline (line 179) | func (s *stream) SetDeadline(_ time.Time) error { return nil } method SetReadDeadline (line 180) | func (s *stream) SetReadDeadline(_ time.Time) error { return nil } method SetWriteDeadline (line 181) | func (s *stream) SetWriteDeadline(_ time.Time) error { return nil } method Read (line 183) | func (s *stream) Read(b []byte) (int, error) { method transport (line 189) | func (s *stream) transport() { method Scope (line 303) | func (s *stream) Scope() network.StreamScope { method cancelWrite (line 307) | func (s *stream) cancelWrite(err error) { type transportObject (line 39) | type transportObject struct function newStreamPair (line 44) | func newStreamPair() (*stream, *stream) { function newStream (line 55) | func newStream(w *io.PipeWriter, r *io.PipeReader, dir network.Direction... FILE: p2p/net/mock/mock_test.go function randLocalTCPAddress (line 40) | func randLocalTCPAddress() ma.Multiaddr { function TestNetworkSetup (line 59) | func TestNetworkSetup(t *testing.T) { function TestStreams (line 307) | func TestStreams(t *testing.T) { function TestAdding (line 353) | func TestAdding(t *testing.T) { function TestRateLimiting (line 435) | func TestRateLimiting(t *testing.T) { function within (line 475) | func within(t1 time.Duration, t2 time.Duration, tolerance time.Duration)... function TestLimitedStreams (line 479) | func TestLimitedStreams(t *testing.T) { function TestFuzzManyPeers (line 539) | func TestFuzzManyPeers(t *testing.T) { function TestStreamsWithLatency (line 553) | func TestStreamsWithLatency(t *testing.T) { function TestEventBus (line 608) | func TestEventBus(t *testing.T) { function TestBlockByPeerID (line 688) | func TestBlockByPeerID(t *testing.T) { function TestBlockByIP (line 707) | func TestBlockByIP(t *testing.T) { function WithConnectionGaters (line 730) | func WithConnectionGaters(t *testing.T) (Mocknet, *conngater.BasicConnec... FILE: p2p/net/mock/ratelimiter.go type RateLimiter (line 10) | type RateLimiter struct method UpdateBandwidth (line 33) | func (r *RateLimiter) UpdateBandwidth(bandwidth float64) { method Limit (line 46) | func (r *RateLimiter) Limit(dataSize int) time.Duration { function NewRateLimiter (line 21) | func NewRateLimiter(bandwidth float64) *RateLimiter { FILE: p2p/net/nat/internal/nat/nat.go type ErrNoNATFound (line 23) | type ErrNoNATFound struct method Unwrap (line 27) | func (e ErrNoNATFound) Unwrap() []error { method Error (line 31) | func (e ErrNoNATFound) Error() string { type NAT (line 40) | type NAT interface function discoverNATs (line 61) | func discoverNATs(ctx context.Context) ([]NAT, []error) { function DiscoverGateway (line 134) | func DiscoverGateway(ctx context.Context) (NAT, error) { function randomPort (line 175) | func randomPort() int { function getDefaultGateway (line 179) | func getDefaultGateway() (net.IP, error) { FILE: p2p/net/nat/internal/nat/natpmp.go function discoverNATPMP (line 15) | func discoverNATPMP(ctx context.Context) (NAT, error) { function discoverNATPMPWithAddr (line 45) | func discoverNATPMPWithAddr(ctx context.Context, ip net.IP) (*natpmp.Cli... type natpmpNAT (line 59) | type natpmpNAT struct method GetDeviceAddress (line 65) | func (n *natpmpNAT) GetDeviceAddress() (addr net.IP, err error) { method GetInternalAddress (line 69) | func (n *natpmpNAT) GetInternalAddress() (addr net.IP, err error) { method GetExternalAddress (line 94) | func (n *natpmpNAT) GetExternalAddress() (addr net.IP, err error) { method AddPortMapping (line 104) | func (n *natpmpNAT) AddPortMapping(_ context.Context, protocol string,... method DeletePortMapping (line 131) | func (n *natpmpNAT) DeletePortMapping(_ context.Context, _ string, int... method Type (line 136) | func (n *natpmpNAT) Type() string { FILE: p2p/net/nat/internal/nat/upnp.go function discoverUPNP_IG1 (line 20) | func discoverUPNP_IG1(ctx context.Context) ([]NAT, []error) { function discoverUPNP_IG2 (line 24) | func discoverUPNP_IG2(ctx context.Context) ([]NAT, []error) { function discoverSearchTarget (line 28) | func discoverSearchTarget(ctx context.Context, target string) (nats []NA... function discoverUPNP_GenIGDev (line 49) | func discoverUPNP_GenIGDev(ctx context.Context) (nats []NAT, errs []erro... function serviceVisitor (line 91) | func serviceVisitor(ctx context.Context, rootDevice *goupnp.RootDevice, ... type upnp_NAT_Client (line 143) | type upnp_NAT_Client interface type upnp_NAT (line 149) | type upnp_NAT struct method GetExternalAddress (line 156) | func (u *upnp_NAT) GetExternalAddress() (addr net.IP, err error) { method AddPortMapping (line 181) | func (u *upnp_NAT) AddPortMapping(ctx context.Context, protocol string... method DeletePortMapping (line 208) | func (u *upnp_NAT) DeletePortMapping(ctx context.Context, protocol str... method GetDeviceAddress (line 217) | func (u *upnp_NAT) GetDeviceAddress() (net.IP, error) { method GetInternalAddress (line 226) | func (u *upnp_NAT) GetInternalAddress() (net.IP, error) { method Type (line 256) | func (n *upnp_NAT) Type() string { return n.typ } function mapProtocol (line 170) | func mapProtocol(s string) string { FILE: p2p/net/nat/mock_nat_test.go type MockNAT (line 22) | type MockNAT struct method EXPECT (line 41) | func (m *MockNAT) EXPECT() *MockNATMockRecorder { method AddPortMapping (line 46) | func (m *MockNAT) AddPortMapping(ctx context.Context, protocol string,... method DeletePortMapping (line 61) | func (m *MockNAT) DeletePortMapping(ctx context.Context, protocol stri... method GetDeviceAddress (line 75) | func (m *MockNAT) GetDeviceAddress() (net.IP, error) { method GetExternalAddress (line 90) | func (m *MockNAT) GetExternalAddress() (net.IP, error) { method GetInternalAddress (line 105) | func (m *MockNAT) GetInternalAddress() (net.IP, error) { method Type (line 120) | func (m *MockNAT) Type() string { type MockNATMockRecorder (line 29) | type MockNATMockRecorder struct method AddPortMapping (line 55) | func (mr *MockNATMockRecorder) AddPortMapping(ctx, protocol, internalP... method DeletePortMapping (line 69) | func (mr *MockNATMockRecorder) DeletePortMapping(ctx, protocol, intern... method GetDeviceAddress (line 84) | func (mr *MockNATMockRecorder) GetDeviceAddress() *gomock.Call { method GetExternalAddress (line 99) | func (mr *MockNATMockRecorder) GetExternalAddress() *gomock.Call { method GetInternalAddress (line 114) | func (mr *MockNATMockRecorder) GetInternalAddress() *gomock.Call { method Type (line 128) | func (mr *MockNATMockRecorder) Type() *gomock.Call { function NewMockNAT (line 34) | func NewMockNAT(ctrl *gomock.Controller) *MockNAT { FILE: p2p/net/nat/nat.go constant MappingDuration (line 25) | MappingDuration = time.Minute constant CacheTime (line 28) | CacheTime = 15 * time.Second constant DiscoveryTimeout (line 37) | DiscoveryTimeout = 10 * time.Second constant rediscoveryThreshold (line 43) | rediscoveryThreshold = 3 type entry (line 45) | type entry struct function DiscoverNAT (line 54) | func DiscoverNAT(ctx context.Context) (*NAT, error) { type NAT (line 100) | type NAT struct method Close (line 122) | func (nat *NAT) Close() error { method GetMapping (line 132) | func (nat *NAT) GetMapping(protocol string, port int) (addr netip.Addr... method AddMapping (line 152) | func (nat *NAT) AddMapping(ctx context.Context, protocol string, port ... method RemoveMapping (line 186) | func (nat *NAT) RemoveMapping(ctx context.Context, protocol string, po... method background (line 206) | func (nat *NAT) background() { method establishMapping (line 280) | func (nat *NAT) establishMapping(ctx context.Context, protocol string,... method rediscoverNAT (line 331) | func (nat *NAT) rediscoverNAT() { function minTime (line 375) | func minTime(a, b time.Time) time.Time { function getExternalAddress (line 383) | func getExternalAddress(natInstance nat.NAT) netip.Addr { FILE: p2p/net/nat/nat_test.go function expectPortMappingFailure (line 23) | func expectPortMappingFailure(mockNAT *MockNAT, protocol string, port in... function expectPortMappingSuccess (line 29) | func expectPortMappingSuccess(mockNAT *MockNAT, protocol string, interna... function setupMockNATWithAddress (line 34) | func setupMockNATWithAddress(ctrl *gomock.Controller, addr net.IP) *Mock... function setupMockNAT (line 41) | func setupMockNAT(t *testing.T) (mockNAT *MockNAT, reset func()) { function TestAddMapping (line 55) | func TestAddMapping(t *testing.T) { function TestRemoveMapping (line 77) | func TestRemoveMapping(t *testing.T) { function TestAddMappingInvalidPort (line 98) | func TestAddMappingInvalidPort(t *testing.T) { function TestAddMappingDeduplication (line 117) | func TestAddMappingDeduplication(t *testing.T) { function TestNATRediscoveryOnConnectionError (line 151) | func TestNATRediscoveryOnConnectionError(t *testing.T) { function TestNATRediscoveryOldRouterReturns (line 235) | func TestNATRediscoveryOldRouterReturns(t *testing.T) { function TestNATRediscoveryFailureThreshold (line 303) | func TestNATRediscoveryFailureThreshold(t *testing.T) { function TestNATRediscoveryConcurrency (line 374) | func TestNATRediscoveryConcurrency(t *testing.T) { FILE: p2p/net/pnet/protector.go function NewProtectedConn (line 11) | func NewProtectedConn(psk ipnet.PSK, conn net.Conn) (net.Conn, error) { FILE: p2p/net/pnet/psk_conn.go type pskConn (line 24) | type pskConn struct method Read (line 32) | func (c *pskConn) Read(out []byte) (int, error) { method Write (line 49) | func (c *pskConn) Write(in []byte) (int, error) { function newPSKConn (line 73) | func newPSKConn(psk *[32]byte, insecure net.Conn) (net.Conn, error) { FILE: p2p/net/pnet/psk_conn_test.go function setupPSKConns (line 11) | func setupPSKConns(_ context.Context, t *testing.T) (net.Conn, net.Conn) { function TestPSKSimpelMessges (line 26) | func TestPSKSimpelMessges(t *testing.T) { function TestPSKFragmentation (line 57) | func TestPSKFragmentation(t *testing.T) { FILE: p2p/net/reuseport/dial.go method Dial (line 17) | func (t *Transport) Dial(raddr ma.Multiaddr) (manet.Conn, error) { method DialContext (line 22) | func (t *Transport) DialContext(ctx context.Context, raddr ma.Multiaddr)... method getDialer (line 48) | func (n *network) getDialer(_ string) *dialer { FILE: p2p/net/reuseport/dialer.go type dialer (line 12) | type dialer struct method Dial (line 21) | func (d *dialer) Dial(network, addr string) (net.Conn, error) { method DialContext (line 41) | func (d *dialer) DialContext(ctx context.Context, network, addr string... function randAddr (line 25) | func randAddr(addrs []*net.TCPAddr) *net.TCPAddr { function newDialer (line 94) | func newDialer(listeners map[*listener]struct{}) *dialer { FILE: p2p/net/reuseport/listen.go type listener (line 11) | type listener struct method Close (line 16) | func (l *listener) Close() error { method Listen (line 31) | func (t *Transport) Listen(laddr ma.Multiaddr) (manet.Listener, error) { FILE: p2p/net/reuseport/reuseport.go function reuseDial (line 13) | func reuseDial(ctx context.Context, laddr *net.TCPAddr, network, raddr s... FILE: p2p/net/reuseport/reuseport_plan9.go constant EADDRINUSE (line 9) | EADDRINUSE = "address in use" constant ECONNREFUSED (line 10) | ECONNREFUSED = "connection refused" function reuseErrShouldRetry (line 16) | func reuseErrShouldRetry(err error) bool { FILE: p2p/net/reuseport/reuseport_posix.go function reuseErrShouldRetry (line 13) | func reuseErrShouldRetry(err error) bool { FILE: p2p/net/reuseport/reuseport_test.go type netTimeoutErr (line 11) | type netTimeoutErr struct method Error (line 15) | func (e netTimeoutErr) Error() string { method Timeout (line 19) | func (e netTimeoutErr) Timeout() bool { method Temporary (line 23) | func (e netTimeoutErr) Temporary() bool { function TestReuseError (line 27) | func TestReuseError(t *testing.T) { FILE: p2p/net/reuseport/transport.go type Transport (line 26) | type Transport struct type network (line 31) | type network struct FILE: p2p/net/reuseport/transport_test.go function init (line 23) | func init() { function setLingerZero (line 45) | func setLingerZero(c manet.Conn) { function acceptOne (line 51) | func acceptOne(t *testing.T, listener manet.Listener) <-chan manet.Conn { function dialOne (line 67) | func dialOne(t *testing.T, tr *Transport, listener manet.Listener, expec... function TestNoneAndSingle (line 93) | func TestNoneAndSingle(t *testing.T) { function TestTwoLocal (line 113) | func TestTwoLocal(t *testing.T) { function TestGlobalPreferenceV4 (line 139) | func TestGlobalPreferenceV4(t *testing.T) { function TestGlobalPreferenceV6 (line 152) | func TestGlobalPreferenceV6(t *testing.T) { function TestLoopbackPreference (line 163) | func TestLoopbackPreference(t *testing.T) { function testPrefer (line 168) | func testPrefer(t *testing.T, listen, prefer, avoid ma.Multiaddr) { function TestV6V4 (line 192) | func TestV6V4(t *testing.T) { function TestGlobalToGlobal (line 200) | func TestGlobalToGlobal(t *testing.T) { function testUseFirst (line 209) | func testUseFirst(t *testing.T, _, _, _ ma.Multiaddr) { function TestDuplicateGlobal (line 243) | func TestDuplicateGlobal(t *testing.T) { FILE: p2p/net/swarm/black_hole_detector.go type BlackHoleState (line 11) | type BlackHoleState method String (line 19) | func (st BlackHoleState) String() string { constant blackHoleStateProbing (line 14) | blackHoleStateProbing BlackHoleState = iota constant blackHoleStateAllowed (line 15) | blackHoleStateAllowed constant blackHoleStateBlocked (line 16) | blackHoleStateBlocked type BlackHoleSuccessCounter (line 39) | type BlackHoleSuccessCounter struct method RecordResult (line 66) | func (b *BlackHoleSuccessCounter) RecordResult(success bool) { method HandleRequest (line 94) | func (b *BlackHoleSuccessCounter) HandleRequest() BlackHoleState { method reset (line 109) | func (b *BlackHoleSuccessCounter) reset() { method updateState (line 116) | func (b *BlackHoleSuccessCounter) updateState() { method State (line 132) | func (b *BlackHoleSuccessCounter) State() BlackHoleState { method info (line 146) | func (b *BlackHoleSuccessCounter) info() blackHoleInfo { type blackHoleInfo (line 139) | type blackHoleInfo struct type blackHoleDetector (line 177) | type blackHoleDetector struct method FilterAddrs (line 184) | func (d *blackHoleDetector) FilterAddrs(addrs []ma.Multiaddr) (valid [... method RecordResult (line 240) | func (d *blackHoleDetector) RecordResult(addr ma.Multiaddr, success bo... method getFilterState (line 254) | func (d *blackHoleDetector) getFilterState(f *BlackHoleSuccessCounter)... method trackMetrics (line 264) | func (d *blackHoleDetector) trackMetrics(f *BlackHoleSuccessCounter) { FILE: p2p/net/swarm/black_hole_detector_test.go function TestBlackHoleSuccessCounterReset (line 11) | func TestBlackHoleSuccessCounterReset(t *testing.T) { function TestBlackHoleSuccessCounterSuccessFraction (line 57) | func TestBlackHoleSuccessCounterSuccessFraction(t *testing.T) { function TestBlackHoleDetectorInApplicableAddress (line 88) | func TestBlackHoleDetectorInApplicableAddress(t *testing.T) { function TestBlackHoleDetectorUDPDisabled (line 107) | func TestBlackHoleDetectorUDPDisabled(t *testing.T) { function TestBlackHoleDetectorIPv6Disabled (line 123) | func TestBlackHoleDetectorIPv6Disabled(t *testing.T) { function TestBlackHoleDetectorProbes (line 140) | func TestBlackHoleDetectorProbes(t *testing.T) { function TestBlackHoleDetectorAddrFiltering (line 165) | func TestBlackHoleDetectorAddrFiltering(t *testing.T) { function TestBlackHoleDetectorReadOnlyMode (line 214) | func TestBlackHoleDetectorReadOnlyMode(t *testing.T) { FILE: p2p/net/swarm/clock.go type InstantTimer (line 6) | type InstantTimer interface type Clock (line 14) | type Clock interface type RealTimer (line 20) | type RealTimer struct method Ch (line 24) | func (t RealTimer) Ch() <-chan time.Time { method Reset (line 28) | func (t RealTimer) Reset(d time.Time) bool { method Stop (line 32) | func (t RealTimer) Stop() bool { type RealClock (line 36) | type RealClock struct method Now (line 40) | func (RealClock) Now() time.Time { method Since (line 43) | func (RealClock) Since(t time.Time) time.Duration { method InstantTimer (line 46) | func (RealClock) InstantTimer(when time.Time) InstantTimer { FILE: p2p/net/swarm/connectedness_event_emitter.go type connectednessEventEmitter (line 16) | type connectednessEventEmitter struct method AddConn (line 51) | func (c *connectednessEventEmitter) AddConn(p peer.ID) { method RemoveConn (line 61) | func (c *connectednessEventEmitter) RemoveConn(p peer.ID) { method Close (line 85) | func (c *connectednessEventEmitter) Close() { method runEmitter (line 90) | func (c *connectednessEventEmitter) runEmitter() { method notifyPeer (line 121) | func (c *connectednessEventEmitter) notifyPeer(p peer.ID, forceNotConn... method sendConnRemovedNotifications (line 135) | func (c *connectednessEventEmitter) sendConnRemovedNotifications() { function newConnectednessEventEmitter (line 35) | func newConnectednessEventEmitter(connectedness func(peer.ID) network.Co... FILE: p2p/net/swarm/dial_error.go constant maxDialDialErrors (line 14) | maxDialDialErrors = 16 type DialError (line 17) | type DialError struct method Timeout (line 24) | func (e *DialError) Timeout() bool { method recordErr (line 28) | func (e *DialError) recordErr(addr ma.Multiaddr, err error) { method Error (line 36) | func (e *DialError) Error() string { method Unwrap (line 51) | func (e *DialError) Unwrap() []error { type TransportError (line 69) | type TransportError struct method Error (line 74) | func (e *TransportError) Error() string { method Unwrap (line 78) | func (e *TransportError) Unwrap() error { FILE: p2p/net/swarm/dial_error_test.go function TestTransportError (line 12) | func TestTransportError(t *testing.T) { function TestDialError (line 18) | func TestDialError(t *testing.T) { FILE: p2p/net/swarm/dial_ranker.go constant PublicTCPDelay (line 16) | PublicTCPDelay = 250 * time.Millisecond constant PrivateTCPDelay (line 17) | PrivateTCPDelay = 30 * time.Millisecond constant PublicQUICDelay (line 20) | PublicQUICDelay = 250 * time.Millisecond constant PrivateQUICDelay (line 21) | PrivateQUICDelay = 30 * time.Millisecond constant RelayDelay (line 24) | RelayDelay = 500 * time.Millisecond constant PublicOtherDelay (line 27) | PublicOtherDelay = 1 * time.Second constant PrivateOtherDelay (line 28) | PrivateOtherDelay = 100 * time.Millisecond function NoDelayDialRanker (line 32) | func NoDelayDialRanker(addrs []ma.Multiaddr) []network.AddrDelay { function DefaultDialRanker (line 81) | func DefaultDialRanker(addrs []ma.Multiaddr) []network.AddrDelay { function getAddrDelay (line 112) | func getAddrDelay(addrs []ma.Multiaddr, tcpDelay time.Duration, quicDela... function score (line 226) | func score(a ma.Multiaddr) int { function isProtocolAddr (line 257) | func isProtocolAddr(a ma.Multiaddr, p int) bool { function isQUICAddr (line 269) | func isQUICAddr(a ma.Multiaddr) bool { function filterAddrs (line 274) | func filterAddrs(addrs []ma.Multiaddr, f func(a ma.Multiaddr) bool) (fil... FILE: p2p/net/swarm/dial_ranker_test.go function sortAddrDelays (line 13) | func sortAddrDelays(addrDelays []network.AddrDelay) { function TestNoDelayDialRanker (line 22) | func TestNoDelayDialRanker(t *testing.T) { function TestDelayRankerQUICDelay (line 74) | func TestDelayRankerQUICDelay(t *testing.T) { function TestDelayRankerTCPDelay (line 155) | func TestDelayRankerTCPDelay(t *testing.T) { function TestDelayRankerRelay (line 251) | func TestDelayRankerRelay(t *testing.T) { function TestDelayRankerOtherTransportDelay (line 293) | func TestDelayRankerOtherTransportDelay(t *testing.T) { FILE: p2p/net/swarm/dial_sync.go type dialWorkerFunc (line 13) | type dialWorkerFunc function newDialSync (line 19) | func newDialSync(worker dialWorkerFunc) *dialSync { type dialSync (line 28) | type dialSync struct method getActiveDial (line 68) | func (ds *dialSync) getActiveDial(p peer.ID) (*activeDial, error) { method Dial (line 92) | func (ds *dialSync) Dial(ctx context.Context, p peer.ID) (*Conn, error) { type activeDial (line 34) | type activeDial struct method dial (line 43) | func (ad *activeDial) dial(ctx context.Context) (*Conn, error) { FILE: p2p/net/swarm/dial_sync_test.go function getMockDialFunc (line 16) | func getMockDialFunc() (dialWorkerFunc, func(), context.Context, <-chan ... function TestBasicDialSync (line 35) | func TestBasicDialSync(t *testing.T) { function TestDialSyncCancel (line 67) | func TestDialSyncCancel(t *testing.T) { function TestDialSyncAllCancel (line 118) | func TestDialSyncAllCancel(t *testing.T) { function TestFailFirst (line 164) | func TestFailFirst(t *testing.T) { function TestStressActiveDial (line 198) | func TestStressActiveDial(_ *testing.T) { FILE: p2p/net/swarm/dial_test.go function closeSwarms (line 25) | func closeSwarms(swarms []*swarm.Swarm) { function TestBasicDialPeer (line 31) | func TestBasicDialPeer(t *testing.T) { function TestBasicDialPeerWithResolver (line 47) | func TestBasicDialPeerWithResolver(t *testing.T) { function TestDialWithNoListeners (line 83) | func TestDialWithNoListeners(t *testing.T) { function acceptAndHang (line 99) | func acceptAndHang(l net.Listener) { function TestSimultDials (line 115) | func TestSimultDials(t *testing.T) { function newSilentPeer (line 170) | func newSilentPeer(t *testing.T) (peer.ID, ma.Multiaddr, net.Listener) { function TestDialWait (line 188) | func TestDialWait(t *testing.T) { function TestDialBackoff (line 222) | func TestDialBackoff(t *testing.T) { function TestDialBackoffClears (line 428) | func TestDialBackoffClears(t *testing.T) { function TestDialPeerFailed (line 468) | func TestDialPeerFailed(t *testing.T) { function TestDialExistingConnection (line 500) | func TestDialExistingConnection(t *testing.T) { function newSilentListener (line 523) | func newSilentListener(t *testing.T) ([]ma.Multiaddr, net.Listener) { function TestDialSimultaneousJoin (line 540) | func TestDialSimultaneousJoin(t *testing.T) { function TestDialSelf (line 637) | func TestDialSelf(t *testing.T) { function TestDialQUICDraft29 (line 646) | func TestDialQUICDraft29(t *testing.T) { FILE: p2p/net/swarm/dial_worker.go type dialRequest (line 19) | type dialRequest struct type dialResponse (line 30) | type dialResponse struct type pendRequest (line 39) | type pendRequest struct type addrDial (line 52) | type addrDial struct type dialWorker (line 73) | type dialWorker struct method loop (line 110) | func (w *dialWorker) loop() { method dispatchError (line 390) | func (w *dialWorker) dispatchError(ad *addrDial, err error) { method rankAddrs (line 424) | func (w *dialWorker) rankAddrs(addrs []ma.Multiaddr, isSimConnect bool... function newDialWorker (line 93) | func newDialWorker(s *Swarm, p peer.ID, reqch <-chan dialRequest, cl Clo... type dialQueue (line 432) | type dialQueue struct method Add (line 445) | func (dq *dialQueue) Add(adelay network.AddrDelay) { method UpdateOrAdd (line 463) | func (dq *dialQueue) UpdateOrAdd(adelay network.AddrDelay) { method NextBatch (line 479) | func (dq *dialQueue) NextBatch() []network.AddrDelay { method top (line 497) | func (dq *dialQueue) top() network.AddrDelay { method Len (line 502) | func (dq *dialQueue) Len() int { function newDialQueue (line 438) | func newDialQueue() *dialQueue { FILE: p2p/net/swarm/dial_worker_test.go type mockClock (line 39) | type mockClock struct method InstantTimer (line 43) | func (m *mockClock) InstantTimer(when time.Time) InstantTimer { function newMockClock (line 47) | func newMockClock() *mockClock { function newPeer (line 51) | func newPeer(t *testing.T) (crypto.PrivKey, peer.ID) { function makeSwarm (line 59) | func makeSwarm(t *testing.T) *Swarm { function makeSwarmWithNoListenAddrs (line 72) | func makeSwarmWithNoListenAddrs(t *testing.T, opts ...Option) *Swarm { function makeUpgrader (line 106) | func makeUpgrader(t *testing.T, n *Swarm) transport.Upgrader { function makeTCPListener (line 118) | func makeTCPListener(t *testing.T, a ma.Multiaddr, recvCh chan struct{})... function TestDialWorkerLoopBasic (line 143) | func TestDialWorkerLoopBasic(t *testing.T) { function TestDialWorkerLoopConcurrent (line 190) | func TestDialWorkerLoopConcurrent(t *testing.T) { function TestDialWorkerLoopFailure (line 232) | func TestDialWorkerLoopFailure(t *testing.T) { function TestDialWorkerLoopConcurrentFailure (line 257) | func TestDialWorkerLoopConcurrentFailure(t *testing.T) { function TestDialWorkerLoopConcurrentMix (line 304) | func TestDialWorkerLoopConcurrentMix(t *testing.T) { function TestDialWorkerLoopConcurrentFailureStress (line 347) | func TestDialWorkerLoopConcurrentFailureStress(t *testing.T) { function TestDialQueueNextBatch (line 398) | func TestDialQueueNextBatch(t *testing.T) { type timedDial (line 502) | type timedDial struct type schedulingTestCase (line 518) | type schedulingTestCase struct method Generate (line 525) | func (s schedulingTestCase) Generate(rand *mrand.Rand, size int) refle... type dialState (line 559) | type dialState struct function checkDialWorkerLoopScheduling (line 576) | func checkDialWorkerLoopScheduling(t *testing.T, s1, s2 *Swarm, tc sched... function makeRanker (line 745) | func makeRanker(tc []timedDial) network.DialRanker { function TestCheckDialWorkerLoopScheduling (line 756) | func TestCheckDialWorkerLoopScheduling(t *testing.T) { function TestDialWorkerLoopRanking (line 802) | func TestDialWorkerLoopRanking(t *testing.T) { function TestDialWorkerLoopSchedulingProperty (line 901) | func TestDialWorkerLoopSchedulingProperty(t *testing.T) { function TestDialWorkerLoopQuicOverTCP (line 923) | func TestDialWorkerLoopQuicOverTCP(t *testing.T) { function TestDialWorkerLoopHolePunching (line 951) | func TestDialWorkerLoopHolePunching(t *testing.T) { function TestDialWorkerLoopAddrDedup (line 1027) | func TestDialWorkerLoopAddrDedup(t *testing.T) { function TestDialWorkerLoopTCPConnUpgradeWait (line 1092) | func TestDialWorkerLoopTCPConnUpgradeWait(t *testing.T) { function BenchmarkDialRanker (line 1150) | func BenchmarkDialRanker(b *testing.B) { FILE: p2p/net/swarm/limiter.go type dialJob (line 16) | type dialJob struct method cancelled (line 24) | func (dj *dialJob) cancelled() bool { type dialLimiter (line 28) | type dialLimiter struct method freeFDToken (line 66) | func (dl *dialLimiter) freeFDToken() { method freePeerToken (line 93) | func (dl *dialLimiter) freePeerToken(dj *dialJob) { method finishedDial (line 128) | func (dl *dialLimiter) finishedDial(dj *dialJob) { method shouldConsumeFd (line 138) | func (dl *dialLimiter) shouldConsumeFd(addr ma.Multiaddr) bool { method addCheckFdLimit (line 149) | func (dl *dialLimiter) addCheckFdLimit(dj *dialJob) { method addCheckPeerLimit (line 178) | func (dl *dialLimiter) addCheckPeerLimit(dj *dialJob) { method AddDialJob (line 198) | func (dl *dialLimiter) AddDialJob(dj *dialJob) { method clearAllPeerDials (line 206) | func (dl *dialLimiter) clearAllPeerDials(p peer.ID) { method executeDial (line 219) | func (dl *dialLimiter) executeDial(j *dialJob) { type dialfunc (line 42) | type dialfunc function newDialLimiter (line 44) | func newDialLimiter(df dialfunc) *dialLimiter { function newDialLimiterWithParams (line 54) | func newDialLimiterWithParams(df dialfunc, fdLimit, perPeerLimit int) *d... FILE: p2p/net/swarm/limiter_test.go function addrWithPort (line 21) | func addrWithPort(p int) ma.Multiaddr { function tcpPortOver (line 28) | func tcpPortOver(a ma.Multiaddr, n int) bool { function tryDialAddrs (line 42) | func tryDialAddrs(ctx context.Context, l *dialLimiter, p peer.ID, addrs ... function hangDialFunc (line 53) | func hangDialFunc(hang chan struct{}) dialfunc { function TestLimiterBasicDials (line 73) | func TestLimiterBasicDials(t *testing.T) { function TestFDLimiting (line 122) | func TestFDLimiting(t *testing.T) { function TestTokenRedistribution (line 187) | func TestTokenRedistribution(t *testing.T) { function TestStressLimiter (line 282) | func TestStressLimiter(t *testing.T) { function TestFDLimitUnderflow (line 336) | func TestFDLimitUnderflow(t *testing.T) { FILE: p2p/net/swarm/peers_test.go function TestPeers (line 16) | func TestPeers(t *testing.T) { FILE: p2p/net/swarm/resolve_test.go function TestSwarmResolver (line 14) | func TestSwarmResolver(t *testing.T) { FILE: p2p/net/swarm/simul_test.go function TestSimultOpen (line 19) | func TestSimultOpen(t *testing.T) { function TestSimultOpenMany (line 48) | func TestSimultOpenMany(t *testing.T) { function TestSimultOpenFewStress (line 61) | func TestSimultOpenFewStress(t *testing.T) { FILE: p2p/net/swarm/swarm.go constant defaultDialTimeout (line 29) | defaultDialTimeout = 15 * time.Second constant defaultDialTimeoutLocal (line 35) | defaultDialTimeoutLocal = 5 * time.Second constant defaultNewStreamTimeout (line 37) | defaultNewStreamTimeout = 15 * time.Second type Option (line 53) | type Option function WithConnectionGater (line 56) | func WithConnectionGater(gater connmgr.ConnectionGater) Option { function WithMultiaddrResolver (line 64) | func WithMultiaddrResolver(resolver network.MultiaddrDNSResolver) Option { function WithMetrics (line 72) | func WithMetrics(reporter metrics.Reporter) Option { function WithMetricsTracer (line 79) | func WithMetricsTracer(t MetricsTracer) Option { function WithDialTimeout (line 86) | func WithDialTimeout(t time.Duration) Option { function WithDialTimeoutLocal (line 93) | func WithDialTimeoutLocal(t time.Duration) Option { function WithResourceManager (line 100) | func WithResourceManager(m network.ResourceManager) Option { function WithDialRanker (line 108) | func WithDialRanker(d network.DialRanker) Option { function WithUDPBlackHoleSuccessCounter (line 121) | func WithUDPBlackHoleSuccessCounter(f *BlackHoleSuccessCounter) Option { function WithIPv6BlackHoleSuccessCounter (line 131) | func WithIPv6BlackHoleSuccessCounter(f *BlackHoleSuccessCounter) Option { function WithReadOnlyBlackHoleDetector (line 142) | func WithReadOnlyBlackHoleDetector() Option { type Swarm (line 153) | type Swarm struct method Close (line 282) | func (s *Swarm) Close() error { method Done (line 288) | func (s *Swarm) Done() <-chan struct{} { method close (line 292) | func (s *Swarm) close() { method addConn (line 361) | func (s *Swarm) addConn(tc transport.CapableConn, dir network.Directio... method Peerstore (line 452) | func (s *Swarm) Peerstore() peerstore.Peerstore { method SetStreamHandler (line 457) | func (s *Swarm) SetStreamHandler(handler network.StreamHandler) { method StreamHandler (line 462) | func (s *Swarm) StreamHandler() network.StreamHandler { method NewStream (line 474) | func (s *Swarm) NewStream(ctx context.Context, p peer.ID) (network.Str... method waitForDirectConn (line 530) | func (s *Swarm) waitForDirectConn(ctx context.Context, p peer.ID) (*Co... method ConnsToPeer (line 581) | func (s *Swarm) ConnsToPeer(p peer.ID) []network.Conn { method bestConnToPeer (line 627) | func (s *Swarm) bestConnToPeer(p peer.ID) *Conn { method bestAcceptableConnToPeer (line 650) | func (s *Swarm) bestAcceptableConnToPeer(ctx context.Context, p peer.I... method Connectedness (line 668) | func (s *Swarm) Connectedness(p peer.ID) network.Connectedness { method connectednessUnlocked (line 676) | func (s *Swarm) connectednessUnlocked(p peer.ID) network.Connectedness { method Conns (line 696) | func (s *Swarm) Conns() []network.Conn { method ClosePeer (line 710) | func (s *Swarm) ClosePeer(p peer.ID) error { method Peers (line 740) | func (s *Swarm) Peers() []peer.ID { method LocalPeer (line 752) | func (s *Swarm) LocalPeer() peer.ID { method Backoff (line 757) | func (s *Swarm) Backoff() *DialBackoff { method notifyAll (line 762) | func (s *Swarm) notifyAll(notify func(network.Notifiee)) { method Notify (line 771) | func (s *Swarm) Notify(f network.Notifiee) { method StopNotify (line 778) | func (s *Swarm) StopNotify(f network.Notifiee) { method removeConn (line 784) | func (s *Swarm) removeConn(c *Conn) { method String (line 807) | func (s *Swarm) String() string { method ResourceManager (line 811) | func (s *Swarm) ResourceManager() network.ResourceManager { method AddCertHashes (line 973) | func (s *Swarm) AddCertHashes(listenAddrs []ma.Multiaddr) []ma.Multiad... function NewSwarm (line 228) | func NewSwarm(local peer.ID, peers peerstore.Peerstore, eventBus event.B... function isBetterConn (line 594) | func isBetterConn(a, b *Conn) bool { function isDirectConn (line 660) | func isDirectConn(c *Conn) bool { type connWithMetrics (line 821) | type connWithMetrics struct method As (line 836) | func (c *connWithMetrics) As(target any) bool { method completedHandshake (line 840) | func (c *connWithMetrics) completedHandshake() { method Close (line 844) | func (c *connWithMetrics) Close() error { method CloseWithError (line 852) | func (c *connWithMetrics) CloseWithError(errCode network.ConnErrorCode... method Stat (line 860) | func (c *connWithMetrics) Stat() network.ConnStats { function wrapWithMetrics (line 830) | func wrapWithMetrics(capableConn transport.CapableConn, metricsTracer Me... type ResolverFromMaDNS (line 869) | type ResolverFromMaDNS struct method ResolveDNSAddr (line 890) | func (r ResolverFromMaDNS) ResolveDNSAddr(ctx context.Context, expecte... method ResolveDNSComponent (line 958) | func (r ResolverFromMaDNS) ResolveDNSComponent(ctx context.Context, ma... function startsWithDNSADDR (line 875) | func startsWithDNSADDR(m ma.Multiaddr) bool { FILE: p2p/net/swarm/swarm_addr.go method ListenAddresses (line 12) | func (s *Swarm) ListenAddresses() []ma.Multiaddr { method listenAddressesNoLock (line 18) | func (s *Swarm) listenAddressesNoLock() []ma.Multiaddr { constant ifaceAddrsCacheDuration (line 26) | ifaceAddrsCacheDuration = 1 * time.Minute method InterfaceListenAddresses (line 31) | func (s *Swarm) InterfaceListenAddresses() ([]ma.Multiaddr, error) { FILE: p2p/net/swarm/swarm_addr_test.go function TestDialBadAddrs (line 29) | func TestDialBadAddrs(t *testing.T) { function TestAddrRace (line 53) | func TestAddrRace(t *testing.T) { function TestAddressesWithoutListening (line 67) | func TestAddressesWithoutListening(t *testing.T) { function TestDialAddressSelection (line 74) | func TestDialAddressSelection(t *testing.T) { FILE: p2p/net/swarm/swarm_conn.go type Conn (line 25) | type Conn struct method As (line 45) | func (c *Conn) As(target any) bool { method IsClosed (line 49) | func (c *Conn) IsClosed() bool { method ID (line 53) | func (c *Conn) ID() string { method Close (line 64) | func (c *Conn) Close() error { method CloseWithError (line 71) | func (c *Conn) CloseWithError(errCode network.ConnErrorCode) error { method doClose (line 78) | func (c *Conn) doClose(errCode network.ConnErrorCode) { method removeStream (line 118) | func (c *Conn) removeStream(s *Stream) { method start (line 130) | func (c *Conn) start() { method String (line 167) | func (c *Conn) String() string { method LocalMultiaddr (line 179) | func (c *Conn) LocalMultiaddr() ma.Multiaddr { method LocalPeer (line 184) | func (c *Conn) LocalPeer() peer.ID { method RemoteMultiaddr (line 189) | func (c *Conn) RemoteMultiaddr() ma.Multiaddr { method RemotePeer (line 194) | func (c *Conn) RemotePeer() peer.ID { method RemotePublicKey (line 199) | func (c *Conn) RemotePublicKey() ic.PubKey { method ConnState (line 205) | func (c *Conn) ConnState() network.ConnectionState { method Stat (line 210) | func (c *Conn) Stat() network.ConnStats { method NewStream (line 217) | func (c *Conn) NewStream(ctx context.Context) (network.Stream, error) { method openAndAddStream (line 246) | func (c *Conn) openAndAddStream(ctx context.Context, scope network.Str... method addStream (line 254) | func (c *Conn) addStream(ts network.MuxedStream, dir network.Direction... method GetStreams (line 287) | func (c *Conn) GetStreams() []network.Stream { method Scope (line 297) | func (c *Conn) Scope() network.ConnScope { FILE: p2p/net/swarm/swarm_dial.go constant maximumResolvedAddresses (line 25) | maximumResolvedAddresses = 100 constant maximumDNSADDRRecursion (line 27) | maximumDNSADDRRecursion = 4 type errQUICDraft29 (line 74) | type errQUICDraft29 struct method Error (line 76) | func (errQUICDraft29) Error() string { method Unwrap (line 80) | func (errQUICDraft29) Unwrap() error { constant DialAttempts (line 87) | DialAttempts = 1 constant ConcurrentFdDials (line 91) | ConcurrentFdDials = 160 type DialBackoff (line 107) | type DialBackoff struct method init (line 117) | func (db *DialBackoff) init(ctx context.Context) { method background (line 124) | func (db *DialBackoff) background(ctx context.Context) { method Backoff (line 139) | func (db *DialBackoff) Backoff(p peer.ID, addr ma.Multiaddr) (backoff ... method AddBackoff (line 164) | func (db *DialBackoff) AddBackoff(p peer.ID, addr ma.Multiaddr) { method Clear (line 189) | func (db *DialBackoff) Clear(p peer.ID) { method cleanup (line 195) | func (db *DialBackoff) cleanup() { type backoffAddr (line 112) | type backoffAddr struct method DialPeer (line 221) | func (s *Swarm) DialPeer(ctx context.Context, p peer.ID) (network.Conn, ... method dialPeer (line 234) | func (s *Swarm) dialPeer(ctx context.Context, p peer.ID) (*Conn, error) { method dialWorkerLoop (line 288) | func (s *Swarm) dialWorkerLoop(p peer.ID, reqch <-chan dialRequest) { method addrsForDial (line 293) | func (s *Swarm) addrsForDial(ctx context.Context, p peer.ID) (goodAddrs ... function startsWithDNSComponent (line 317) | func startsWithDNSComponent(m ma.Multiaddr) bool { function stripP2PComponent (line 334) | func stripP2PComponent(addrs []ma.Multiaddr) []ma.Multiaddr { type resolver (line 343) | type resolver struct type resolveErr (line 348) | type resolveErr struct function chainResolvers (line 353) | func chainResolvers(ctx context.Context, addrs []ma.Multiaddr, outputLim... method resolveAddrs (line 383) | func (s *Swarm) resolveAddrs(ctx context.Context, pi peer.AddrInfo) []ma... method dialNextAddr (line 455) | func (s *Swarm) dialNextAddr(ctx context.Context, p peer.ID, addr ma.Mul... method CanDial (line 469) | func (s *Swarm) CanDial(p peer.ID, addr ma.Multiaddr) bool { method nonProxyAddr (line 474) | func (s *Swarm) nonProxyAddr(addr ma.Multiaddr) bool { method filterKnownUndialables (line 487) | func (s *Swarm) filterKnownUndialables(p peer.ID, addrs []ma.Multiaddr) ... method limitedDial (line 562) | func (s *Swarm) limitedDial(ctx context.Context, p peer.ID, a ma.Multiad... method dialAddr (line 577) | func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiad... function isFdConsumingAddr (line 639) | func isFdConsumingAddr(addr ma.Multiaddr) bool { function isRelayAddr (line 654) | func isRelayAddr(addr ma.Multiaddr) bool { function filterLowPriorityAddresses (line 665) | func filterLowPriorityAddresses(addrs []ma.Multiaddr) []ma.Multiaddr { function addrPort (line 716) | func addrPort(a ma.Multiaddr, p int) (netip.AddrPort, error) { FILE: p2p/net/swarm/swarm_dial_test.go function TestAddrsForDial (line 33) | func TestAddrsForDial(t *testing.T) { function TestDedupAddrsForDial (line 76) | func TestDedupAddrsForDial(t *testing.T) { function newTestSwarmWithResolver (line 121) | func newTestSwarmWithResolver(t *testing.T, resolver *madns.Resolver) *S... function TestAddrResolution (line 163) | func TestAddrResolution(t *testing.T) { function TestAddrResolutionRecursive (line 200) | func TestAddrResolutionRecursive(t *testing.T) { function TestAddrResolutionRecursiveTransportSpecific (line 255) | func TestAddrResolutionRecursiveTransportSpecific(t *testing.T) { function TestAddrsForDialFiltering (line 282) | func TestAddrsForDialFiltering(t *testing.T) { function TestBlackHoledAddrBlocked (line 359) | func TestBlackHoledAddrBlocked(t *testing.T) { type mockDNSResolver (line 403) | type mockDNSResolver struct method LookupIPAddr (line 410) | func (m *mockDNSResolver) LookupIPAddr(_ context.Context, _ string) ([... method LookupTXT (line 414) | func (m *mockDNSResolver) LookupTXT(_ context.Context, _ string) ([]st... function TestSkipDialingManyDNS (line 418) | func TestSkipDialingManyDNS(t *testing.T) { FILE: p2p/net/swarm/swarm_event_test.go function newSwarmWithSubscription (line 20) | func newSwarmWithSubscription(t *testing.T) (*Swarm, event.Subscription) { function checkEvent (line 31) | func checkEvent(t *testing.T, sub event.Subscription, expected event.Evt... function TestConnectednessEventsSingleConn (line 52) | func TestConnectednessEventsSingleConn(t *testing.T) { function TestNoDeadlockWhenConsumingConnectednessEvents (line 70) | func TestNoDeadlockWhenConsumingConnectednessEvents(t *testing.T) { function TestConnectednessEvents (line 119) | func TestConnectednessEvents(t *testing.T) { function TestConnectednessEventDeadlock (line 207) | func TestConnectednessEventDeadlock(t *testing.T) { function TestConnectednessEventDeadlockWithDial (line 249) | func TestConnectednessEventDeadlockWithDial(t *testing.T) { FILE: p2p/net/swarm/swarm_listen.go type OrderedListener (line 16) | type OrderedListener interface method Listen (line 27) | func (s *Swarm) Listen(addrs ...ma.Multiaddr) error { method ListenClose (line 78) | func (s *Swarm) ListenClose(addrs ...ma.Multiaddr) { method AddListenAddr (line 100) | func (s *Swarm) AddListenAddr(a ma.Multiaddr) error { function containsMultiaddr (line 193) | func containsMultiaddr(addrs []ma.Multiaddr, addr ma.Multiaddr) bool { FILE: p2p/net/swarm/swarm_metrics.go constant metricNamespace (line 19) | metricNamespace = "libp2p_swarm" type MetricsTracer (line 137) | type MetricsTracer interface type metricsTracer (line 147) | type metricsTracer struct method OpenedConnection (line 194) | func (m *metricsTracer) OpenedConnection(dir network.Direction, p cryp... method ClosedConnection (line 209) | func (m *metricsTracer) ClosedConnection(dir network.Direction, durati... method CompletedHandshake (line 220) | func (m *metricsTracer) CompletedHandshake(t time.Duration, cs network... method FailedDialing (line 229) | func (m *metricsTracer) FailedDialing(addr ma.Multiaddr, dialErr error... method DialCompleted (line 263) | func (m *metricsTracer) DialCompleted(success bool, totalDials int, la... method DialRankingDelay (line 284) | func (m *metricsTracer) DialRankingDelay(d time.Duration) { method UpdatedBlackHoleSuccessCounter (line 288) | func (m *metricsTracer) UpdatedBlackHoleSuccessCounter(name string, st... type metricsTracerSetting (line 151) | type metricsTracerSetting struct type MetricsTracerOption (line 155) | type MetricsTracerOption function WithRegisterer (line 157) | func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption { function NewMetricsTracer (line 165) | func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer { function appendConnectionState (line 174) | func appendConnectionState(tags []string, cs network.ConnectionState) []... FILE: p2p/net/swarm/swarm_metrics_test.go function BenchmarkMetricsConnOpen (line 22) | func BenchmarkMetricsConnOpen(b *testing.B) { function randItem (line 45) | func randItem[T any](items []T) T { function TestMetricsNoAllocNoCover (line 49) | func TestMetricsNoAllocNoCover(t *testing.T) { FILE: p2p/net/swarm/swarm_net_test.go function TestConnectednessCorrect (line 18) | func TestConnectednessCorrect(t *testing.T) { function expectConnectedness (line 68) | func expectConnectedness(t *testing.T, a, b network.Network, expected ne... function printConns (line 82) | func printConns(n network.Network) string { function TestNetworkOpenStream (line 90) | func TestNetworkOpenStream(t *testing.T) { FILE: p2p/net/swarm/swarm_notif_test.go function TestNotifications (line 19) | func TestNotifications(t *testing.T) { type netNotifiee (line 156) | type netNotifiee struct method Listen (line 172) | func (nn *netNotifiee) Listen(_ network.Network, a ma.Multiaddr) { method ListenClose (line 175) | func (nn *netNotifiee) ListenClose(_ network.Network, a ma.Multiaddr) { method Connected (line 178) | func (nn *netNotifiee) Connected(_ network.Network, v network.Conn) { method Disconnected (line 181) | func (nn *netNotifiee) Disconnected(_ network.Network, v network.Conn) { function newNetNotifiee (line 163) | func newNetNotifiee(buffer int) *netNotifiee { FILE: p2p/net/swarm/swarm_stream.go type Stream (line 18) | type Stream struct method ID (line 35) | func (s *Stream) ID() string { method String (line 40) | func (s *Stream) String() string { method Conn (line 52) | func (s *Stream) Conn() network.Conn { method Read (line 57) | func (s *Stream) Read(p []byte) (int, error) { method Write (line 68) | func (s *Stream) Write(p []byte) (int, error) { method Close (line 80) | func (s *Stream) Close() error { method Reset (line 88) | func (s *Stream) Reset() error { method ResetWithError (line 94) | func (s *Stream) ResetWithError(errCode network.StreamErrorCode) error { method closeAndRemoveStream (line 100) | func (s *Stream) closeAndRemoveStream() { method CloseWrite (line 118) | func (s *Stream) CloseWrite() error { method CloseRead (line 124) | func (s *Stream) CloseRead() error { method completeAcceptStreamGoroutine (line 128) | func (s *Stream) completeAcceptStreamGoroutine() { method Protocol (line 141) | func (s *Stream) Protocol() protocol.ID { method SetProtocol (line 154) | func (s *Stream) SetProtocol(p protocol.ID) error { method SetDeadline (line 164) | func (s *Stream) SetDeadline(t time.Time) error { method SetReadDeadline (line 169) | func (s *Stream) SetReadDeadline(t time.Time) error { method SetWriteDeadline (line 174) | func (s *Stream) SetWriteDeadline(t time.Time) error { method Stat (line 179) | func (s *Stream) Stat() network.Stats { method Scope (line 183) | func (s *Stream) Scope() network.StreamScope { FILE: p2p/net/swarm/swarm_test.go function EchoStreamHandler (line 34) | func EchoStreamHandler(stream network.Stream) { function makeDialOnlySwarm (line 65) | func makeDialOnlySwarm(t *testing.T) *swarm.Swarm { function makeSwarms (line 71) | func makeSwarms(t *testing.T, num int, opts ...Option) []*swarm.Swarm { function connectSwarms (line 81) | func connectSwarms(t *testing.T, ctx context.Context, swarms []*swarm.Sw... function subtestSwarm (line 105) | func subtestSwarm(t *testing.T, SwarmNum int, MsgNum int) { function TestSwarm (line 224) | func TestSwarm(t *testing.T) { function TestBasicSwarm (line 229) | func TestBasicSwarm(t *testing.T) { function TestConnectionGating (line 235) | func TestConnectionGating(t *testing.T) { function TestNoDial (line 359) | func TestNoDial(t *testing.T) { function TestCloseWithOpenStreams (line 368) | func TestCloseWithOpenStreams(t *testing.T) { function TestTypedNilConn (line 380) | func TestTypedNilConn(t *testing.T) { function TestPreventDialListenAddr (line 391) | func TestPreventDialListenAddr(t *testing.T) { function TestStreamCount (line 419) | func TestStreamCount(t *testing.T) { function TestResourceManager (line 460) | func TestResourceManager(t *testing.T) { function TestResourceManagerNewStream (line 495) | func TestResourceManagerNewStream(t *testing.T) { function TestResourceManagerAcceptStream (line 514) | func TestResourceManagerAcceptStream(t *testing.T) { function TestListenCloseCount (line 544) | func TestListenCloseCount(t *testing.T) { function TestAddCertHashes (line 572) | func TestAddCertHashes(t *testing.T) { FILE: p2p/net/swarm/swarm_transport.go method TransportForDialing (line 15) | func (s *Swarm) TransportForDialing(a ma.Multiaddr) transport.Transport { method TransportForListening (line 54) | func (s *Swarm) TransportForListening(a ma.Multiaddr) transport.Transport { method AddTransport (line 82) | func (s *Swarm) AddTransport(t transport.Transport) error { FILE: p2p/net/swarm/testing/testing.go type config (line 36) | type config struct type clock (line 50) | type clock interface type realclock (line 54) | type realclock struct method Now (line 56) | func (rc realclock) Now() time.Time { type Option (line 61) | type Option function WithClock (line 64) | func WithClock(clock clock) Option { function WithSwarmOpts (line 70) | func WithSwarmOpts(swarmOpts ...swarm.Option) Option { function OptConnGater (line 107) | func OptConnGater(cg connmgr.ConnectionGater) Option { function OptPeerPrivateKey (line 114) | func OptPeerPrivateKey(sk crypto.PrivKey) Option { function EventBus (line 120) | func EventBus(b event.Bus) Option { function GenUpgrader (line 127) | func GenUpgrader(t testing.TB, n *swarm.Swarm, connGater connmgr.Connect... function GenSwarm (line 138) | func GenSwarm(t testing.TB, opts ...Option) *swarm.Swarm { function DivulgeAddresses (line 256) | func DivulgeAddresses(a, b network.Network) { type MockConnectionGater (line 263) | type MockConnectionGater struct method InterceptAddrDial (line 296) | func (m *MockConnectionGater) InterceptAddrDial(p peer.ID, addr ma.Mul... method InterceptPeerDial (line 300) | func (m *MockConnectionGater) InterceptPeerDial(p peer.ID) (allow bool) { method InterceptAccept (line 304) | func (m *MockConnectionGater) InterceptAccept(c network.ConnMultiaddrs... method InterceptSecured (line 308) | func (m *MockConnectionGater) InterceptSecured(d network.Direction, p ... method InterceptUpgraded (line 312) | func (m *MockConnectionGater) InterceptUpgraded(tc network.Conn) (allo... function DefaultMockConnectionGater (line 271) | func DefaultMockConnectionGater() *MockConnectionGater { FILE: p2p/net/swarm/testing/testing_test.go function TestGenSwarm (line 9) | func TestGenSwarm(t *testing.T) { FILE: p2p/net/swarm/transport_test.go type dummyTransport (line 16) | type dummyTransport struct method Dial (line 22) | func (dt *dummyTransport) Dial(_ context.Context, _ ma.Multiaddr, _ pe... method CanDial (line 26) | func (dt *dummyTransport) CanDial(_ ma.Multiaddr) bool { method Listen (line 30) | func (dt *dummyTransport) Listen(_ ma.Multiaddr) (transport.Listener, ... method Proxy (line 34) | func (dt *dummyTransport) Proxy() bool { method Protocols (line 38) | func (dt *dummyTransport) Protocols() []int { method Close (line 41) | func (dt *dummyTransport) Close() error { function TestUselessTransport (line 46) | func TestUselessTransport(t *testing.T) { function TestTransportClose (line 51) | func TestTransportClose(t *testing.T) { function TestTransportAfterClose (line 61) | func TestTransportAfterClose(t *testing.T) { FILE: p2p/net/swarm/util_test.go function TestIsFdConsuming (line 13) | func TestIsFdConsuming(t *testing.T) { FILE: p2p/net/upgrader/conn.go type transportConn (line 11) | type transportConn struct method As (line 26) | func (c *transportConn) As(target any) bool { method Transport (line 30) | func (t *transportConn) Transport() transport.Transport { method String (line 34) | func (t *transportConn) String() string { method Stat (line 49) | func (t *transportConn) Stat() network.ConnStats { method Scope (line 53) | func (t *transportConn) Scope() network.ConnScope { method Close (line 57) | func (t *transportConn) Close() error { method ConnState (line 62) | func (t *transportConn) ConnState() network.ConnectionState { method CloseWithError (line 71) | func (t *transportConn) CloseWithError(errCode network.ConnErrorCode) ... FILE: p2p/net/upgrader/gater_test.go type testGater (line 14) | type testGater struct method BlockAccept (line 22) | func (t *testGater) BlockAccept(block bool) { method BlockSecured (line 29) | func (t *testGater) BlockSecured(block bool) { method InterceptPeerDial (line 36) | func (t *testGater) InterceptPeerDial(_ peer.ID) (allow bool) { method InterceptAddrDial (line 40) | func (t *testGater) InterceptAddrDial(_ peer.ID, _ ma.Multiaddr) (allo... method InterceptAccept (line 44) | func (t *testGater) InterceptAccept(_ network.ConnMultiaddrs) (allow b... method InterceptSecured (line 51) | func (t *testGater) InterceptSecured(_ network.Direction, _ peer.ID, _... method InterceptUpgraded (line 58) | func (t *testGater) InterceptUpgraded(_ network.Conn) (allow bool, rea... FILE: p2p/net/upgrader/listener.go type listener (line 20) | type listener struct method Close (line 42) | func (l *listener) Close() error { method handleIncoming (line 63) | func (l *listener) handleIncoming() { method Accept (line 150) | func (l *listener) Accept() (transport.CapableConn, error) { method String (line 163) | func (l *listener) String() string { type gatedMaListener (line 170) | type gatedMaListener struct method Accept (line 178) | func (l *gatedMaListener) Accept() (manet.Conn, network.ConnManagement... FILE: p2p/net/upgrader/listener_test.go function createListener (line 27) | func createListener(t *testing.T, u transport.Upgrader) transport.Listen... function TestAcceptSingleConn (line 36) | func TestAcceptSingleConn(t *testing.T) { function TestAcceptMultipleConns (line 52) | func TestAcceptMultipleConns(t *testing.T) { function TestConnectionsClosedIfNotAccepted (line 79) | func TestConnectionsClosedIfNotAccepted(t *testing.T) { function TestFailedUpgradeOnListen (line 118) | func TestFailedUpgradeOnListen(t *testing.T) { function TestListenerClose (line 138) | func TestListenerClose(t *testing.T) { function TestListenerCloseClosesQueued (line 168) | func TestListenerCloseClosesQueued(t *testing.T) { function TestConcurrentAccept (line 208) | func TestConcurrentAccept(t *testing.T) { function TestAcceptQueueBacklogged (line 256) | func TestAcceptQueueBacklogged(t *testing.T) { function TestListenerConnectionGater (line 292) | func TestListenerConnectionGater(t *testing.T) { function TestListenerResourceManagement (line 337) | func TestListenerResourceManagement(t *testing.T) { function TestListenerResourceManagementDenied (line 363) | func TestListenerResourceManagementDenied(t *testing.T) { function TestNoCommonSecurityProto (line 389) | func TestNoCommonSecurityProto(t *testing.T) { FILE: p2p/net/upgrader/threshold.go function newThreshold (line 7) | func newThreshold(cutoff int) *threshold { type threshold (line 15) | type threshold struct method Acquire (line 24) | func (t *threshold) Acquire() { method Release (line 31) | func (t *threshold) Release() { method Wait (line 44) | func (t *threshold) Wait() { FILE: p2p/net/upgrader/upgrader.go constant defaultAcceptTimeout (line 31) | defaultAcceptTimeout = 15 * time.Second constant defaultNegotiateTimeout (line 32) | defaultNegotiateTimeout = 60 * time.Second type Option (line 35) | type Option function WithAcceptTimeout (line 37) | func WithAcceptTimeout(t time.Duration) Option { type StreamMuxer (line 44) | type StreamMuxer struct type upgrader (line 51) | type upgrader struct method UpgradeListener (line 107) | func (u *upgrader) UpgradeListener(t transport.Transport, list manet.L... method GateMaListener (line 111) | func (u *upgrader) GateMaListener(l manet.Listener) transport.GatedMaL... method UpgradeGatedMaListener (line 120) | func (u *upgrader) UpgradeGatedMaListener(t transport.Transport, l tra... method Upgrade (line 137) | func (u *upgrader) Upgrade(ctx context.Context, t transport.Transport,... method upgrade (line 146) | func (u *upgrader) upgrade(ctx context.Context, t transport.Transport,... method setupSecurity (line 216) | func (u *upgrader) setupSecurity(ctx context.Context, conn net.Conn, p... method negotiateMuxer (line 229) | func (u *upgrader) negotiateMuxer(nc net.Conn, isServer bool) (*Stream... method getMuxerByID (line 259) | func (u *upgrader) getMuxerByID(id protocol.ID) *StreamMuxer { method setupMuxer (line 268) | func (u *upgrader) setupMuxer(ctx context.Context, conn sec.SecureConn... method getSecurityByID (line 313) | func (u *upgrader) getSecurityByID(id protocol.ID) sec.SecureTransport { method negotiateSecurity (line 322) | func (u *upgrader) negotiateSecurity(ctx context.Context, insecure net... function New (line 74) | func New(security []sec.SecureTransport, muxers []StreamMuxer, psk ipnet... FILE: p2p/net/upgrader/upgrader_test.go function createUpgrader (line 27) | func createUpgrader(t *testing.T) (peer.ID, transport.Upgrader) { function createUpgraderWithConnGater (line 31) | func createUpgraderWithConnGater(t *testing.T, connGater connmgr.Connect... function createUpgraderWithResourceManager (line 35) | func createUpgraderWithResourceManager(t *testing.T, rcmgr network.Resou... function createUpgraderWithOpts (line 39) | func createUpgraderWithOpts(t *testing.T, opts ...upgrader.Option) (peer... function newPeer (line 43) | func newPeer(t *testing.T) (peer.ID, crypto.PrivKey) { function createUpgraderWithMuxers (line 52) | func createUpgraderWithMuxers(t *testing.T, muxers []upgrader.StreamMuxe... type negotiatingMuxer (line 61) | type negotiatingMuxer struct method NewConn (line 63) | func (m *negotiatingMuxer) NewConn(c net.Conn, isServer bool, scope ne... type blockingMuxer (line 78) | type blockingMuxer struct method NewConn (line 88) | func (m *blockingMuxer) NewConn(c net.Conn, isServer bool, scope netwo... method Unblock (line 93) | func (m *blockingMuxer) Unblock() { function newBlockingMuxer (line 84) | func newBlockingMuxer() *blockingMuxer { type errorMuxer (line 98) | type errorMuxer struct method NewConn (line 102) | func (m *errorMuxer) NewConn(_ net.Conn, _ bool, _ network.PeerScope) ... function testConn (line 106) | func testConn(t *testing.T, clientConn, serverConn transport.CapableConn) { function dial (line 125) | func dial(t *testing.T, upgrader transport.Upgrader, raddr ma.Multiaddr,... function TestOutboundConnectionGating (line 135) | func TestOutboundConnectionGating(t *testing.T) { function TestOutboundResourceManagement (line 164) | func TestOutboundResourceManagement(t *testing.T) { FILE: p2p/protocol/autonatv2/autonat.go constant ServiceName (line 23) | ServiceName = "libp2p.autonatv2" constant DialBackProtocol (line 24) | DialBackProtocol = "/libp2p/autonat/2/dial-back" constant DialProtocol (line 25) | DialProtocol = "/libp2p/autonat/2/dial-request" constant maxMsgSize (line 27) | maxMsgSize = 8192 constant streamTimeout (line 28) | streamTimeout = 15 * time.Second constant dialBackStreamTimeout (line 29) | dialBackStreamTimeout = 5 * time.Second constant dialBackDialTimeout (line 30) | dialBackDialTimeout = 10 * time.Second constant dialBackMaxMsgSize (line 31) | dialBackMaxMsgSize = 1024 constant minHandshakeSizeBytes (line 32) | minHandshakeSizeBytes = 30_000 constant maxHandshakeSizeBytes (line 33) | maxHandshakeSizeBytes = 100_000 constant maxPeerAddresses (line 36) | maxPeerAddresses = 50 constant defaultThrottlePeerDuration (line 38) | defaultThrottlePeerDuration = 2 * time.Minute type Request (line 51) | type Request struct type Result (line 59) | type Result struct type AutoNAT (line 73) | type AutoNAT struct method background (line 120) | func (an *AutoNAT) background(sub event.Subscription) { method Start (line 152) | func (an *AutoNAT) Start(h host.Host) error { method Close (line 172) | func (an *AutoNAT) Close() { method GetReachability (line 181) | func (an *AutoNAT) GetReachability(ctx context.Context, reqs []Request... method updatePeer (line 229) | func (an *AutoNAT) updatePeer(p peer.ID) { function New (line 98) | func New(dialerHost host.Host, opts ...AutoNATOption) (*AutoNAT, error) { type peersMap (line 246) | type peersMap struct method Shuffled (line 259) | func (p *peersMap) Shuffled() iter.Seq[peer.ID] { method Put (line 274) | func (p *peersMap) Put(id peer.ID) { method Delete (line 282) | func (p *peersMap) Delete(id peer.ID) { function newPeersMap (line 251) | func newPeersMap() *peersMap { FILE: p2p/protocol/autonatv2/autonat_test.go function newAutoNAT (line 32) | func newAutoNAT(t testing.TB, dialer host.Host, opts ...AutoNATOption) *... function parseAddrs (line 54) | func parseAddrs(t *testing.T, msg *pb.Message) []ma.Multiaddr { function idAndConnect (line 69) | func idAndConnect(t testing.TB, a, b host.Host) { function waitForPeer (line 78) | func waitForPeer(t testing.TB, a *AutoNAT) { function idAndWait (line 88) | func idAndWait(t testing.TB, cli *AutoNAT, srv *AutoNAT) { function TestAutoNATPrivateAddr (line 93) | func TestAutoNATPrivateAddr(t *testing.T) { function TestClientRequest (line 100) | func TestClientRequest(t *testing.T) { function TestClientServerError (line 135) | func TestClientServerError(t *testing.T) { function TestClientDataRequest (line 179) | func TestClientDataRequest(t *testing.T) { function TestAutoNATPrivateAndPublicAddrs (line 294) | func TestAutoNATPrivateAndPublicAddrs(t *testing.T) { function TestClientDialBacks (line 337) | func TestClientDialBacks(t *testing.T) { function TestEventSubscription (line 551) | func TestEventSubscription(t *testing.T) { function TestAreAddrsConsistency (line 589) | func TestAreAddrsConsistency(t *testing.T) { function TestPeerMap (line 671) | func TestPeerMap(t *testing.T) { function FuzzClient (line 697) | func FuzzClient(f *testing.F) { function TestNormalizeMultiaddr (line 838) | func TestNormalizeMultiaddr(t *testing.T) { FILE: p2p/protocol/autonatv2/client.go type client (line 23) | type client struct method Start (line 42) | func (ac *client) Start(h host.Host) { method Close (line 47) | func (ac *client) Close() { method GetReachability (line 52) | func (ac *client) GetReachability(ctx context.Context, p peer.ID, reqs... method getReachability (line 63) | func (ac *client) getReachability(ctx context.Context, p peer.ID, reqs... method newResult (line 182) | func (ac *client) newResult(resp *pb.DialResponse, reqs []Request, dia... method handleDialBack (line 260) | func (ac *client) handleDialBack(s network.Stream) { method areAddrsConsistent (line 376) | func (ac *client) areAddrsConsistent(connLocalAddr, dialedAddr ma.Mult... function newClient (line 34) | func newClient(s *autoNATSettings) *client { function validateDialDataRequest (line 168) | func validateDialDataRequest(reqs []Request, msg *pb.Message) error { function sendDialData (line 225) | func sendDialData(dialData []byte, numBytes int, w pbio.Writer, msg *pb.... function newDialRequest (line 244) | func newDialRequest(reqs []Request, nonce uint64) pb.Message { function normalizeMultiaddr (line 338) | func normalizeMultiaddr(addr ma.Multiaddr) ma.Multiaddr { function removeTrailing (line 367) | func removeTrailing(addr ma.Multiaddr, protocolCode int) ma.Multiaddr { FILE: p2p/protocol/autonatv2/metrics.go type MetricsTracer (line 13) | type MetricsTracer interface constant metricNamespace (line 18) | metricNamespace = "libp2p_autonatv2" type metricsTracer (line 47) | type metricsTracer struct method CompletedRequest (line 55) | func (m *metricsTracer) CompletedRequest(e EventDialRequestCompleted) { method ClientCompletedRequest (line 83) | func (m *metricsTracer) ClientCompletedRequest(reqs []Request, result ... function NewMetricsTracer (line 50) | func NewMetricsTracer(reg prometheus.Registerer) MetricsTracer { function getIPOrDNSVersion (line 123) | func getIPOrDNSVersion(a ma.Multiaddr) string { function getErrString (line 143) | func getErrString(e error) string { FILE: p2p/protocol/autonatv2/metrics_test.go function TestMetricsNoAllocNoCover (line 14) | func TestMetricsNoAllocNoCover(t *testing.T) { FILE: p2p/protocol/autonatv2/msg_reader.go type msgReader (line 10) | type msgReader struct method ReadByte (line 15) | func (m *msgReader) ReadByte() (byte, error) { method ReadMsg (line 21) | func (m *msgReader) ReadMsg() ([]byte, error) { FILE: p2p/protocol/autonatv2/options.go type autoNATSettings (line 6) | type autoNATSettings struct function defaultSettings (line 19) | func defaultSettings() *autoNATSettings { type AutoNATOption (line 33) | type AutoNATOption function WithServerRateLimit (line 35) | func WithServerRateLimit(rpm, perPeerRPM, dialDataRPM int, maxConcurrent... function WithMetricsTracer (line 45) | func WithMetricsTracer(m MetricsTracer) AutoNATOption { function withDataRequestPolicy (line 52) | func withDataRequestPolicy(drp dataRequestPolicyFunc) AutoNATOption { function allowPrivateAddrs (line 59) | func allowPrivateAddrs(s *autoNATSettings) error { function withAmplificationAttackPreventionDialWait (line 64) | func withAmplificationAttackPreventionDialWait(d time.Duration) AutoNATO... function withThrottlePeerDuration (line 71) | func withThrottlePeerDuration(d time.Duration) AutoNATOption { FILE: p2p/protocol/autonatv2/pb/autonatv2.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type DialStatus (line 24) | type DialStatus method Enum (line 49) | func (x DialStatus) Enum() *DialStatus { method String (line 55) | func (x DialStatus) String() string { method Descriptor (line 59) | func (DialStatus) Descriptor() protoreflect.EnumDescriptor { method Type (line 63) | func (DialStatus) Type() protoreflect.EnumType { method Number (line 67) | func (x DialStatus) Number() protoreflect.EnumNumber { method EnumDescriptor (line 72) | func (DialStatus) EnumDescriptor() ([]byte, []int) { constant DialStatus_UNUSED (line 27) | DialStatus_UNUSED DialStatus = 0 constant DialStatus_E_DIAL_ERROR (line 28) | DialStatus_E_DIAL_ERROR DialStatus = 100 constant DialStatus_E_DIAL_BACK_ERROR (line 29) | DialStatus_E_DIAL_BACK_ERROR DialStatus = 101 constant DialStatus_OK (line 30) | DialStatus_OK DialStatus = 200 type DialResponse_ResponseStatus (line 76) | type DialResponse_ResponseStatus method Enum (line 101) | func (x DialResponse_ResponseStatus) Enum() *DialResponse_ResponseStat... method String (line 107) | func (x DialResponse_ResponseStatus) String() string { method Descriptor (line 111) | func (DialResponse_ResponseStatus) Descriptor() protoreflect.EnumDescr... method Type (line 115) | func (DialResponse_ResponseStatus) Type() protoreflect.EnumType { method Number (line 119) | func (x DialResponse_ResponseStatus) Number() protoreflect.EnumNumber { method EnumDescriptor (line 124) | func (DialResponse_ResponseStatus) EnumDescriptor() ([]byte, []int) { constant DialResponse_E_INTERNAL_ERROR (line 79) | DialResponse_E_INTERNAL_ERROR DialResponse_ResponseStatus = 0 constant DialResponse_E_REQUEST_REJECTED (line 80) | DialResponse_E_REQUEST_REJECTED DialResponse_ResponseStatus = 100 constant DialResponse_E_DIAL_REFUSED (line 81) | DialResponse_E_DIAL_REFUSED DialResponse_ResponseStatus = 101 constant DialResponse_OK (line 82) | DialResponse_OK DialResponse_ResponseStatus = 200 type DialBackResponse_DialBackStatus (line 128) | type DialBackResponse_DialBackStatus method Enum (line 144) | func (x DialBackResponse_DialBackStatus) Enum() *DialBackResponse_Dial... method String (line 150) | func (x DialBackResponse_DialBackStatus) String() string { method Descriptor (line 154) | func (DialBackResponse_DialBackStatus) Descriptor() protoreflect.EnumD... method Type (line 158) | func (DialBackResponse_DialBackStatus) Type() protoreflect.EnumType { method Number (line 162) | func (x DialBackResponse_DialBackStatus) Number() protoreflect.EnumNum... method EnumDescriptor (line 167) | func (DialBackResponse_DialBackStatus) EnumDescriptor() ([]byte, []int) { constant DialBackResponse_OK (line 131) | DialBackResponse_OK DialBackResponse_DialBackStatus = 0 type Message (line 171) | type Message struct method Reset (line 184) | func (x *Message) Reset() { method String (line 191) | func (x *Message) String() string { method ProtoMessage (line 195) | func (*Message) ProtoMessage() {} method ProtoReflect (line 197) | func (x *Message) ProtoReflect() protoreflect.Message { method Descriptor (line 210) | func (*Message) Descriptor() ([]byte, []int) { method GetMsg (line 214) | func (x *Message) GetMsg() isMessage_Msg { method GetDialRequest (line 221) | func (x *Message) GetDialRequest() *DialRequest { method GetDialResponse (line 230) | func (x *Message) GetDialResponse() *DialResponse { method GetDialDataRequest (line 239) | func (x *Message) GetDialDataRequest() *DialDataRequest { method GetDialDataResponse (line 248) | func (x *Message) GetDialDataResponse() *DialDataResponse { type isMessage_Msg (line 257) | type isMessage_Msg interface type Message_DialRequest (line 261) | type Message_DialRequest struct method isMessage_Msg (line 277) | func (*Message_DialRequest) isMessage_Msg() {} type Message_DialResponse (line 265) | type Message_DialResponse struct method isMessage_Msg (line 279) | func (*Message_DialResponse) isMessage_Msg() {} type Message_DialDataRequest (line 269) | type Message_DialDataRequest struct method isMessage_Msg (line 281) | func (*Message_DialDataRequest) isMessage_Msg() {} type Message_DialDataResponse (line 273) | type Message_DialDataResponse struct method isMessage_Msg (line 283) | func (*Message_DialDataResponse) isMessage_Msg() {} type DialRequest (line 285) | type DialRequest struct method Reset (line 293) | func (x *DialRequest) Reset() { method String (line 300) | func (x *DialRequest) String() string { method ProtoMessage (line 304) | func (*DialRequest) ProtoMessage() {} method ProtoReflect (line 306) | func (x *DialRequest) ProtoReflect() protoreflect.Message { method Descriptor (line 319) | func (*DialRequest) Descriptor() ([]byte, []int) { method GetAddrs (line 323) | func (x *DialRequest) GetAddrs() [][]byte { method GetNonce (line 330) | func (x *DialRequest) GetNonce() uint64 { type DialDataRequest (line 337) | type DialDataRequest struct method Reset (line 345) | func (x *DialDataRequest) Reset() { method String (line 352) | func (x *DialDataRequest) String() string { method ProtoMessage (line 356) | func (*DialDataRequest) ProtoMessage() {} method ProtoReflect (line 358) | func (x *DialDataRequest) ProtoReflect() protoreflect.Message { method Descriptor (line 371) | func (*DialDataRequest) Descriptor() ([]byte, []int) { method GetAddrIdx (line 375) | func (x *DialDataRequest) GetAddrIdx() uint32 { method GetNumBytes (line 382) | func (x *DialDataRequest) GetNumBytes() uint64 { type DialResponse (line 389) | type DialResponse struct method Reset (line 398) | func (x *DialResponse) Reset() { method String (line 405) | func (x *DialResponse) String() string { method ProtoMessage (line 409) | func (*DialResponse) ProtoMessage() {} method ProtoReflect (line 411) | func (x *DialResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 424) | func (*DialResponse) Descriptor() ([]byte, []int) { method GetStatus (line 428) | func (x *DialResponse) GetStatus() DialResponse_ResponseStatus { method GetAddrIdx (line 435) | func (x *DialResponse) GetAddrIdx() uint32 { method GetDialStatus (line 442) | func (x *DialResponse) GetDialStatus() DialStatus { type DialDataResponse (line 449) | type DialDataResponse struct method Reset (line 456) | func (x *DialDataResponse) Reset() { method String (line 463) | func (x *DialDataResponse) String() string { method ProtoMessage (line 467) | func (*DialDataResponse) ProtoMessage() {} method ProtoReflect (line 469) | func (x *DialDataResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 482) | func (*DialDataResponse) Descriptor() ([]byte, []int) { method GetData (line 486) | func (x *DialDataResponse) GetData() []byte { type DialBack (line 493) | type DialBack struct method Reset (line 500) | func (x *DialBack) Reset() { method String (line 507) | func (x *DialBack) String() string { method ProtoMessage (line 511) | func (*DialBack) ProtoMessage() {} method ProtoReflect (line 513) | func (x *DialBack) ProtoReflect() protoreflect.Message { method Descriptor (line 526) | func (*DialBack) Descriptor() ([]byte, []int) { method GetNonce (line 530) | func (x *DialBack) GetNonce() uint64 { type DialBackResponse (line 537) | type DialBackResponse struct method Reset (line 544) | func (x *DialBackResponse) Reset() { method String (line 551) | func (x *DialBackResponse) String() string { method ProtoMessage (line 555) | func (*DialBackResponse) ProtoMessage() {} method ProtoReflect (line 557) | func (x *DialBackResponse) ProtoReflect() protoreflect.Message { method Descriptor (line 570) | func (*DialBackResponse) Descriptor() ([]byte, []int) { method GetStatus (line 574) | func (x *DialBackResponse) GetStatus() DialBackResponse_DialBackStatus { constant file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDesc (line 583) | file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDesc = "" + function file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP (line 630) | func file_p2p_protocol_autonatv2_pb_autonatv2_proto_rawDescGZIP() []byte { function init (line 666) | func init() { file_p2p_protocol_autonatv2_pb_autonatv2_proto_init() } function file_p2p_protocol_autonatv2_pb_autonatv2_proto_init (line 667) | func file_p2p_protocol_autonatv2_pb_autonatv2_proto_init() { FILE: p2p/protocol/autonatv2/server.go type EventDialRequestCompleted (line 35) | type EventDialRequestCompleted struct type server (line 46) | type server struct method Start (line 81) | func (as *server) Start(h host.Host) { method Close (line 86) | func (as *server) Close() { method handleDialRequest (line 93) | func (as *server) handleDialRequest(s network.Stream) { method serveDialRequest (line 115) | func (as *server) serveDialRequest(s network.Stream) EventDialRequestC... method dialBack (line 373) | func (as *server) dialBack(ctx context.Context, p peer.ID, addr ma.Mul... function newServer (line 62) | func newServer(dialer host.Host, s *autoNATSettings) *server { function getDialData (line 324) | func getDialData(w pbio.Writer, s network.Stream, msg *pb.Message, addrI... function readDialData (line 343) | func readDialData(numBytes int, r io.Reader) error { type rateLimiter (line 418) | type rateLimiter struct method init (line 445) | func (r *rateLimiter) init() { method Accept (line 452) | func (r *rateLimiter) Accept(p peer.ID) bool { method AcceptDialDataRequest (line 475) | func (r *rateLimiter) AcceptDialDataRequest() bool { method cleanup (line 495) | func (r *rateLimiter) cleanup(now time.Time) { method CompleteRequest (line 527) | func (r *rateLimiter) CompleteRequest(p peer.ID) { method Close (line 543) | func (r *rateLimiter) Close() { type entry (line 440) | type entry struct function amplificationAttackPrevention (line 554) | func amplificationAttackPrevention(observedAddr, dialAddr ma.Multiaddr) ... FILE: p2p/protocol/autonatv2/server_test.go function newTestRequests (line 28) | func newTestRequests(addrs []ma.Multiaddr, sendDialData bool) (reqs []Re... function TestServerInvalidAddrsRejected (line 36) | func TestServerInvalidAddrsRejected(t *testing.T) { function TestServerDataRequest (line 141) | func TestServerDataRequest(t *testing.T) { function TestServerMaxConcurrentRequestsPerPeer (line 191) | func TestServerMaxConcurrentRequestsPerPeer(t *testing.T) { function TestServerDataRequestJitter (line 255) | func TestServerDataRequestJitter(t *testing.T) { function TestServerDial (line 305) | func TestServerDial(t *testing.T) { function TestRateLimiter (line 357) | func TestRateLimiter(t *testing.T) { function TestRateLimiterConcurrentRequests (line 399) | func TestRateLimiterConcurrentRequests(t *testing.T) { function TestRateLimiterStress (line 423) | func TestRateLimiterStress(t *testing.T) { function TestReadDialData (line 478) | func TestReadDialData(t *testing.T) { function TestServerDataRequestWithAmplificationAttackPrevention (line 520) | func TestServerDataRequestWithAmplificationAttackPrevention(t *testing.T) { function TestDefaultAmplificationAttackPrevention (line 578) | func TestDefaultAmplificationAttackPrevention(t *testing.T) { function FuzzServerDialRequest (line 598) | func FuzzServerDialRequest(f *testing.F) { function FuzzReadDialData (line 626) | func FuzzReadDialData(f *testing.F) { function BenchmarkDialData (line 632) | func BenchmarkDialData(b *testing.B) { FILE: p2p/protocol/circuitv2/client/client.go type Client (line 26) | type Client struct method Start (line 68) | func (c *Client) Start() { method Close (line 72) | func (c *Client) Close() error { type accept (line 42) | type accept struct type completion (line 47) | type completion struct function New (line 55) | func New(h host.Host, upgrader transport.Upgrader) (*Client, error) { FILE: p2p/protocol/circuitv2/client/conn.go type statLimitDuration (line 19) | type statLimitDuration struct type statLimitData (line 20) | type statLimitData struct type Conn (line 27) | type Conn struct method Close (line 53) | func (c *Conn) Close() error { method Read (line 58) | func (c *Conn) Read(buf []byte) (int, error) { method Write (line 62) | func (c *Conn) Write(buf []byte) (int, error) { method SetDeadline (line 66) | func (c *Conn) SetDeadline(t time.Time) error { method SetReadDeadline (line 70) | func (c *Conn) SetReadDeadline(t time.Time) error { method SetWriteDeadline (line 74) | func (c *Conn) SetWriteDeadline(t time.Time) error { method RemoteMultiaddr (line 79) | func (c *Conn) RemoteMultiaddr() ma.Multiaddr { method LocalMultiaddr (line 92) | func (c *Conn) LocalMultiaddr() ma.Multiaddr { method LocalAddr (line 96) | func (c *Conn) LocalAddr() net.Addr { method RemoteAddr (line 105) | func (c *Conn) RemoteAddr() net.Addr { method Stat (line 115) | func (c *Conn) Stat() network.ConnStats { method tagHop (line 124) | func (c *Conn) tagHop() { method untagHop (line 137) | func (c *Conn) untagHop() { type NetAddr (line 35) | type NetAddr struct method Network (line 42) | func (n *NetAddr) Network() string { method String (line 46) | func (n *NetAddr) String() string { type capableConnWithStat (line 149) | type capableConnWithStat interface type capableConn (line 154) | type capableConn struct method ConnState (line 160) | func (c capableConn) ConnState() network.ConnectionState { FILE: p2p/protocol/circuitv2/client/dial.go constant maxMessageSize (line 18) | maxMessageSize = 4096 type relayError (line 24) | type relayError struct method Error (line 28) | func (e relayError) Error() string { function newRelayError (line 32) | func newRelayError(t string, args ...any) error { function isRelayError (line 36) | func isRelayError(err error) bool { method dial (line 42) | func (c *Client) dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (*... method dialPeer (line 117) | func (c *Client) dialPeer(ctx context.Context, relay, dest peer.AddrInfo... method connect (line 135) | func (c *Client) connect(s network.Stream, dest peer.AddrInfo) (*Conn, e... FILE: p2p/protocol/circuitv2/client/handlers.go method handleStreamV2 (line 16) | func (c *Client) handleStreamV2(s network.Stream) { FILE: p2p/protocol/circuitv2/client/listen.go type Listener (line 13) | type Listener method Accept (line 19) | func (l *Listener) Accept() (manet.Conn, error) { method Addr (line 43) | func (l *Listener) Addr() net.Addr { method Multiaddr (line 50) | func (l *Listener) Multiaddr() ma.Multiaddr { method Close (line 54) | func (l *Listener) Close() error { method Listener (line 15) | func (c *Client) Listener() *Listener { FILE: p2p/protocol/circuitv2/client/reservation.go type Reservation (line 22) | type Reservation struct type ReservationError (line 41) | type ReservationError struct method Error (line 53) | func (re ReservationError) Error() string { method Unwrap (line 57) | func (re ReservationError) Unwrap() error { function Reserve (line 63) | func Reserve(ctx context.Context, h host.Host, ai peer.AddrInfo) (*Reser... FILE: p2p/protocol/circuitv2/client/reservation_test.go function TestReservationFailures (line 24) | func TestReservationFailures(t *testing.T) { FILE: p2p/protocol/circuitv2/client/transport.go function AddTransport (line 21) | func AddTransport(h host.Host, upgrader transport.Upgrader) error { method SkipResolve (line 59) | func (c *Client) SkipResolve(_ context.Context, _ ma.Multiaddr) bool { method Dial (line 63) | func (c *Client) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (t... method dialAndUpgrade (line 77) | func (c *Client) dialAndUpgrade(ctx context.Context, a ma.Multiaddr, p p... method CanDial (line 93) | func (c *Client) CanDial(addr ma.Multiaddr) bool { method Listen (line 98) | func (c *Client) Listen(addr ma.Multiaddr) (transport.Listener, error) { method Protocols (line 107) | func (c *Client) Protocols() []int { method Proxy (line 111) | func (c *Client) Proxy() bool { FILE: p2p/protocol/circuitv2/pb/circuit.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type Status (line 24) | type Status method Enum (line 65) | func (x Status) Enum() *Status { method String (line 71) | func (x Status) String() string { method Descriptor (line 75) | func (Status) Descriptor() protoreflect.EnumDescriptor { method Type (line 79) | func (Status) Type() protoreflect.EnumType { method Number (line 83) | func (x Status) Number() protoreflect.EnumNumber { method EnumDescriptor (line 88) | func (Status) EnumDescriptor() ([]byte, []int) { constant Status_UNUSED (line 28) | Status_UNUSED Status = 0 constant Status_OK (line 29) | Status_OK Status = 100 constant Status_RESERVATION_REFUSED (line 30) | Status_RESERVATION_REFUSED Status = 200 constant Status_RESOURCE_LIMIT_EXCEEDED (line 31) | Status_RESOURCE_LIMIT_EXCEEDED Status = 201 constant Status_PERMISSION_DENIED (line 32) | Status_PERMISSION_DENIED Status = 202 constant Status_CONNECTION_FAILED (line 33) | Status_CONNECTION_FAILED Status = 203 constant Status_NO_RESERVATION (line 34) | Status_NO_RESERVATION Status = 204 constant Status_MALFORMED_MESSAGE (line 35) | Status_MALFORMED_MESSAGE Status = 400 constant Status_UNEXPECTED_MESSAGE (line 36) | Status_UNEXPECTED_MESSAGE Status = 401 type HopMessage_Type (line 92) | type HopMessage_Type method Enum (line 114) | func (x HopMessage_Type) Enum() *HopMessage_Type { method String (line 120) | func (x HopMessage_Type) String() string { method Descriptor (line 124) | func (HopMessage_Type) Descriptor() protoreflect.EnumDescriptor { method Type (line 128) | func (HopMessage_Type) Type() protoreflect.EnumType { method Number (line 132) | func (x HopMessage_Type) Number() protoreflect.EnumNumber { method EnumDescriptor (line 137) | func (HopMessage_Type) EnumDescriptor() ([]byte, []int) { constant HopMessage_RESERVE (line 95) | HopMessage_RESERVE HopMessage_Type = 0 constant HopMessage_CONNECT (line 96) | HopMessage_CONNECT HopMessage_Type = 1 constant HopMessage_STATUS (line 97) | HopMessage_STATUS HopMessage_Type = 2 type StopMessage_Type (line 141) | type StopMessage_Type method Enum (line 160) | func (x StopMessage_Type) Enum() *StopMessage_Type { method String (line 166) | func (x StopMessage_Type) String() string { method Descriptor (line 170) | func (StopMessage_Type) Descriptor() protoreflect.EnumDescriptor { method Type (line 174) | func (StopMessage_Type) Type() protoreflect.EnumType { method Number (line 178) | func (x StopMessage_Type) Number() protoreflect.EnumNumber { method EnumDescriptor (line 183) | func (StopMessage_Type) EnumDescriptor() ([]byte, []int) { constant StopMessage_CONNECT (line 144) | StopMessage_CONNECT StopMessage_Type = 0 constant StopMessage_STATUS (line 145) | StopMessage_STATUS StopMessage_Type = 1 type HopMessage (line 187) | type HopMessage struct method Reset (line 200) | func (x *HopMessage) Reset() { method String (line 207) | func (x *HopMessage) String() string { method ProtoMessage (line 211) | func (*HopMessage) ProtoMessage() {} method ProtoReflect (line 213) | func (x *HopMessage) ProtoReflect() protoreflect.Message { method Descriptor (line 226) | func (*HopMessage) Descriptor() ([]byte, []int) { method GetType (line 230) | func (x *HopMessage) GetType() HopMessage_Type { method GetPeer (line 237) | func (x *HopMessage) GetPeer() *Peer { method GetReservation (line 244) | func (x *HopMessage) GetReservation() *Reservation { method GetLimit (line 251) | func (x *HopMessage) GetLimit() *Limit { method GetStatus (line 258) | func (x *HopMessage) GetStatus() Status { type StopMessage (line 265) | type StopMessage struct method Reset (line 277) | func (x *StopMessage) Reset() { method String (line 284) | func (x *StopMessage) String() string { method ProtoMessage (line 288) | func (*StopMessage) ProtoMessage() {} method ProtoReflect (line 290) | func (x *StopMessage) ProtoReflect() protoreflect.Message { method Descriptor (line 303) | func (*StopMessage) Descriptor() ([]byte, []int) { method GetType (line 307) | func (x *StopMessage) GetType() StopMessage_Type { method GetPeer (line 314) | func (x *StopMessage) GetPeer() *Peer { method GetLimit (line 321) | func (x *StopMessage) GetLimit() *Limit { method GetStatus (line 328) | func (x *StopMessage) GetStatus() Status { type Peer (line 335) | type Peer struct method Reset (line 345) | func (x *Peer) Reset() { method String (line 352) | func (x *Peer) String() string { method ProtoMessage (line 356) | func (*Peer) ProtoMessage() {} method ProtoReflect (line 358) | func (x *Peer) ProtoReflect() protoreflect.Message { method Descriptor (line 371) | func (*Peer) Descriptor() ([]byte, []int) { method GetId (line 375) | func (x *Peer) GetId() []byte { method GetAddrs (line 382) | func (x *Peer) GetAddrs() [][]byte { type Reservation (line 389) | type Reservation struct method Reset (line 400) | func (x *Reservation) Reset() { method String (line 407) | func (x *Reservation) String() string { method ProtoMessage (line 411) | func (*Reservation) ProtoMessage() {} method ProtoReflect (line 413) | func (x *Reservation) ProtoReflect() protoreflect.Message { method Descriptor (line 426) | func (*Reservation) Descriptor() ([]byte, []int) { method GetExpire (line 430) | func (x *Reservation) GetExpire() uint64 { method GetAddrs (line 437) | func (x *Reservation) GetAddrs() [][]byte { method GetVoucher (line 444) | func (x *Reservation) GetVoucher() []byte { type Limit (line 451) | type Limit struct method Reset (line 459) | func (x *Limit) Reset() { method String (line 466) | func (x *Limit) String() string { method ProtoMessage (line 470) | func (*Limit) ProtoMessage() {} method ProtoReflect (line 472) | func (x *Limit) ProtoReflect() protoreflect.Message { method Descriptor (line 485) | func (*Limit) Descriptor() ([]byte, []int) { method GetDuration (line 489) | func (x *Limit) GetDuration() uint32 { method GetData (line 496) | func (x *Limit) GetData() uint64 { constant file_p2p_protocol_circuitv2_pb_circuit_proto_rawDesc (line 505) | file_p2p_protocol_circuitv2_pb_circuit_proto_rawDesc = "" + function file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP (line 572) | func file_p2p_protocol_circuitv2_pb_circuit_proto_rawDescGZIP() []byte { function init (line 608) | func init() { file_p2p_protocol_circuitv2_pb_circuit_proto_init() } function file_p2p_protocol_circuitv2_pb_circuit_proto_init (line 609) | func file_p2p_protocol_circuitv2_pb_circuit_proto_init() { FILE: p2p/protocol/circuitv2/pb/voucher.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type ReservationVoucher (line 24) | type ReservationVoucher struct method Reset (line 35) | func (x *ReservationVoucher) Reset() { method String (line 42) | func (x *ReservationVoucher) String() string { method ProtoMessage (line 46) | func (*ReservationVoucher) ProtoMessage() {} method ProtoReflect (line 48) | func (x *ReservationVoucher) ProtoReflect() protoreflect.Message { method Descriptor (line 61) | func (*ReservationVoucher) Descriptor() ([]byte, []int) { method GetRelay (line 65) | func (x *ReservationVoucher) GetRelay() []byte { method GetPeer (line 72) | func (x *ReservationVoucher) GetPeer() []byte { method GetExpiration (line 79) | func (x *ReservationVoucher) GetExpiration() uint64 { constant file_p2p_protocol_circuitv2_pb_voucher_proto_rawDesc (line 88) | file_p2p_protocol_circuitv2_pb_voucher_proto_rawDesc = "" + function file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescGZIP (line 107) | func file_p2p_protocol_circuitv2_pb_voucher_proto_rawDescGZIP() []byte { function init (line 126) | func init() { file_p2p_protocol_circuitv2_pb_voucher_proto_init() } function file_p2p_protocol_circuitv2_pb_voucher_proto_init (line 127) | func file_p2p_protocol_circuitv2_pb_voucher_proto_init() { FILE: p2p/protocol/circuitv2/proto/protocol.go constant ProtoIDv2Hop (line 4) | ProtoIDv2Hop = "/libp2p/circuit/relay/0.2.0/hop" constant ProtoIDv2Stop (line 5) | ProtoIDv2Stop = "/libp2p/circuit/relay/0.2.0/stop" FILE: p2p/protocol/circuitv2/proto/voucher.go constant RecordDomain (line 13) | RecordDomain = "libp2p-relay-rsvp" function init (line 18) | func init() { type ReservationVoucher (line 22) | type ReservationVoucher struct method Domain (line 33) | func (rv *ReservationVoucher) Domain() string { method Codec (line 37) | func (rv *ReservationVoucher) Codec() []byte { method MarshalRecord (line 41) | func (rv *ReservationVoucher) MarshalRecord() ([]byte, error) { method UnmarshalRecord (line 50) | func (rv *ReservationVoucher) UnmarshalRecord(blob []byte) error { FILE: p2p/protocol/circuitv2/proto/voucher_test.go function TestReservationVoucher (line 12) | func TestReservationVoucher(t *testing.T) { FILE: p2p/protocol/circuitv2/relay/acl.go type ACLFilter (line 10) | type ACLFilter interface FILE: p2p/protocol/circuitv2/relay/constraints.go type peerWithExpiry (line 22) | type peerWithExpiry struct type constraints (line 28) | type constraints struct method Reserve (line 50) | func (c *constraints) Reserve(p peer.ID, a ma.Multiaddr, expiry time.T... method cleanup (line 97) | func (c *constraints) cleanup(now time.Time) { method cleanupPeer (line 116) | func (c *constraints) cleanupPeer(p peer.ID) { function newConstraints (line 40) | func newConstraints(rc *Resources) *constraints { FILE: p2p/protocol/circuitv2/relay/constraints_test.go function randomIPv4Addr (line 16) | func randomIPv4Addr(t *testing.T) ma.Multiaddr { function TestConstraints (line 27) | func TestConstraints(t *testing.T) { function TestConstraintsCleanup (line 122) | func TestConstraintsCleanup(t *testing.T) { FILE: p2p/protocol/circuitv2/relay/metrics.go constant metricNamespace (line 11) | metricNamespace = "libp2p_relaysvc" constant requestStatusOK (line 101) | requestStatusOK = "ok" constant requestStatusRejected (line 102) | requestStatusRejected = "rejected" constant requestStatusError (line 103) | requestStatusError = "error" type MetricsTracer (line 107) | type MetricsTracer interface type metricsTracer (line 129) | type metricsTracer struct method RelayStatus (line 156) | func (mt *metricsTracer) RelayStatus(enabled bool) { method ConnectionOpened (line 164) | func (mt *metricsTracer) ConnectionOpened() { method ConnectionClosed (line 172) | func (mt *metricsTracer) ConnectionClosed(d time.Duration) { method ConnectionRequestHandled (line 181) | func (mt *metricsTracer) ConnectionRequestHandled(status pbv2.Status) { method ReservationAllowed (line 196) | func (mt *metricsTracer) ReservationAllowed(isRenewal bool) { method ReservationClosed (line 208) | func (mt *metricsTracer) ReservationClosed(cnt int) { method ReservationRequestHandled (line 216) | func (mt *metricsTracer) ReservationRequestHandled(status pbv2.Status) { method BytesTransferred (line 231) | func (mt *metricsTracer) BytesTransferred(cnt int) { type metricsTracerSetting (line 133) | type metricsTracerSetting struct type MetricsTracerOption (line 137) | type MetricsTracerOption function WithRegisterer (line 139) | func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption { function NewMetricsTracer (line 147) | func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer { function getResponseStatus (line 235) | func getResponseStatus(status pbv2.Status) string { function getRejectionReason (line 253) | func getRejectionReason(status pbv2.Status) string { FILE: p2p/protocol/circuitv2/relay/metrics_test.go function TestNoCoverNoAlloc (line 13) | func TestNoCoverNoAlloc(t *testing.T) { FILE: p2p/protocol/circuitv2/relay/options.go type Option (line 7) | type Option function WithResources (line 10) | func WithResources(rc Resources) Option { function WithLimit (line 18) | func WithLimit(limit *RelayLimit) Option { type ReservationAddressFilterFunc (line 26) | type ReservationAddressFilterFunc function WithReservationAddressFilter (line 30) | func WithReservationAddressFilter(filter ReservationAddressFilterFunc) (... function WithInfiniteLimits (line 38) | func WithInfiniteLimits() Option { function WithACL (line 46) | func WithACL(acl ACLFilter) Option { function WithMetricsTracer (line 54) | func WithMetricsTracer(mt MetricsTracer) Option { FILE: p2p/protocol/circuitv2/relay/relay.go constant ServiceName (line 28) | ServiceName = "libp2p.relay/v2" constant ReservationTagWeight (line 30) | ReservationTagWeight = 10 constant StreamTimeout (line 32) | StreamTimeout = time.Minute constant ConnectTimeout (line 33) | ConnectTimeout = 30 * time.Second constant HandshakeTimeout (line 34) | HandshakeTimeout = time.Minute constant relayHopTag (line 36) | relayHopTag = "relay-v2-hop" constant relayHopTagValue (line 37) | relayHopTagValue = 2 constant maxMessageSize (line 39) | maxMessageSize = 4096 type Relay (line 45) | type Relay struct method Close (line 117) | func (r *Relay) Close() error { method handleStream (line 137) | func (r *Relay) handleStream(s network.Stream) { method handleReserve (line 183) | func (r *Relay) handleReserve(s network.Stream) pbv2.Status { method handleConnect (line 258) | func (r *Relay) handleConnect(s network.Stream, msg *pbv2.HopMessage) ... method addConn (line 487) | func (r *Relay) addConn(p peer.ID) { method rmConn (line 496) | func (r *Relay) rmConn(p peer.ID) { method relayLimited (line 507) | func (r *Relay) relayLimited(src, dest network.Stream, srcID, destID p... method relayUnlimited (line 533) | func (r *Relay) relayUnlimited(src, dest network.Stream, srcID, destID... method copyWithBuffer (line 560) | func (r *Relay) copyWithBuffer(dst io.Writer, src io.Reader, buf []byt... method handleError (line 594) | func (r *Relay) handleError(s network.Stream, status pbv2.Status) { method writeResponse (line 605) | func (r *Relay) writeResponse(s network.Stream, status pbv2.Status, rs... method makeLimitMsg (line 684) | func (r *Relay) makeLimitMsg(_ peer.ID) *pbv2.Limit { method background (line 698) | func (r *Relay) background() { method gc (line 712) | func (r *Relay) gc() { method disconnected (line 736) | func (r *Relay) disconnected(n network.Network, c network.Conn) { function New (line 69) | func New(h host.Host, opts ...Option) (*Relay, error) { function makeReservationMsg (line 619) | func makeReservationMsg( function isRelayAddr (line 755) | func isRelayAddr(a ma.Multiaddr) bool { FILE: p2p/protocol/circuitv2/relay/relay_priv_test.go function genKeyAndID (line 17) | func genKeyAndID(t *testing.T) (crypto.PrivKey, peer.ID) { function TestMakeReservationWithP2PAddrs (line 28) | func TestMakeReservationWithP2PAddrs(t *testing.T) { FILE: p2p/protocol/circuitv2/relay/relay_test.go function getNetHosts (line 33) | func getNetHosts(t *testing.T, _ context.Context, n int) (hosts []host.H... function connect (line 85) | func connect(t *testing.T, a, b host.Host) { function addTransport (line 93) | func addTransport(t *testing.T, h host.Host, upgrader transport.Upgrader) { function TestBasicRelay (line 99) | func TestBasicRelay(t *testing.T) { function TestRelayLimitTime (line 206) | func TestRelayLimitTime(t *testing.T) { function TestRelayLimitData (line 279) | func TestRelayLimitData(t *testing.T) { FILE: p2p/protocol/circuitv2/relay/resources.go type Resources (line 8) | type Resources struct type RelayLimit (line 37) | type RelayLimit struct function DefaultResources (line 46) | func DefaultResources() Resources { function DefaultLimit (line 63) | func DefaultLimit() *RelayLimit { FILE: p2p/protocol/circuitv2/util/io.go type DelimitedReader (line 13) | type DelimitedReader struct method Close (line 32) | func (d *DelimitedReader) Close() { method ReadByte (line 39) | func (d *DelimitedReader) ReadByte() (byte, error) { method ReadMsg (line 45) | func (d *DelimitedReader) ReadMsg(msg proto.Message) error { function NewDelimitedReader (line 28) | func NewDelimitedReader(r io.Reader, maxSize int) *DelimitedReader { function NewDelimitedWriter (line 64) | func NewDelimitedWriter(w io.Writer) pbio.WriteCloser { FILE: p2p/protocol/circuitv2/util/pbconv.go function PeerToPeerInfoV2 (line 12) | func PeerToPeerInfoV2(p *pbv2.Peer) (peer.AddrInfo, error) { function PeerInfoToPeerV2 (line 34) | func PeerInfoToPeerV2(pi peer.AddrInfo) *pbv2.Peer { FILE: p2p/protocol/holepunch/filter.go function WithAddrFilter (line 14) | func WithAddrFilter(f AddrFilter) Option { type AddrFilter (line 22) | type AddrFilter interface FILE: p2p/protocol/holepunch/holepunch_test.go type mockEventTracer (line 33) | type mockEventTracer struct method Trace (line 38) | func (m *mockEventTracer) Trace(evt *holepunch.Event) { method getEvents (line 44) | func (m *mockEventTracer) getEvents() []*holepunch.Event { type mockMaddrFilter (line 53) | type mockMaddrFilter struct method FilterLocal (line 58) | func (m mockMaddrFilter) FilterLocal(remoteID peer.ID, maddrs []ma.Mul... method FilterRemote (line 62) | func (m mockMaddrFilter) FilterRemote(remoteID peer.ID, maddrs []ma.Mu... function newIDService (line 68) | func newIDService(t *testing.T, h host.Host) identify.IDService { function TestNoHolePunchIfDirectConnExists (line 76) | func TestNoHolePunchIfDirectConnExists(t *testing.T) { function TestDirectDialWorks (line 130) | func TestDirectDialWorks(t *testing.T) { function connectToRelay (line 188) | func connectToRelay(relayPtr *host.Host) libp2p.Option { function learnAddrs (line 206) | func learnAddrs(h1, h2 host.Host) { function pingAtoB (line 211) | func pingAtoB(t *testing.T, a, b host.Host) { function MustNewHost (line 225) | func MustNewHost(t *testing.T, opts ...libp2p.Option) host.Host { function TestEndToEndSimConnect (line 232) | func TestEndToEndSimConnect(t *testing.T) { function TestFailuresOnInitiator (line 313) | func TestFailuresOnInitiator(t *testing.T) { function addrsToBytes (line 424) | func addrsToBytes(as []ma.Multiaddr) [][]byte { function TestFailuresOnResponder (line 432) | func TestFailuresOnResponder(t *testing.T) { function ensureNoHolePunchingStream (line 576) | func ensureNoHolePunchingStream(t *testing.T, h1, h2 host.Host) { function ensureDirectConn (line 600) | func ensureDirectConn(t *testing.T, h1, h2 host.Host) { type MockSourceIPSelector (line 620) | type MockSourceIPSelector struct method PreferredSourceIPForDestination (line 624) | func (m *MockSourceIPSelector) PreferredSourceIPForDestination(_ *net.... function quicSimnet (line 628) | func quicSimnet(isPubliclyReachably bool, router *simnet.SimpleFirewallR... function addHolePunchService (line 646) | func addHolePunchService(t *testing.T, h host.Host, extraAddrs []ma.Mult... function waitForHolePunchingSvcActive (line 657) | func waitForHolePunchingSvcActive(t *testing.T, h host.Host) { function TestEndToEndSimConnectQUICReuse (line 670) | func TestEndToEndSimConnectQUICReuse(t *testing.T) { FILE: p2p/protocol/holepunch/holepuncher.go constant maxRetries (line 23) | maxRetries = 3 type holePuncher (line 30) | type holePuncher struct method beginDirectConnect (line 67) | func (hp *holePuncher) beginDirectConnect(p peer.ID) error { method DirectConnect (line 87) | func (hp *holePuncher) DirectConnect(p peer.ID) error { method directConnect (line 102) | func (hp *holePuncher) directConnect(rp peer.ID) error { method initiateHolePunch (line 186) | func (hp *holePuncher) initiateHolePunch(rp peer.ID) ([]ma.Multiaddr, ... method initiateHolePunchImpl (line 205) | func (hp *holePuncher) initiateHolePunchImpl(str network.Stream) ([]ma... method Close (line 264) | func (hp *holePuncher) Close() error { function newHolePuncher (line 53) | func newHolePuncher(h host.Host, ids identify.IDService, listenAddrs fun... type netNotifiee (line 273) | type netNotifiee method Connected (line 275) | func (nn *netNotifiee) Connected(_ network.Network, conn network.Conn) { method Disconnected (line 301) | func (nn *netNotifiee) Disconnected(_ network.Network, _ network.Conn) {} method Listen (line 302) | func (nn *netNotifiee) Listen(_ network.Network, _ ma.Multiaddr) {} method ListenClose (line 303) | func (nn *netNotifiee) ListenClose(_ network.Network, _ ma.Multiaddr) {} FILE: p2p/protocol/holepunch/metrics.go constant metricNamespace (line 10) | metricNamespace = "libp2p_holepunch" type MetricsTracer (line 45) | type MetricsTracer interface type metricsTracer (line 50) | type metricsTracer struct method HolePunchFinished (line 108) | func (mt *metricsTracer) HolePunchFinished(side string, numAttempts int, method DirectDialFinished (line 178) | func (mt *metricsTracer) DirectDialFinished(success bool) { type metricsTracerSetting (line 54) | type metricsTracerSetting struct type MetricsTracerOption (line 58) | type MetricsTracerOption function WithRegisterer (line 60) | func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption { function NewMetricsTracer (line 68) | func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer { function getNumAttemptString (line 170) | func getNumAttemptString(numAttempt int) string { FILE: p2p/protocol/holepunch/metrics_noalloc_test.go function TestNoCoverNoAllocMetrics (line 13) | func TestNoCoverNoAllocMetrics(t *testing.T) { FILE: p2p/protocol/holepunch/metrics_test.go function getCounterValue (line 12) | func getCounterValue(t *testing.T, counter *prometheus.CounterVec, label... function TestHolePunchOutcomeCounter (line 23) | func TestHolePunchOutcomeCounter(t *testing.T) { type mockConnMultiaddrs (line 89) | type mockConnMultiaddrs struct method LocalMultiaddr (line 93) | func (cma *mockConnMultiaddrs) LocalMultiaddr() ma.Multiaddr { method RemoteMultiaddr (line 97) | func (cma *mockConnMultiaddrs) RemoteMultiaddr() ma.Multiaddr { FILE: p2p/protocol/holepunch/pb/holepunch.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type HolePunch_Type (line 24) | type HolePunch_Type method Enum (line 43) | func (x HolePunch_Type) Enum() *HolePunch_Type { method String (line 49) | func (x HolePunch_Type) String() string { method Descriptor (line 53) | func (HolePunch_Type) Descriptor() protoreflect.EnumDescriptor { method Type (line 57) | func (HolePunch_Type) Type() protoreflect.EnumType { method Number (line 61) | func (x HolePunch_Type) Number() protoreflect.EnumNumber { method UnmarshalJSON (line 66) | func (x *HolePunch_Type) UnmarshalJSON(b []byte) error { method EnumDescriptor (line 76) | func (HolePunch_Type) EnumDescriptor() ([]byte, []int) { constant HolePunch_CONNECT (line 27) | HolePunch_CONNECT HolePunch_Type = 100 constant HolePunch_SYNC (line 28) | HolePunch_SYNC HolePunch_Type = 300 type HolePunch (line 81) | type HolePunch struct method Reset (line 89) | func (x *HolePunch) Reset() { method String (line 96) | func (x *HolePunch) String() string { method ProtoMessage (line 100) | func (*HolePunch) ProtoMessage() {} method ProtoReflect (line 102) | func (x *HolePunch) ProtoReflect() protoreflect.Message { method Descriptor (line 115) | func (*HolePunch) Descriptor() ([]byte, []int) { method GetType (line 119) | func (x *HolePunch) GetType() HolePunch_Type { method GetObsAddrs (line 126) | func (x *HolePunch) GetObsAddrs() [][]byte { constant file_p2p_protocol_holepunch_pb_holepunch_proto_rawDesc (line 135) | file_p2p_protocol_holepunch_pb_holepunch_proto_rawDesc = "" + function file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescGZIP (line 150) | func file_p2p_protocol_holepunch_pb_holepunch_proto_rawDescGZIP() []byte { function init (line 172) | func init() { file_p2p_protocol_holepunch_pb_holepunch_proto_init() } function file_p2p_protocol_holepunch_pb_holepunch_proto_init (line 173) | func file_p2p_protocol_holepunch_pb_holepunch_proto_init() { FILE: p2p/protocol/holepunch/svc.go constant defaultDirectDialTimeout (line 22) | defaultDirectDialTimeout = 10 * time.Second constant Protocol (line 25) | Protocol protocol.ID = "/libp2p/dcutr" constant ServiceName (line 33) | ServiceName = "libp2p.holepunch" constant maxMsgSize (line 35) | maxMsgSize = 4 * 1024 type Option (line 41) | type Option function DirectDialTimeout (line 43) | func DirectDialTimeout(timeout time.Duration) Option { type Service (line 51) | type Service struct method waitForPublicAddr (line 113) | func (s *Service) waitForPublicAddr() { method Close (line 157) | func (s *Service) Close() error { method incomingHolePunch (line 171) | func (s *Service) incomingHolePunch(str network.Stream) (rtt time.Dura... method handleNewStream (line 237) | func (s *Service) handleNewStream(str network.Stream) { method DirectConnect (line 283) | func (s *Service) DirectConnect(p peer.ID) error { function NewService (line 83) | func NewService(h host.Host, ids identify.IDService, listenAddrs func() ... FILE: p2p/protocol/holepunch/tracer.go constant tracerGCInterval (line 15) | tracerGCInterval = 2 * time.Minute constant tracerCacheDuration (line 16) | tracerCacheDuration = 5 * time.Minute function WithTracer (line 20) | func WithTracer(et EventTracer) Option { function WithMetricsTracer (line 33) | func WithMetricsTracer(mt MetricsTracer) Option { function WithMetricsAndEventTracer (line 46) | func WithMetricsAndEventTracer(mt MetricsTracer, et EventTracer) Option { type tracer (line 58) | type tracer struct method DirectDialSuccessful (line 124) | func (t *tracer) DirectDialSuccessful(p peer.ID, dt time.Duration) { method DirectDialFailed (line 147) | func (t *tracer) DirectDialFailed(p peer.ID, dt time.Duration, err err... method ProtocolError (line 171) | func (t *tracer) ProtocolError(p peer.ID, err error) { method StartHolePunch (line 185) | func (t *tracer) StartHolePunch(p peer.ID, obsAddrs []ma.Multiaddr, rt... method EndHolePunch (line 205) | func (t *tracer) EndHolePunch(p peer.ID, dt time.Duration, err error) { method HolePunchFinished (line 225) | func (t *tracer) HolePunchFinished(side string, numAttempts int, their... method HolePunchAttempt (line 231) | func (t *tracer) HolePunchAttempt(p peer.ID) { method gc (line 254) | func (t *tracer) gc() { method Start (line 276) | func (t *tracer) Start() { method Close (line 284) | func (t *tracer) Close() error { type peerInfo (line 71) | type peerInfo struct type EventTracer (line 76) | type EventTracer interface type Event (line 80) | type Event struct constant DirectDialEvtT (line 90) | DirectDialEvtT = "DirectDial" constant ProtocolErrorEvtT (line 91) | ProtocolErrorEvtT = "ProtocolError" constant StartHolePunchEvtT (line 92) | StartHolePunchEvtT = "StartHolePunch" constant EndHolePunchEvtT (line 93) | EndHolePunchEvtT = "EndHolePunch" constant HolePunchAttemptEvtT (line 94) | HolePunchAttemptEvtT = "HolePunchAttempt" type DirectDialEvt (line 98) | type DirectDialEvt struct type ProtocolErrorEvt (line 104) | type ProtocolErrorEvt struct type StartHolePunchEvt (line 108) | type StartHolePunchEvt struct type EndHolePunchEvt (line 113) | type EndHolePunchEvt struct type HolePunchAttemptEvt (line 119) | type HolePunchAttemptEvt struct FILE: p2p/protocol/holepunch/util.go function removeRelayAddrs (line 14) | func removeRelayAddrs(addrs []ma.Multiaddr) []ma.Multiaddr { function isRelayAddress (line 18) | func isRelayAddress(a ma.Multiaddr) bool { function addrsToBytes (line 23) | func addrsToBytes(as []ma.Multiaddr) [][]byte { function addrsFromBytes (line 31) | func addrsFromBytes(bzs [][]byte) []ma.Multiaddr { function getDirectConnection (line 42) | func getDirectConnection(h host.Host, p peer.ID) network.Conn { function holePunchConnect (line 51) | func holePunchConnect(ctx context.Context, host host.Host, pi peer.AddrI... FILE: p2p/protocol/identify/id.go constant ID (line 39) | ID = "/ipfs/id/1.0.0" constant IDPush (line 42) | IDPush = "/ipfs/id/push/1.0.0" constant DefaultTimeout (line 44) | DefaultTimeout = 5 * time.Second constant ServiceName (line 46) | ServiceName = "libp2p.identify" constant legacyIDSize (line 48) | legacyIDSize = 2 * 1024 constant signedIDSize (line 49) | signedIDSize = 8 * 1024 constant maxOwnIdentifyMsgSize (line 50) | maxOwnIdentifyMsgSize = 4 * 1024 constant maxMessages (line 51) | maxMessages = 10 constant maxPushConcurrency (line 52) | maxPushConcurrency = 32 constant recentlyConnectedPeerMaxAddrs (line 56) | recentlyConnectedPeerMaxAddrs = 20 constant connectedPeerMaxAddrs (line 57) | connectedPeerMaxAddrs = 500 type identifySnapshot (line 75) | type identifySnapshot struct method Equal (line 84) | func (s identifySnapshot) Equal(other *identifySnapshot) bool { type IDService (line 107) | type IDService interface type identifyPushSupport (line 121) | type identifyPushSupport constant identifyPushSupportUnknown (line 124) | identifyPushSupportUnknown identifyPushSupport = iota constant identifyPushSupported (line 125) | identifyPushSupported constant identifyPushUnsupported (line 126) | identifyPushUnsupported type entry (line 129) | type entry struct type idService (line 149) | type idService struct method Start (line 241) | func (ids *idService) Start() { method loop (line 252) | func (ids *idService) loop(ctx context.Context) { method sendPushes (line 307) | func (ids *idService) sendPushes(ctx context.Context) { method Close (line 361) | func (ids *idService) Close() error { method IdentifyConn (line 370) | func (ids *idService) IdentifyConn(c network.Conn) { method IdentifyWait (line 378) | func (ids *idService) IdentifyWait(c network.Conn) <-chan struct{} { method identifyConn (line 444) | func (ids *idService) identifyConn(c network.Conn) error { method handlePush (line 457) | func (ids *idService) handlePush(s network.Stream) { method handleIdentifyRequest (line 464) | func (ids *idService) handleIdentifyRequest(s network.Stream) { method sendIdentifyResp (line 468) | func (ids *idService) sendIdentifyResp(s network.Stream, isPush bool) ... method handleIdentifyResponse (line 508) | func (ids *idService) handleIdentifyResponse(s network.Stream, isPush ... method updateSnapshot (line 580) | func (ids *idService) updateSnapshot() (updated bool) { method writeChunkedIdentifyMsg (line 618) | func (ids *idService) writeChunkedIdentifyMsg(s network.Stream, mes *p... method createBaseIdentifyResponse (line 634) | func (ids *idService) createBaseIdentifyResponse(conn network.Conn, sn... method getSignedRecord (line 686) | func (ids *idService) getSignedRecord(snapshot *identifySnapshot) []by... method consumeMessage (line 724) | func (ids *idService) consumeMessage(mes *pb.Identify, c network.Conn,... method consumeSignedPeerRecord (line 839) | func (ids *idService) consumeSignedPeerRecord(p peer.ID, signedPeerRec... method consumeReceivedPubKey (line 867) | func (ids *idService) consumeReceivedPubKey(c network.Conn, kb []byte) { method addConnWithLock (line 998) | func (ids *idService) addConnWithLock(c network.Conn) { function NewIDService (line 189) | func NewIDService(h host.Host, opts ...Option) (*idService, error) { function newStreamAndNegotiate (line 419) | func newStreamAndNegotiate(ctx context.Context, c network.Conn, proto pr... function readAllIDMessages (line 564) | func readAllIDMessages(r pbio.Reader, finalMsg proto.Message) error { function diff (line 701) | func diff(a, b []protocol.ID) (added, removed []protocol.ID) { function HasConsistentTransport (line 972) | func HasConsistentTransport(a ma.Multiaddr, green []ma.Multiaddr) bool { function signedPeerRecordFromMessage (line 1006) | func signedPeerRecordFromMessage(msg *pb.Identify) (*record.Envelope, er... type netNotifiee (line 1015) | type netNotifiee method IDService (line 1017) | func (nn *netNotifiee) IDService() *idService { method Connected (line 1021) | func (nn *netNotifiee) Connected(_ network.Network, c network.Conn) { method Disconnected (line 1031) | func (nn *netNotifiee) Disconnected(_ network.Network, c network.Conn) { method Listen (line 1067) | func (nn *netNotifiee) Listen(_ network.Network, _ ma.Multiaddr) {} method ListenClose (line 1068) | func (nn *netNotifiee) ListenClose(_ network.Network, _ ma.Multiaddr) {} function filterAddrs (line 1076) | func filterAddrs(addrs []ma.Multiaddr, remote ma.Multiaddr) []ma.Multiad... function trimHostAddrList (line 1089) | func trimHostAddrList(addrs []ma.Multiaddr, maxSize int) []ma.Multiaddr { FILE: p2p/protocol/identify/id_glass_test.go function TestFastDisconnect (line 22) | func TestFastDisconnect(t *testing.T) { function TestWrongSignedPeerRecord (line 91) | func TestWrongSignedPeerRecord(t *testing.T) { function TestInvalidSignedPeerRecord (line 125) | func TestInvalidSignedPeerRecord(t *testing.T) { function TestIncomingAddrFilter (line 178) | func TestIncomingAddrFilter(t *testing.T) { FILE: p2p/protocol/identify/id_test.go function testKnowsAddrs (line 41) | func testKnowsAddrs(t *testing.T, h host.Host, p peer.ID, expected []ma.... function testHasAgentVersion (line 46) | func testHasAgentVersion(t *testing.T, h host.Host, p peer.ID) { function testHasPublicKey (line 52) | func testHasPublicKey(t *testing.T, h host.Host, p peer.ID, shouldBe ic.... function emitAddrChangeEvt (line 75) | func emitAddrChangeEvt(t *testing.T, h host.Host) { function TestIDService (line 110) | func TestIDService(t *testing.T) { function assertCorrectEvtPeerIdentificationCompleted (line 217) | func assertCorrectEvtPeerIdentificationCompleted(t *testing.T, evtAny an... function TestProtoMatching (line 251) | func TestProtoMatching(t *testing.T) { function TestLocalhostAddrFiltering (line 266) | func TestLocalhostAddrFiltering(t *testing.T) { function TestIdentifyPushWhileIdentifyingConn (line 364) | func TestIdentifyPushWhileIdentifyingConn(t *testing.T) { function TestIdentifyPushOnAddrChange (line 437) | func TestIdentifyPushOnAddrChange(t *testing.T) { function TestUserAgent (line 510) | func TestUserAgent(t *testing.T) { function TestNotListening (line 538) | func TestNotListening(t *testing.T) { function TestSendPush (line 562) | func TestSendPush(t *testing.T) { function TestLargeIdentifyMessage (line 602) | func TestLargeIdentifyMessage(t *testing.T) { function randString (line 717) | func randString(n int) string { function TestLargePushMessage (line 726) | func TestLargePushMessage(t *testing.T) { function TestIdentifyResponseReadTimeout (line 801) | func TestIdentifyResponseReadTimeout(t *testing.T) { function TestIncomingIDStreamsTimeout (line 840) | func TestIncomingIDStreamsTimeout(t *testing.T) { function TestOutOfOrderConnectedNotifs (line 880) | func TestOutOfOrderConnectedNotifs(t *testing.T) { function waitForAddrInStream (line 921) | func waitForAddrInStream(t *testing.T, s <-chan ma.Multiaddr, expected m... function waitForDisconnectNotification (line 936) | func waitForDisconnectNotification(swarm *swarm.Swarm) <-chan struct{} { FILE: p2p/protocol/identify/internal/user-agent/user_agent.go function DefaultUserAgent (line 8) | func DefaultUserAgent() string { function init (line 14) | func init() { FILE: p2p/protocol/identify/metrics.go constant metricNamespace (line 11) | metricNamespace = "libp2p_identify" type MetricsTracer (line 93) | type MetricsTracer interface type metricsTracer (line 107) | type metricsTracer struct method TriggeredPushes (line 134) | func (t *metricsTracer) TriggeredPushes(ev any) { method IncrementPushSupport (line 149) | func (t *metricsTracer) IncrementPushSupport(s identifyPushSupport) { method IdentifySent (line 157) | func (t *metricsTracer) IdentifySent(isPush bool, numProtocols int, nu... method IdentifyReceived (line 173) | func (t *metricsTracer) IdentifyReceived(isPush bool, numProtocols int... method ConnPushSupport (line 189) | func (t *metricsTracer) ConnPushSupport(support identifyPushSupport) { type metricsTracerSetting (line 111) | type metricsTracerSetting struct type MetricsTracerOption (line 115) | type MetricsTracerOption function WithRegisterer (line 117) | func WithRegisterer(reg prometheus.Registerer) MetricsTracerOption { function NewMetricsTracer (line 125) | func NewMetricsTracer(opts ...MetricsTracerOption) MetricsTracer { function getPushSupport (line 197) | func getPushSupport(s identifyPushSupport) string { FILE: p2p/protocol/identify/metrics_test.go function TestMetricsNoAllocNoCover (line 12) | func TestMetricsNoAllocNoCover(t *testing.T) { FILE: p2p/protocol/identify/opts.go type config (line 5) | type config struct type Option (line 14) | type Option function ProtocolVersion (line 18) | func ProtocolVersion(s string) Option { function UserAgent (line 25) | func UserAgent(ua string) Option { function DisableSignedPeerRecord (line 33) | func DisableSignedPeerRecord() Option { function WithMetricsTracer (line 39) | func WithMetricsTracer(tr MetricsTracer) Option { function WithTimeout (line 46) | func WithTimeout(timeout time.Duration) Option { FILE: p2p/protocol/identify/pb/identify.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type Identify (line 24) | type Identify struct method Reset (line 53) | func (x *Identify) Reset() { method String (line 60) | func (x *Identify) String() string { method ProtoMessage (line 64) | func (*Identify) ProtoMessage() {} method ProtoReflect (line 66) | func (x *Identify) ProtoReflect() protoreflect.Message { method Descriptor (line 79) | func (*Identify) Descriptor() ([]byte, []int) { method GetProtocolVersion (line 83) | func (x *Identify) GetProtocolVersion() string { method GetAgentVersion (line 90) | func (x *Identify) GetAgentVersion() string { method GetPublicKey (line 97) | func (x *Identify) GetPublicKey() []byte { method GetListenAddrs (line 104) | func (x *Identify) GetListenAddrs() [][]byte { method GetObservedAddr (line 111) | func (x *Identify) GetObservedAddr() []byte { method GetProtocols (line 118) | func (x *Identify) GetProtocols() []string { method GetSignedPeerRecord (line 125) | func (x *Identify) GetSignedPeerRecord() []byte { constant file_p2p_protocol_identify_pb_identify_proto_rawDesc (line 134) | file_p2p_protocol_identify_pb_identify_proto_rawDesc = "" + function file_p2p_protocol_identify_pb_identify_proto_rawDescGZIP (line 151) | func file_p2p_protocol_identify_pb_identify_proto_rawDescGZIP() []byte { function init (line 170) | func init() { file_p2p_protocol_identify_pb_identify_proto_init() } function file_p2p_protocol_identify_pb_identify_proto_init (line 171) | func file_p2p_protocol_identify_pb_identify_proto_init() { FILE: p2p/protocol/identify/snapshot_test.go function TestSnapshotEquality (line 15) | func TestSnapshotEquality(t *testing.T) { FILE: p2p/protocol/ping/ping.go constant PingSize (line 23) | PingSize = 32 constant pingTimeout (line 24) | pingTimeout = 10 * time.Second constant pingDuration (line 25) | pingDuration = 30 * time.Second constant ID (line 27) | ID = "/ipfs/ping/1.0.0" constant ServiceName (line 29) | ServiceName = "libp2p.ping" type PingService (line 32) | type PingService struct method PingHandler (line 42) | func (p *PingService) PingHandler(s network.Stream) { method Ping (line 103) | func (ps *PingService) Ping(ctx context.Context, p peer.ID) <-chan Res... function NewPingService (line 36) | func NewPingService(h host.Host) *PingService { type Result (line 98) | type Result struct function pingError (line 107) | func pingError(err error) chan Result { function Ping (line 116) | func Ping(ctx context.Context, h host.Host, p peer.ID) <-chan Result { function ping (line 172) | func ping(s network.Stream, randReader io.Reader) (time.Duration, error) { FILE: p2p/protocol/ping/ping_test.go function TestPing (line 17) | func TestPing(t *testing.T) { function testPing (line 41) | func testPing(t *testing.T, ps *ping.PingService, p peer.ID) { FILE: p2p/security/insecure/insecure.go constant ID (line 26) | ID = "/plaintext/2.0.0" type Transport (line 33) | type Transport struct method LocalPeer (line 52) | func (t *Transport) LocalPeer() peer.ID { method SecureInbound (line 63) | func (t *Transport) SecureInbound(_ context.Context, insecure net.Conn... method SecureOutbound (line 89) | func (t *Transport) SecureOutbound(_ context.Context, insecure net.Con... method ID (line 108) | func (t *Transport) ID() protocol.ID { return t.protocolID } function NewWithIdentity (line 43) | func NewWithIdentity(protocolID protocol.ID, id peer.ID, key ci.PrivKey)... type Conn (line 111) | type Conn struct method runHandshakeSync (line 134) | func (ic *Conn) runHandshakeSync() error { method LocalPeer (line 209) | func (ic *Conn) LocalPeer() peer.ID { method RemotePeer (line 215) | func (ic *Conn) RemotePeer() peer.ID { method RemotePublicKey (line 221) | func (ic *Conn) RemotePublicKey() ci.PubKey { method ConnState (line 226) | func (ic *Conn) ConnState() network.ConnectionState { function makeExchangeMessage (line 118) | func makeExchangeMessage(pubkey ci.PubKey) (*pb.Exchange, error) { function readWriteMsg (line 177) | func readWriteMsg(rw io.ReadWriter, out *pb.Exchange) (*pb.Exchange, err... FILE: p2p/security/insecure/insecure_test.go function TestConnections (line 17) | func TestConnections(t *testing.T) { function TestPeerIdMatchInbound (line 29) | func TestPeerIdMatchInbound(t *testing.T) { function TestPeerIDMismatchInbound (line 41) | func TestPeerIDMismatchInbound(t *testing.T) { function TestPeerIDMismatchOutbound (line 50) | func TestPeerIDMismatchOutbound(t *testing.T) { function newTestTransport (line 59) | func newTestTransport(t *testing.T, typ, bits int) *Transport { function newConnPair (line 68) | func newConnPair(t *testing.T) (net.Conn, net.Conn) { function connect (line 91) | func connect(t *testing.T, clientTpt, serverTpt *Transport, clientExpect... function testIDs (line 105) | func testIDs(t *testing.T, clientTpt, serverTpt *Transport, clientConn, ... function testKeys (line 113) | func testKeys(t *testing.T, clientTpt, serverTpt *Transport, clientConn,... function testReadWrite (line 120) | func testReadWrite(t *testing.T, clientConn, serverConn sec.SecureConn) { FILE: p2p/security/insecure/pb/plaintext.pb.go constant _ (line 20) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 22) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type Exchange (line 25) | type Exchange struct method Reset (line 33) | func (x *Exchange) Reset() { method String (line 40) | func (x *Exchange) String() string { method ProtoMessage (line 44) | func (*Exchange) ProtoMessage() {} method ProtoReflect (line 46) | func (x *Exchange) ProtoReflect() protoreflect.Message { method Descriptor (line 59) | func (*Exchange) Descriptor() ([]byte, []int) { method GetId (line 63) | func (x *Exchange) GetId() []byte { method GetPubkey (line 70) | func (x *Exchange) GetPubkey() *pb.PublicKey { constant file_p2p_security_insecure_pb_plaintext_proto_rawDesc (line 79) | file_p2p_security_insecure_pb_plaintext_proto_rawDesc = "" + function file_p2p_security_insecure_pb_plaintext_proto_rawDescGZIP (line 91) | func file_p2p_security_insecure_pb_plaintext_proto_rawDescGZIP() []byte { function init (line 112) | func init() { file_p2p_security_insecure_pb_plaintext_proto_init() } function file_p2p_security_insecure_pb_plaintext_proto_init (line 113) | func file_p2p_security_insecure_pb_plaintext_proto_init() { FILE: p2p/security/noise/benchmark_test.go type testMode (line 17) | type testMode constant readBufferGtEncMsg (line 20) | readBufferGtEncMsg testMode = iota constant readBufferLtPlainText (line 21) | readBufferLtPlainText function makeTransport (line 35) | func makeTransport(b *testing.B) *Transport { type benchenv (line 49) | type benchenv struct method connect (line 71) | func (b benchenv) connect(stopTimer bool) (*secureSession, *secureSess... method benchHandshake (line 229) | func (b benchenv) benchHandshake() { function setupEnv (line 57) | func setupEnv(b *testing.B) *benchenv { function drain (line 101) | func drain(r io.Reader, done chan<- error, writeTo io.Writer) { type discardWithBuffer (line 106) | type discardWithBuffer struct method ReadFrom (line 111) | func (d *discardWithBuffer) ReadFrom(r io.Reader) (n int64, err error) { function sink (line 125) | func sink(dst io.WriteCloser, src io.Reader, done chan<- error, buf []by... function pipeRandom (line 133) | func pipeRandom(src rand.Source, w io.WriteCloser, r io.Reader, n int64,... function benchDataTransfer (line 164) | func benchDataTransfer(b *benchenv, dataSize int64, m testMode) { function BenchmarkTransfer1MB (line 204) | func BenchmarkTransfer1MB(b *testing.B) { function BenchmarkTransfer100MB (line 213) | func BenchmarkTransfer100MB(b *testing.B) { function BenchmarkTransfer500Mb (line 221) | func BenchmarkTransfer500Mb(b *testing.B) { function BenchmarkHandshakeXX (line 248) | func BenchmarkHandshakeXX(b *testing.B) { FILE: p2p/security/noise/crypto.go method encrypt (line 22) | func (s *secureSession) encrypt(out, plaintext []byte) ([]byte, error) { method decrypt (line 41) | func (s *secureSession) decrypt(out, ciphertext []byte) ([]byte, error) { FILE: p2p/security/noise/crypto_test.go function TestEncryptAndDecrypt_InitToResp (line 12) | func TestEncryptAndDecrypt_InitToResp(t *testing.T) { function TestEncryptAndDecrypt_RespToInit (line 47) | func TestEncryptAndDecrypt_RespToInit(t *testing.T) { function TestCryptoFailsIfCiphertextIsAltered (line 69) | func TestCryptoFailsIfCiphertextIsAltered(t *testing.T) { function TestCryptoFailsIfHandshakeIncomplete (line 91) | func TestCryptoFailsIfHandshakeIncomplete(t *testing.T) { FILE: p2p/security/noise/handshake.go constant payloadSigPrefix (line 24) | payloadSigPrefix = "noise-libp2p-static-key:" method runHandshake (line 31) | func (s *secureSession) runHandshake(ctx context.Context) (err error) { method setCipherStates (line 150) | func (s *secureSession) setCipherStates(cs1, cs2 *noise.CipherState) { method sendHandshakeMessage (line 165) | func (s *secureSession) sendHandshakeMessage(hs *noise.HandshakeState, p... method readHandshakeMessage (line 194) | func (s *secureSession) readHandshakeMessage(hs *noise.HandshakeState) (... method generateHandshakePayload (line 219) | func (s *secureSession) generateHandshakePayload(localStatic noise.DHKey... method handleRemoteHandshakePayload (line 249) | func (s *secureSession) handleRemoteHandshakePayload(payload []byte, rem... FILE: p2p/security/noise/pb/payload.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type NoiseExtensions (line 24) | type NoiseExtensions struct method Reset (line 32) | func (x *NoiseExtensions) Reset() { method String (line 39) | func (x *NoiseExtensions) String() string { method ProtoMessage (line 43) | func (*NoiseExtensions) ProtoMessage() {} method ProtoReflect (line 45) | func (x *NoiseExtensions) ProtoReflect() protoreflect.Message { method Descriptor (line 58) | func (*NoiseExtensions) Descriptor() ([]byte, []int) { method GetWebtransportCerthashes (line 62) | func (x *NoiseExtensions) GetWebtransportCerthashes() [][]byte { method GetStreamMuxers (line 69) | func (x *NoiseExtensions) GetStreamMuxers() []string { type NoiseHandshakePayload (line 76) | type NoiseHandshakePayload struct method Reset (line 85) | func (x *NoiseHandshakePayload) Reset() { method String (line 92) | func (x *NoiseHandshakePayload) String() string { method ProtoMessage (line 96) | func (*NoiseHandshakePayload) ProtoMessage() {} method ProtoReflect (line 98) | func (x *NoiseHandshakePayload) ProtoReflect() protoreflect.Message { method Descriptor (line 111) | func (*NoiseHandshakePayload) Descriptor() ([]byte, []int) { method GetIdentityKey (line 115) | func (x *NoiseHandshakePayload) GetIdentityKey() []byte { method GetIdentitySig (line 122) | func (x *NoiseHandshakePayload) GetIdentitySig() []byte { method GetExtensions (line 129) | func (x *NoiseHandshakePayload) GetExtensions() *NoiseExtensions { constant file_p2p_security_noise_pb_payload_proto_rawDesc (line 138) | file_p2p_security_noise_pb_payload_proto_rawDesc = "" + function file_p2p_security_noise_pb_payload_proto_rawDescGZIP (line 156) | func file_p2p_security_noise_pb_payload_proto_rawDescGZIP() []byte { function init (line 177) | func init() { file_p2p_security_noise_pb_payload_proto_init() } function file_p2p_security_noise_pb_payload_proto_init (line 178) | func file_p2p_security_noise_pb_payload_proto_init() { FILE: p2p/security/noise/rw.go constant MaxTransportMsgLength (line 13) | MaxTransportMsgLength = 0xffff constant MaxPlaintextLength (line 17) | MaxPlaintextLength = MaxTransportMsgLength - chacha20poly1305.Overhead constant LengthPrefixLength (line 21) | LengthPrefixLength = 2 method Read (line 26) | func (s *secureSession) Read(buf []byte) (int, error) { method Write (line 91) | func (s *secureSession) Write(data []byte) (int, error) { method readNextInsecureMsgLen (line 129) | func (s *secureSession) readNextInsecureMsgLen() (int, error) { method readNextMsgInsecure (line 143) | func (s *secureSession) readNextMsgInsecure(buf []byte) error { method writeMsgInsecure (line 150) | func (s *secureSession) writeMsgInsecure(data []byte) (int, error) { FILE: p2p/security/noise/session.go type secureSession (line 18) | type secureSession struct method LocalAddr (line 90) | func (s *secureSession) LocalAddr() net.Addr { method LocalPeer (line 94) | func (s *secureSession) LocalPeer() peer.ID { method LocalPublicKey (line 98) | func (s *secureSession) LocalPublicKey() crypto.PubKey { method RemoteAddr (line 102) | func (s *secureSession) RemoteAddr() net.Addr { method RemotePeer (line 106) | func (s *secureSession) RemotePeer() peer.ID { method RemotePublicKey (line 110) | func (s *secureSession) RemotePublicKey() crypto.PubKey { method ConnState (line 114) | func (s *secureSession) ConnState() network.ConnectionState { method SetDeadline (line 118) | func (s *secureSession) SetDeadline(t time.Time) error { method SetReadDeadline (line 122) | func (s *secureSession) SetReadDeadline(t time.Time) error { method SetWriteDeadline (line 126) | func (s *secureSession) SetWriteDeadline(t time.Time) error { method Close (line 130) | func (s *secureSession) Close() error { function newSecureSession (line 52) | func newSecureSession(tpt *Transport, ctx context.Context, insecure net.... function SessionWithConnState (line 134) | func SessionWithConnState(s *secureSession, muxer protocol.ID) *secureSe... FILE: p2p/security/noise/session_test.go function TestContextCancellationRespected (line 12) | func TestContextCancellationRespected(t *testing.T) { FILE: p2p/security/noise/session_transport.go function Prologue (line 21) | func Prologue(prologue []byte) SessionOption { type EarlyDataHandler (line 32) | type EarlyDataHandler interface function EarlyData (line 46) | func EarlyData(initiator, responder EarlyDataHandler) SessionOption { function DisablePeerIDCheck (line 58) | func DisablePeerIDCheck() SessionOption { type SessionTransport (line 69) | type SessionTransport struct method SecureInbound (line 82) | func (i *SessionTransport) SecureInbound(ctx context.Context, insecure... method SecureOutbound (line 95) | func (i *SessionTransport) SecureOutbound(ctx context.Context, insecur... method ID (line 99) | func (i *SessionTransport) ID() protocol.ID { FILE: p2p/security/noise/transport.go constant ID (line 20) | ID = "/noise" constant maxProtoNum (line 21) | maxProtoNum = 100 type Transport (line 23) | type Transport struct method SecureInbound (line 55) | func (t *Transport) SecureInbound(ctx context.Context, insecure net.Co... method SecureOutbound (line 68) | func (t *Transport) SecureOutbound(ctx context.Context, insecure net.C... method WithSessionOptions (line 77) | func (t *Transport) WithSessionOptions(opts ...SessionOption) (*Sessio... method ID (line 87) | func (t *Transport) ID() protocol.ID { function New (line 34) | func New(id protocol.ID, privkey crypto.PrivKey, muxers []tptu.StreamMux... function matchMuxers (line 91) | func matchMuxers(initiatorMuxers, responderMuxers []protocol.ID) protoco... type transportEarlyDataHandler (line 100) | type transportEarlyDataHandler struct method Send (line 111) | func (i *transportEarlyDataHandler) Send(context.Context, net.Conn, pe... method Received (line 117) | func (i *transportEarlyDataHandler) Received(_ context.Context, _ net.... method MatchMuxers (line 125) | func (i *transportEarlyDataHandler) MatchMuxers(isInitiator bool) prot... function newTransportEDH (line 107) | func newTransportEDH(t *Transport) *transportEarlyDataHandler { FILE: p2p/security/noise/transport_test.go function newTestTransport (line 26) | func newTestTransport(t *testing.T, typ, bits int) *Transport { function newTestTransportWithMuxers (line 41) | func newTestTransportWithMuxers(t *testing.T, typ, bits int, muxers []pr... function newConnPair (line 48) | func newConnPair(t *testing.T) (net.Conn, net.Conn) { function connect (line 81) | func connect(t *testing.T, initTransport, respTransport *Transport) (*se... function TestDeadlines (line 106) | func TestDeadlines(t *testing.T) { function TestIDs (line 128) | func TestIDs(t *testing.T) { function TestKeys (line 154) | func TestKeys(t *testing.T) { function TestPeerIDMatch (line 175) | func TestPeerIDMatch(t *testing.T) { function TestPeerIDMismatchOutboundFailsHandshake (line 199) | func TestPeerIDMismatchOutboundFailsHandshake(t *testing.T) { function TestPeerIDMismatchInboundFailsHandshake (line 221) | func TestPeerIDMismatchInboundFailsHandshake(t *testing.T) { function TestPeerIDInboundCheckDisabled (line 244) | func TestPeerIDInboundCheckDisabled(t *testing.T) { function TestPeerIDOutboundNoCheck (line 262) | func TestPeerIDOutboundNoCheck(t *testing.T) { function TestLargePayloads (line 282) | func TestLargePayloads(t *testing.T) { function TestHandshakeXX (line 316) | func TestHandshakeXX(t *testing.T) { function TestBufferEqEncPayload (line 341) | func TestBufferEqEncPayload(t *testing.T) { function TestBufferEqDecryptedPayload (line 361) | func TestBufferEqDecryptedPayload(t *testing.T) { function TestReadUnencryptedFails (line 381) | func TestReadUnencryptedFails(t *testing.T) { function TestPrologueMatches (line 425) | func TestPrologueMatches(t *testing.T) { function TestPrologueDoesNotMatchFailsHandshake (line 453) | func TestPrologueDoesNotMatchFailsHandshake(t *testing.T) { type earlyDataHandler (line 479) | type earlyDataHandler struct method Send (line 484) | func (e *earlyDataHandler) Send(ctx context.Context, conn net.Conn, id... method Received (line 491) | func (e *earlyDataHandler) Received(ctx context.Context, conn net.Conn... function TestEarlyDataAccepted (line 498) | func TestEarlyDataAccepted(t *testing.T) { function TestEarlyDataRejected (line 552) | func TestEarlyDataRejected(t *testing.T) { function TestEarlyfffDataAcceptedWithNoHandler (line 607) | func TestEarlyfffDataAcceptedWithNoHandler(t *testing.T) { type noiseEarlyDataTestCase (line 637) | type noiseEarlyDataTestCase struct function TestHandshakeWithTransportEarlyData (line 643) | func TestHandshakeWithTransportEarlyData(t *testing.T) { FILE: p2p/security/tls/cmd/tlsdiag.go function main (line 10) | func main() { FILE: p2p/security/tls/cmd/tlsdiag/client.go function StartClient (line 16) | func StartClient() error { FILE: p2p/security/tls/cmd/tlsdiag/key.go function generateKey (line 10) | func generateKey(keyType string) (priv ic.PrivKey, err error) { FILE: p2p/security/tls/cmd/tlsdiag/server.go function StartServer (line 15) | func StartServer() error { function handleConn (line 57) | func handleConn(tp *libp2ptls.Transport, conn net.Conn) error { FILE: p2p/security/tls/conn.go type conn (line 12) | type conn struct method LocalPeer (line 23) | func (c *conn) LocalPeer() peer.ID { method RemotePeer (line 27) | func (c *conn) RemotePeer() peer.ID { method RemotePublicKey (line 31) | func (c *conn) RemotePublicKey() ci.PubKey { method ConnState (line 35) | func (c *conn) ConnState() network.ConnectionState { FILE: p2p/security/tls/crypto.go constant certValidityPeriod (line 25) | certValidityPeriod = 100 * 365 * 24 * time.Hour constant certificatePrefix (line 26) | certificatePrefix = "libp2p-tls-handshake:" constant alpn (line 27) | alpn string = "libp2p" type signedKey (line 32) | type signedKey struct type Identity (line 38) | type Identity struct method ConfigForPeer (line 111) | func (i *Identity) ConfigForPeer(remote peer.ID) (*tls.Config, <-chan ... type IdentityConfig (line 43) | type IdentityConfig struct type IdentityOption (line 49) | type IdentityOption function WithCertTemplate (line 52) | func WithCertTemplate(template *x509.Certificate) IdentityOption { function WithKeyLogWriter (line 64) | func WithKeyLogWriter(w io.Writer) IdentityOption { function NewIdentity (line 71) | func NewIdentity(privKey ic.PrivKey, opts ...IdentityOption) (*Identity,... function PubKeyFromCertChain (line 157) | func PubKeyFromCertChain(chain []*x509.Certificate) (ic.PubKey, error) { function GenerateSignedExtension (line 215) | func GenerateSignedExtension(sk ic.PrivKey, pubKey crypto.PublicKey) (pk... function keyToCertificate (line 242) | func keyToCertificate(sk ic.PrivKey, certTmpl *x509.Certificate) (*tls.C... function certTemplate (line 266) | func certTemplate() (*x509.Certificate, error) { FILE: p2p/security/tls/crypto_test.go function TestNewIdentityCertificates (line 15) | func TestNewIdentityCertificates(t *testing.T) { function TestVectors (line 55) | func TestVectors(t *testing.T) { FILE: p2p/security/tls/extension.go function getPrefixedExtensionID (line 7) | func getPrefixedExtensionID(suffix []int) []int { function extensionIDEqual (line 12) | func extensionIDEqual(a, b []int) bool { FILE: p2p/security/tls/extension_test.go function TestExtensionGenerating (line 9) | func TestExtensionGenerating(t *testing.T) { function TestExtensionComparison (line 13) | func TestExtensionComparison(t *testing.T) { FILE: p2p/security/tls/transport.go constant ID (line 24) | ID = "/tls/1.0.0" type Transport (line 27) | type Transport struct method SecureInbound (line 65) | func (t *Transport) SecureInbound(ctx context.Context, insecure net.Co... method SecureOutbound (line 110) | func (t *Transport) SecureOutbound(ctx context.Context, insecure net.C... method handshake (line 125) | func (t *Transport) handshake(ctx context.Context, tlsConn *tls.Conn, ... method setupConn (line 152) | func (t *Transport) setupConn(tlsConn *tls.Conn, remotePubKey ci.PubKe... method ID (line 180) | func (t *Transport) ID() protocol.ID { function New (line 39) | func New(id protocol.ID, key ci.PrivKey, muxers []tptu.StreamMuxer) (*Tr... FILE: p2p/security/tls/transport_test.go function createPeer (line 33) | func createPeer(t *testing.T) (peer.ID, ic.PrivKey) { function connect (line 53) | func connect(t *testing.T) (net.Conn, net.Conn) { function isWindowsTCPCloseError (line 79) | func isWindowsTCPCloseError(err error) bool { function TestHandshakeSucceeds (line 86) | func TestHandshakeSucceeds(t *testing.T) { type testcase (line 178) | type testcase struct function TestHandshakeWithNextProtoSucceeds (line 184) | func TestHandshakeWithNextProtoSucceeds(t *testing.T) { type delayedConn (line 289) | type delayedConn struct method Read (line 294) | func (c *delayedConn) Read(b []byte) (int, error) { function TestHandshakeConnectionCancellations (line 299) | func TestHandshakeConnectionCancellations(t *testing.T) { function TestPeerIDMismatch (line 351) | func TestPeerIDMismatch(t *testing.T) { function TestInvalidCerts (line 425) | func TestInvalidCerts(t *testing.T) { FILE: p2p/test/backpressure/backpressure_test.go function TestStBackpressureStreamWrite (line 21) | func TestStBackpressureStreamWrite(t *testing.T) { FILE: p2p/test/basichost/basic_host_test.go function TestNoStreamOverTransientConnection (line 25) | func TestNoStreamOverTransientConnection(t *testing.T) { function TestNewStreamTransientConnection (line 86) | func TestNewStreamTransientConnection(t *testing.T) { function TestAddrFactorCertHashAppend (line 167) | func TestAddrFactorCertHashAppend(t *testing.T) { function TestOnlyWebRTCDirectDialNoDelay (line 205) | func TestOnlyWebRTCDirectDialNoDelay(t *testing.T) { function TestWebRTCWithQUICManyConnections (line 227) | func TestWebRTCWithQUICManyConnections(t *testing.T) { FILE: p2p/test/negotiation/muxer_test.go type testcase (line 27) | type testcase struct type security (line 36) | type security struct function TestMuxerNegotiation (line 41) | func TestMuxerNegotiation(t *testing.T) { FILE: p2p/test/negotiation/security_test.go function TestSecurityNegotiation (line 23) | func TestSecurityNegotiation(t *testing.T) { FILE: p2p/test/notifications/notification_test.go function portFromString (line 17) | func portFromString(t *testing.T, s string) int { function TestListenAddressNotif (line 24) | func TestListenAddressNotif(t *testing.T) { FILE: p2p/test/quic/quic_test.go function getQUICMultiaddrCode (line 19) | func getQUICMultiaddrCode(addr ma.Multiaddr) int { function TestQUICAndWebTransport (line 29) | func TestQUICAndWebTransport(t *testing.T) { FILE: p2p/test/reconnects/reconnect_test.go function EchoStreamHandler (line 21) | func EchoStreamHandler(stream network.Stream) { function TestReconnect5 (line 30) | func TestReconnect5(t *testing.T) { function runRound (line 62) | func runRound(t *testing.T, hosts []host.Host) { FILE: p2p/test/resource-manager/echo.go constant EchoService (line 18) | EchoService = "test.echo" constant EchoProtoID (line 19) | EchoProtoID = "/test/echo" type Echo (line 26) | type Echo struct method Status (line 50) | func (e *Echo) Status() EchoStatus { method BeforeReserve (line 57) | func (e *Echo) BeforeReserve(f func() error) { method BeforeRead (line 64) | func (e *Echo) BeforeRead(f func() error) { method BeforeWrite (line 71) | func (e *Echo) BeforeWrite(f func() error) { method BeforeDone (line 78) | func (e *Echo) BeforeDone(f func() error) { method Done (line 85) | func (e *Echo) Done(f func()) { method getBeforeReserve (line 92) | func (e *Echo) getBeforeReserve() func() error { method getBeforeRead (line 99) | func (e *Echo) getBeforeRead() func() error { method getBeforeWrite (line 106) | func (e *Echo) getBeforeWrite() func() error { method getBeforeDone (line 113) | func (e *Echo) getBeforeDone() func() error { method getDone (line 120) | func (e *Echo) getDone() func() { method handleStream (line 127) | func (e *Echo) handleStream(s network.Stream) { method Echo (line 240) | func (e *Echo) Echo(p peer.ID, what string) error { type EchoStatus (line 36) | type EchoStatus struct function NewEcho (line 44) | func NewEcho(h host.Host) *Echo { FILE: p2p/test/resource-manager/echo_test.go function createEchos (line 15) | func createEchos(t *testing.T, count int, makeOpts ...func(int) libp2p.O... function closeEchos (line 48) | func closeEchos(echos []*Echo) { function checkEchoStatus (line 54) | func checkEchoStatus(t *testing.T, e *Echo, expected EchoStatus) { function TestEcho (line 59) | func TestEcho(t *testing.T) { FILE: p2p/test/resource-manager/rcmgr_test.go function makeRcmgrOption (line 20) | func makeRcmgrOption(t *testing.T, cfg rcmgr.ConcreteLimitConfig) func(i... function closeRcmgrs (line 33) | func closeRcmgrs(echos []*Echo) { function waitForConnection (line 39) | func waitForConnection(t *testing.T, src, dest *Echo) { function TestResourceManagerConnInbound (line 46) | func TestResourceManagerConnInbound(t *testing.T) { function TestResourceManagerConnOutbound (line 88) | func TestResourceManagerConnOutbound(t *testing.T) { function TestResourceManagerServiceInbound (line 128) | func TestResourceManagerServiceInbound(t *testing.T) { function TestResourceManagerServicePeerInbound (line 184) | func TestResourceManagerServicePeerInbound(t *testing.T) { function waitForBarrier (line 265) | func waitForBarrier(count int32, timeout time.Duration) func() error { function waitForChannel (line 283) | func waitForChannel(ready chan struct{}, timeout time.Duration) func() e... function TestReadmeExample (line 294) | func TestReadmeExample(_ *testing.T) { FILE: p2p/test/security/bench_test.go type Factory (line 19) | type Factory function benchmarkThroughput (line 21) | func benchmarkThroughput(b *testing.B, size int, factory Factory) { function benchmarkHandshakes (line 67) | func benchmarkHandshakes(b *testing.B, factory Factory) { function bench (line 108) | func bench(b *testing.B, factory Factory) { function BenchmarkNoise (line 116) | func BenchmarkNoise(b *testing.B) { function BenchmarkTLS (line 124) | func BenchmarkTLS(b *testing.B) { FILE: p2p/test/swarm/swarm_test.go function TestDialPeerTransientConnection (line 22) | func TestDialPeerTransientConnection(t *testing.T) { function TestNewStreamTransientConnection (line 77) | func TestNewStreamTransientConnection(t *testing.T) { function TestLimitStreamsWhenHangingHandlers (line 167) | func TestLimitStreamsWhenHangingHandlers(t *testing.T) { FILE: p2p/test/transport/deadline_test.go function TestReadWriteDeadlines (line 14) | func TestReadWriteDeadlines(t *testing.T) { FILE: p2p/test/transport/gating_test.go function normalize (line 27) | func normalize(addr ma.Multiaddr) ma.Multiaddr { function addrPort (line 48) | func addrPort(addr ma.Multiaddr) netip.AddrPort { function TestInterceptPeerDial (line 65) | func TestInterceptPeerDial(t *testing.T) { function TestInterceptAddrDial (line 87) | func TestInterceptAddrDial(t *testing.T) { function TestInterceptSecuredOutgoing (line 112) | func TestInterceptSecuredOutgoing(t *testing.T) { function TestInterceptUpgradedOutgoing (line 145) | func TestInterceptUpgradedOutgoing(t *testing.T) { function TestInterceptAccept (line 181) | func TestInterceptAccept(t *testing.T) { function TestInterceptSecuredIncoming (line 229) | func TestInterceptSecuredIncoming(t *testing.T) { function TestInterceptUpgradedIncoming (line 262) | func TestInterceptUpgradedIncoming(t *testing.T) { FILE: p2p/test/transport/mock_connection_gater_test.go type MockConnectionGater (line 23) | type MockConnectionGater struct method EXPECT (line 42) | func (m *MockConnectionGater) EXPECT() *MockConnectionGaterMockRecorder { method InterceptAccept (line 47) | func (m *MockConnectionGater) InterceptAccept(arg0 network.ConnMultiad... method InterceptAddrDial (line 61) | func (m *MockConnectionGater) InterceptAddrDial(arg0 peer.ID, arg1 mul... method InterceptPeerDial (line 75) | func (m *MockConnectionGater) InterceptPeerDial(p peer.ID) bool { method InterceptSecured (line 89) | func (m *MockConnectionGater) InterceptSecured(arg0 network.Direction,... method InterceptUpgraded (line 103) | func (m *MockConnectionGater) InterceptUpgraded(arg0 network.Conn) (bo... type MockConnectionGaterMockRecorder (line 30) | type MockConnectionGaterMockRecorder struct method InterceptAccept (line 55) | func (mr *MockConnectionGaterMockRecorder) InterceptAccept(arg0 any) *... method InterceptAddrDial (line 69) | func (mr *MockConnectionGaterMockRecorder) InterceptAddrDial(arg0, arg... method InterceptPeerDial (line 83) | func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(p any) *g... method InterceptSecured (line 97) | func (mr *MockConnectionGaterMockRecorder) InterceptSecured(arg0, arg1... method InterceptUpgraded (line 112) | func (mr *MockConnectionGaterMockRecorder) InterceptUpgraded(arg0 any)... function NewMockConnectionGater (line 35) | func NewMockConnectionGater(ctrl *gomock.Controller) *MockConnectionGater { FILE: p2p/test/transport/rcmgr_test.go function TestResourceManagerIsUsed (line 25) | func TestResourceManagerIsUsed(t *testing.T) { FILE: p2p/test/transport/transport_test.go type TransportTestCase (line 53) | type TransportTestCase struct type TransportTestCaseOpts (line 58) | type TransportTestCaseOpts struct function transformOpts (line 65) | func transformOpts(opts TransportTestCaseOpts) []config.Option { function selfSignedTLSConfig (line 81) | func selfSignedTLSConfig(t *testing.T) *tls.Config { function TestPing (line 358) | func TestPing(t *testing.T) { function TestBigPing (line 378) | func TestBigPing(t *testing.T) { function TestLotsOfDataManyStreams (line 442) | func TestLotsOfDataManyStreams(t *testing.T) { function TestManyStreams (line 514) | func TestManyStreams(t *testing.T) { function TestMoreStreamsThanOurLimits (line 579) | func TestMoreStreamsThanOurLimits(t *testing.T) { function TestListenerStreamResets (line 739) | func TestListenerStreamResets(t *testing.T) { function TestDialerStreamResets (line 768) | func TestDialerStreamResets(t *testing.T) { function TestStreamReadDeadline (line 799) | func TestStreamReadDeadline(t *testing.T) { function TestDiscoverPeerIDFromSecurityNegotiation (line 837) | func TestDiscoverPeerIDFromSecurityNegotiation(t *testing.T) { function TestCloseConnWhenBlocked (line 893) | func TestCloseConnWhenBlocked(t *testing.T) { function TestConnDroppedWhenBlocked (line 934) | func TestConnDroppedWhenBlocked(t *testing.T) { function TestConnClosedWhenRemoteCloses (line 977) | func TestConnClosedWhenRemoteCloses(t *testing.T) { function TestErrorCodes (line 1004) | func TestErrorCodes(t *testing.T) { FILE: p2p/test/webtransport/webtransport_test.go function extractCertHashes (line 16) | func extractCertHashes(addr ma.Multiaddr) []string { function TestDeterministicCertsAfterReboot (line 27) | func TestDeterministicCertsAfterReboot(t *testing.T) { FILE: p2p/transport/quic/cmd/client/main.go function main (line 11) | func main() { FILE: p2p/transport/quic/cmd/lib/lib.go function RunClient (line 20) | func RunClient(raddr string, p string) error { function RunServer (line 70) | func RunServer(port string, location chan peer.AddrInfo) error { function handleConn (line 115) | func handleConn(conn tpt.CapableConn) error { FILE: p2p/transport/quic/cmd/lib/lib_test.go function TestCmd (line 10) | func TestCmd(t *testing.T) { FILE: p2p/transport/quic/cmd/server/main.go function main (line 11) | func main() { FILE: p2p/transport/quic/conn.go type conn (line 15) | type conn struct method As (line 28) | func (c *conn) As(target any) bool { method Close (line 42) | func (c *conn) Close() error { method CloseWithError (line 49) | func (c *conn) CloseWithError(errCode network.ConnErrorCode) error { method closeWithError (line 53) | func (c *conn) closeWithError(errCode quic.ApplicationErrorCode, errSt... method IsClosed (line 61) | func (c *conn) IsClosed() bool { method allowWindowIncrease (line 65) | func (c *conn) allowWindowIncrease(size uint64) bool { method OpenStream (line 70) | func (c *conn) OpenStream(ctx context.Context) (network.MuxedStream, e... method AcceptStream (line 79) | func (c *conn) AcceptStream() (network.MuxedStream, error) { method LocalPeer (line 88) | func (c *conn) LocalPeer() peer.ID { return c.localPeer } method RemotePeer (line 91) | func (c *conn) RemotePeer() peer.ID { return c.remotePeerID } method RemotePublicKey (line 94) | func (c *conn) RemotePublicKey() ic.PubKey { return c.remotePubKey } method LocalMultiaddr (line 97) | func (c *conn) LocalMultiaddr() ma.Multiaddr { return c.localMultiaddr } method RemoteMultiaddr (line 100) | func (c *conn) RemoteMultiaddr() ma.Multiaddr { return c.remoteMultiad... method Transport (line 102) | func (c *conn) Transport() tpt.Transport { return c.transport } method Scope (line 104) | func (c *conn) Scope() network.ConnScope { return c.scope } method ConnState (line 107) | func (c *conn) ConnState() network.ConnectionState { FILE: p2p/transport/quic/conn_test.go type connTestCase (line 31) | type connTestCase struct function createPeer (line 41) | func createPeer(t *testing.T) (peer.ID, ic.PrivKey) { function runServer (line 61) | func runServer(t *testing.T, tr tpt.Transport, addr string) tpt.Listener { function newConnManager (line 69) | func newConnManager(t *testing.T, opts ...quicreuse.Option) *quicreuse.C... function TestHandshake (line 77) | func TestHandshake(t *testing.T) { function testHandshake (line 85) | func testHandshake(t *testing.T, tc *connTestCase) { function TestResourceManagerSuccess (line 126) | func TestResourceManagerSuccess(t *testing.T) { function testResourceManagerSuccess (line 134) | func testResourceManagerSuccess(t *testing.T, tc *connTestCase) { function TestResourceManagerDialDenied (line 177) | func TestResourceManagerDialDenied(t *testing.T) { function testResourceManagerDialDenied (line 185) | func testResourceManagerDialDenied(t *testing.T, tc *connTestCase) { function TestResourceManagerAcceptDenied (line 209) | func TestResourceManagerAcceptDenied(t *testing.T) { function testResourceManagerAcceptDenied (line 217) | func testResourceManagerAcceptDenied(t *testing.T, tc *connTestCase) { function TestStreams (line 267) | func TestStreams(t *testing.T) { function testStreams (line 278) | func testStreams(t *testing.T, tc *connTestCase) { function testStreamsErrorCode (line 310) | func testStreamsErrorCode(t *testing.T, tc *connTestCase) { function TestHandshakeFailPeerIDMismatch (line 349) | func TestHandshakeFailPeerIDMismatch(t *testing.T) { function testHandshakeFailPeerIDMismatch (line 357) | func testHandshakeFailPeerIDMismatch(t *testing.T, tc *connTestCase) { function TestConnectionGating (line 391) | func TestConnectionGating(t *testing.T) { function testConnectionGating (line 399) | func testConnectionGating(t *testing.T, tc *connTestCase) { function TestDialTwo (line 478) | func TestDialTwo(t *testing.T) { function testDialTwo (line 486) | func testDialTwo(t *testing.T, tc *connTestCase) { function TestStatelessReset (line 558) | func TestStatelessReset(t *testing.T) { function newUDPConnLocalhost (line 566) | func newUDPConnLocalhost(t testing.TB, port int) (*net.UDPConn, func()) { function testStatelessReset (line 573) | func testStatelessReset(t *testing.T, tc *connTestCase) { function TestHolePunching (line 660) | func TestHolePunching(t *testing.T) { FILE: p2p/transport/quic/listener.go type listener (line 19) | type listener struct method Accept (line 47) | func (l *listener) Accept() (tpt.CapableConn, error) { method wrapConn (line 86) | func (l *listener) wrapConn(qconn *quic.Conn) (*conn, error) { method wrapConnWithScope (line 115) | func (l *listener) wrapConnWithScope(qconn *quic.Conn, connScope netwo... method Close (line 151) | func (l *listener) Close() error { method Addr (line 156) | func (l *listener) Addr() net.Addr { function newListener (line 28) | func newListener(ln quicreuse.Listener, t *transport, localPeer peer.ID,... FILE: p2p/transport/quic/listener_test.go function newTransport (line 27) | func newTransport(t *testing.T, rcmgr network.ResourceManager) tpt.Trans... function TestListenAddr (line 37) | func TestListenAddr(t *testing.T) { function TestAccepting (line 71) | func TestAccepting(t *testing.T) { function TestAcceptAfterClose (line 95) | func TestAcceptAfterClose(t *testing.T) { function TestCorrectNumberOfVirtualListeners (line 105) | func TestCorrectNumberOfVirtualListeners(t *testing.T) { function TestCleanupConnWhenBlocked (line 122) | func TestCleanupConnWhenBlocked(t *testing.T) { FILE: p2p/transport/quic/mock_connection_gater_test.go type MockConnectionGater (line 23) | type MockConnectionGater struct method EXPECT (line 42) | func (m *MockConnectionGater) EXPECT() *MockConnectionGaterMockRecorder { method InterceptAccept (line 47) | func (m *MockConnectionGater) InterceptAccept(arg0 network.ConnMultiad... method InterceptAddrDial (line 61) | func (m *MockConnectionGater) InterceptAddrDial(arg0 peer.ID, arg1 mul... method InterceptPeerDial (line 75) | func (m *MockConnectionGater) InterceptPeerDial(p peer.ID) bool { method InterceptSecured (line 89) | func (m *MockConnectionGater) InterceptSecured(arg0 network.Direction,... method InterceptUpgraded (line 103) | func (m *MockConnectionGater) InterceptUpgraded(arg0 network.Conn) (bo... type MockConnectionGaterMockRecorder (line 30) | type MockConnectionGaterMockRecorder struct method InterceptAccept (line 55) | func (mr *MockConnectionGaterMockRecorder) InterceptAccept(arg0 any) *... method InterceptAddrDial (line 69) | func (mr *MockConnectionGaterMockRecorder) InterceptAddrDial(arg0, arg... method InterceptPeerDial (line 83) | func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(p any) *g... method InterceptSecured (line 97) | func (mr *MockConnectionGaterMockRecorder) InterceptSecured(arg0, arg1... method InterceptUpgraded (line 112) | func (mr *MockConnectionGaterMockRecorder) InterceptUpgraded(arg0 any)... function NewMockConnectionGater (line 35) | func NewMockConnectionGater(ctrl *gomock.Controller) *MockConnectionGater { FILE: p2p/transport/quic/stream.go constant reset (line 13) | reset quic.StreamErrorCode = 0 type stream (line 16) | type stream struct method Read (line 57) | func (s stream) Read(b []byte) (n int, err error) { method Write (line 62) | func (s stream) Write(b []byte) (n int, err error) { method Reset (line 67) | func (s stream) Reset() error { method ResetWithError (line 73) | func (s stream) ResetWithError(errCode network.StreamErrorCode) error { method Close (line 79) | func (s stream) Close() error { method CloseRead (line 84) | func (s stream) CloseRead() error { method CloseWrite (line 89) | func (s stream) CloseWrite() error { function parseStreamError (line 22) | func parseStreamError(err error) error { FILE: p2p/transport/quic/transport.go constant ListenOrder (line 29) | ListenOrder = 1 type transport (line 38) | type transport struct method ListenOrder (line 106) | func (t *transport) ListenOrder() int { method Dial (line 111) | func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p pe... method dialWithScope (line 130) | func (t *transport) dialWithScope(ctx context.Context, raddr ma.Multia... method addConn (line 177) | func (t *transport) addConn(conn *quic.Conn, c *conn) { method removeConn (line 183) | func (t *transport) removeConn(conn *quic.Conn) { method holePunch (line 189) | func (t *transport) holePunch(ctx context.Context, raddr ma.Multiaddr,... method CanDial (line 279) | func (t *transport) CanDial(addr ma.Multiaddr) bool { method Listen (line 284) | func (t *transport) Listen(addr ma.Multiaddr) (tpt.Listener, error) { method allowWindowIncrease (line 346) | func (t *transport) allowWindowIncrease(conn *quic.Conn, size uint64) ... method Proxy (line 361) | func (t *transport) Proxy() bool { method Protocols (line 366) | func (t *transport) Protocols() []int { method String (line 370) | func (t *transport) String() string { method Close (line 374) | func (t *transport) Close() error { method CloseVirtualListener (line 378) | func (t *transport) CloseVirtualListener(l *virtualListener) error { type holePunchKey (line 62) | type holePunchKey struct type activeHolePunch (line 67) | type activeHolePunch struct function NewTransport (line 73) | func NewTransport(key ic.PrivKey, connManager *quicreuse.ConnManager, ps... FILE: p2p/transport/quic/transport_test.go function getTransport (line 17) | func getTransport(t *testing.T) tpt.Transport { function TestQUICProtocol (line 28) | func TestQUICProtocol(t *testing.T) { function TestCanDial (line 41) | func TestCanDial(t *testing.T) { FILE: p2p/transport/quic/virtuallistener.go constant acceptBufferPerVersion (line 14) | acceptBufferPerVersion = 4 type virtualListener (line 17) | type virtualListener struct method Multiaddr (line 28) | func (l *virtualListener) Multiaddr() ma.Multiaddr { method Close (line 32) | func (l *virtualListener) Close() error { method Accept (line 37) | func (l *virtualListener) Accept() (tpt.CapableConn, error) { type acceptVal (line 41) | type acceptVal struct type acceptLoopRunner (line 46) | type acceptLoopRunner struct method AcceptForVersion (line 54) | func (r *acceptLoopRunner) AcceptForVersion(v quic.Version) chan accep... method RmAcceptForVersion (line 68) | func (r *acceptLoopRunner) RmAcceptForVersion(v quic.Version, err erro... method sendErrAndClose (line 85) | func (r *acceptLoopRunner) sendErrAndClose(err error) { method innerAccept (line 102) | func (r *acceptLoopRunner) innerAccept(l *listener, expectedVersion qu... method Accept (line 154) | func (r *acceptLoopRunner) Accept(l *listener, expectedVersion quic.Ve... FILE: p2p/transport/quicreuse/connmgr.go type QUICListener (line 28) | type QUICListener interface type QUICTransport (line 36) | type QUICTransport interface type ConnManager (line 51) | type ConnManager struct method getReuse (line 142) | func (c *ConnManager) getReuse(network string) (*reuse, error) { method LendTransport (line 156) | func (c *ConnManager) LendTransport(network string, tr QUICTransport, ... method ListenQUIC (line 181) | func (c *ConnManager) ListenQUIC(addr ma.Multiaddr, tlsConf *tls.Confi... method ListenQUICAndAssociate (line 191) | func (c *ConnManager) ListenQUICAndAssociate(association any, addr ma.... method onListenerClosed (line 237) | func (c *ConnManager) onListenerClosed(key string) { method SharedNonQUICPacketConn (line 252) | func (c *ConnManager) SharedNonQUICPacketConn(_ string, laddr *net.UDP... method transportForListen (line 274) | func (c *ConnManager) transportForListen(network string, laddr *net.UD... method DialQUIC (line 309) | func (c *ConnManager) DialQUIC(ctx context.Context, raddr ma.Multiaddr... method TransportForDial (line 346) | func (c *ConnManager) TransportForDial(network string, raddr *net.UDPA... method TransportWithAssociationForDial (line 353) | func (c *ConnManager) TransportWithAssociationForDial(association any,... method newSingleOwnerTransport (line 376) | func (c *ConnManager) newSingleOwnerTransport(conn net.PacketConn) *si... method Protocols (line 391) | func (c *ConnManager) Protocols() []int { method Close (line 395) | func (c *ConnManager) Close() error { method ClientConfig (line 405) | func (c *ConnManager) ClientConfig() *quic.Config { type quicListenerEntry (line 77) | type quicListenerEntry struct function defaultListenUDP (line 82) | func defaultListenUDP(network string, laddr *net.UDPAddr) (net.PacketCon... function defaultSourceIPSelectorFn (line 86) | func defaultSourceIPSelectorFn() (SourceIPSelector, error) { constant unverifiedAddressNewConnectionRPS (line 92) | unverifiedAddressNewConnectionRPS = 1000 constant unverifiedAddressNewConnectionBurst (line 93) | unverifiedAddressNewConnectionBurst = 1000 function NewConnManager (line 97) | func NewConnManager(statelessResetKey quic.StatelessResetKey, tokenKey q... type associationKey (line 294) | type associationKey struct function WithAssociation (line 298) | func WithAssociation(ctx context.Context, association any) context.Conte... type wrappedQUICTransport (line 410) | type wrappedQUICTransport struct method Listen (line 416) | func (t *wrappedQUICTransport) Listen(tlsConf *tls.Config, conf *quic.... function newQUICTransport (line 420) | func newQUICTransport( FILE: p2p/transport/quicreuse/connmgr_test.go function checkClosed (line 24) | func checkClosed(t *testing.T, cm *ConnManager) { function TestListenOnSameProto (line 43) | func TestListenOnSameProto(t *testing.T) { function testListenOnSameProto (line 53) | func testListenOnSameProto(t *testing.T, enableReuseport bool) { function TestConnectionPassedToQUICForListening (line 81) | func TestConnectionPassedToQUICForListening(t *testing.T) { function TestAcceptErrorGetCleanedUp (line 106) | func TestAcceptErrorGetCleanedUp(t *testing.T) { function TestConnectionPassedToQUICForDialing (line 141) | func TestConnectionPassedToQUICForDialing(t *testing.T) { function getTLSConfForProto (line 181) | func getTLSConfForProto(t *testing.T, alpn string) (peer.ID, *tls.Config) { function connectWithProtocol (line 200) | func connectWithProtocol(t *testing.T, addr net.Addr, alpn string) (peer... function TestListener (line 223) | func TestListener(t *testing.T) { function testListener (line 233) | func testListener(t *testing.T, enableReuseport bool) { function TestExternalTransport (line 280) | func TestExternalTransport(t *testing.T) { function TestAssociate (line 338) | func TestAssociate(t *testing.T) { function TestConnContext (line 394) | func TestConnContext(t *testing.T) { function TestAssociationCleanup (line 493) | func TestAssociationCleanup(t *testing.T) { function TestConnManagerIsolation (line 584) | func TestConnManagerIsolation(t *testing.T) { FILE: p2p/transport/quicreuse/listener.go type Listener (line 19) | type Listener interface type protoConf (line 26) | type protoConf struct type quicListener (line 32) | type quicListener struct method allowWindowIncrease (line 83) | func (l *quicListener) allowWindowIncrease(conn *quic.Conn, delta uint... method Add (line 94) | func (l *quicListener) Add(association any, tlsConf *tls.Config, allow... method Run (line 144) | func (l *quicListener) Run() error { method Close (line 168) | func (l *quicListener) Close() error { function newQuicListener (line 42) | func newQuicListener(tr RefCountedQUICTransport, quicConfig *quic.Config... constant queueLen (line 174) | queueLen = 16 type listener (line 177) | type listener struct method add (line 188) | func (l *listener) add(c *quic.Conn) { method Accept (line 196) | func (l *listener) Accept(ctx context.Context) (*quic.Conn, error) { method Addr (line 210) | func (l *listener) Addr() net.Addr { method Multiaddrs (line 214) | func (l *listener) Multiaddrs() []ma.Multiaddr { method Close (line 218) | func (l *listener) Close() error { FILE: p2p/transport/quicreuse/nonquic_packetconn.go type nonQUICPacketConn (line 12) | type nonQUICPacketConn struct method Close (line 22) | func (n *nonQUICPacketConn) Close() error { method LocalAddr (line 32) | func (n *nonQUICPacketConn) LocalAddr() net.Addr { method ReadFrom (line 37) | func (n *nonQUICPacketConn) ReadFrom(p []byte) (int, net.Addr, error) { method SetDeadline (line 46) | func (n *nonQUICPacketConn) SetDeadline(t time.Time) error { method SetReadDeadline (line 52) | func (n *nonQUICPacketConn) SetReadDeadline(t time.Time) error { method SetWriteDeadline (line 62) | func (n *nonQUICPacketConn) SetWriteDeadline(_ time.Time) error { method WriteTo (line 68) | func (n *nonQUICPacketConn) WriteTo(p []byte, addr net.Addr) (int, err... FILE: p2p/transport/quicreuse/options.go type Option (line 12) | type Option type listenUDP (line 14) | type listenUDP function OverrideListenUDP (line 16) | func OverrideListenUDP(f listenUDP) Option { function OverrideSourceIPSelector (line 23) | func OverrideSourceIPSelector(f func() (SourceIPSelector, error)) Option { function WithQlogTracerDir (line 30) | func WithQlogTracerDir(dir string) Option { function DisableReuseport (line 37) | func DisableReuseport() Option { function ConnContext (line 46) | func ConnContext(f func(ctx context.Context, clientInfo *quic.ClientInfo... function VerifySourceAddress (line 58) | func VerifySourceAddress(f func(addr net.Addr) bool) Option { function EnableMetrics (line 67) | func EnableMetrics(reg prometheus.Registerer) Option { FILE: p2p/transport/quicreuse/quic_multiaddr.go function ToQuicMultiaddr (line 16) | func ToQuicMultiaddr(na net.Addr, version quic.Version) (ma.Multiaddr, e... function FromQuicMultiaddr (line 29) | func FromQuicMultiaddr(addr ma.Multiaddr) (*net.UDPAddr, quic.Version, e... FILE: p2p/transport/quicreuse/quic_multiaddr_test.go function TestConvertToQuicMultiaddr (line 12) | func TestConvertToQuicMultiaddr(t *testing.T) { function TestConvertToQuicV1Multiaddr (line 19) | func TestConvertToQuicV1Multiaddr(t *testing.T) { function TestConvertFromQuicV1Multiaddr (line 26) | func TestConvertFromQuicV1Multiaddr(t *testing.T) { FILE: p2p/transport/quicreuse/reuse.go type RefCountedQUICTransport (line 16) | type RefCountedQUICTransport interface type singleOwnerTransport (line 32) | type singleOwnerTransport struct method IncreaseCount (line 42) | func (c *singleOwnerTransport) IncreaseCount() {} method DecreaseCount (line 43) | func (c *singleOwnerTransport) DecreaseCount() { c.Transport.Close() } method LocalAddr (line 44) | func (c *singleOwnerTransport) LocalAddr() net.Addr { method Dial (line 48) | func (c *singleOwnerTransport) Dial(ctx context.Context, addr net.Addr... method ReadNonQUICPacket (line 52) | func (c *singleOwnerTransport) ReadNonQUICPacket(ctx context.Context, ... method Close (line 56) | func (c *singleOwnerTransport) Close() error { method WriteTo (line 60) | func (c *singleOwnerTransport) WriteTo(b []byte, addr net.Addr) (int, ... method Listen (line 64) | func (c *singleOwnerTransport) Listen(tlsConf *tls.Config, conf *quic.... type refcountedTransport (line 74) | type refcountedTransport struct method associateForListener (line 99) | func (c *refcountedTransport) associateForListener(a any, ln *listener) { method RemoveAssociationsForListener (line 115) | func (c *refcountedTransport) RemoveAssociationsForListener(ln *listen... method hasAssociation (line 131) | func (c *refcountedTransport) hasAssociation(a any) bool { method IncreaseCount (line 141) | func (c *refcountedTransport) IncreaseCount() { method Close (line 148) | func (c *refcountedTransport) Close() error { method WriteTo (line 157) | func (c *refcountedTransport) WriteTo(b []byte, addr net.Addr) (int, e... method LocalAddr (line 161) | func (c *refcountedTransport) LocalAddr() net.Addr { method Listen (line 165) | func (c *refcountedTransport) Listen(tlsConf *tls.Config, conf *quic.C... method DecreaseCount (line 169) | func (c *refcountedTransport) DecreaseCount() { method ShouldGarbageCollect (line 178) | func (c *refcountedTransport) ShouldGarbageCollect(now time.Time) bool { type reuse (line 184) | type reuse struct method gc (line 228) | func (r *reuse) gc() { method TransportWithAssociationForDial (line 292) | func (r *reuse) TransportWithAssociationForDial(association any, netwo... method transportForDialLocked (line 320) | func (r *reuse) transportForDialLocked(association any, network string... method AddTransport (line 373) | func (r *reuse) AddTransport(tr *refcountedTransport, laddr *net.UDPAd... method TransportForListen (line 387) | func (r *reuse) TransportForListen(network string, laddr *net.UDPAddr)... method newTransport (line 451) | func (r *reuse) newTransport(conn net.PacketConn) *refcountedTransport { method Close (line 466) | func (r *reuse) Close() error { function newReuse (line 209) | func newReuse(srk *quic.StatelessResetKey, tokenKey *quic.TokenGenerator... type SourceIPSelector (line 472) | type SourceIPSelector interface type netrouteSourceIPSelector (line 476) | type netrouteSourceIPSelector struct method PreferredSourceIPForDestination (line 480) | func (s *netrouteSourceIPSelector) PreferredSourceIPForDestination(dst... FILE: p2p/transport/quicreuse/reuse_test.go method GetCount (line 16) | func (c *refcountedTransport) GetCount() int { function closeAllConns (line 22) | func closeAllConns(reuse *reuse) { function platformHasRoutingTables (line 44) | func platformHasRoutingTables() bool { function isGarbageCollectorRunning (line 49) | func isGarbageCollectorRunning() bool { function cleanup (line 55) | func cleanup(t *testing.T, reuse *reuse) { function TestReuseListenOnAllIPv4 (line 63) | func TestReuseListenOnAllIPv4(t *testing.T) { function TestReuseListenOnAllIPv6 (line 75) | func TestReuseListenOnAllIPv6(t *testing.T) { function TestReuseCreateNewGlobalConnOnDial (line 88) | func TestReuseCreateNewGlobalConnOnDial(t *testing.T) { function TestReuseConnectionWhenDialing (line 102) | func TestReuseConnectionWhenDialing(t *testing.T) { function TestReuseConnectionWhenListening (line 119) | func TestReuseConnectionWhenListening(t *testing.T) { function TestReuseConnectionWhenDialBeforeListen (line 134) | func TestReuseConnectionWhenDialBeforeListen(t *testing.T) { function TestReuseListenOnSpecificInterface (line 165) | func TestReuseListenOnSpecificInterface(t *testing.T) { function TestReuseGarbageCollect (line 191) | func TestReuseGarbageCollect(t *testing.T) { FILE: p2p/transport/tcp/metrics.go constant collectFrequency (line 28) | collectFrequency = 10 * time.Second function initMetrics (line 34) | func initMetrics() { type aggregatingCollector (line 63) | type aggregatingCollector struct method AddConn (line 94) | func (c *aggregatingCollector) AddConn(t *tracingConn) uint64 { method removeConn (line 102) | func (c *aggregatingCollector) removeConn(id uint64) { method Describe (line 106) | func (c *aggregatingCollector) Describe(descs chan<- *prometheus.Desc) { method cron (line 119) | func (c *aggregatingCollector) cron() { method gatherMetrics (line 128) | func (c *aggregatingCollector) gatherMetrics(now time.Time) { method Collect (line 158) | func (c *aggregatingCollector) Collect(metrics chan<- prometheus.Metri... method ClosedConn (line 200) | func (c *aggregatingCollector) ClosedConn(conn *tracingConn, direction... function newAggregatingCollector (line 77) | func newAggregatingCollector() *aggregatingCollector { type tracingConn (line 207) | type tracingConn struct method getDirection (line 243) | func (c *tracingConn) getDirection() string { method Close (line 250) | func (c *tracingConn) Close() error { method getTCPInfo (line 258) | func (c *tracingConn) getTCPInfo() (*tcpinfo.Info, error) { function newTracingConn (line 222) | func newTracingConn(c manet.Conn, collector *aggregatingCollector, isCli... type tracingListener (line 269) | type tracingListener struct method Accept (line 279) | func (l *tracingListener) Accept() (manet.Conn, network.ConnManagement... function newTracingListener (line 275) | func newTracingListener(l transport.GatedMaListener, collector *aggregat... FILE: p2p/transport/tcp/metrics_darwin.go constant hasSegmentCounter (line 8) | hasSegmentCounter = true constant hasByteCounter (line 9) | hasByteCounter = true function getSegmentsSent (line 12) | func getSegmentsSent(info *tcpinfo.Info) uint64 { return info.Sys.SegsSe... function getSegmentsRcvd (line 13) | func getSegmentsRcvd(info *tcpinfo.Info) uint64 { return info.Sys.SegsRe... function getBytesSent (line 14) | func getBytesSent(info *tcpinfo.Info) uint64 { return info.Sys.BytesS... function getBytesRcvd (line 15) | func getBytesRcvd(info *tcpinfo.Info) uint64 { return info.Sys.BytesR... FILE: p2p/transport/tcp/metrics_general.go constant hasSegmentCounter (line 8) | hasSegmentCounter = false constant hasByteCounter (line 9) | hasByteCounter = false function getSegmentsSent (line 12) | func getSegmentsSent(_ *tcpinfo.Info) uint64 { return 0 } function getSegmentsRcvd (line 13) | func getSegmentsRcvd(_ *tcpinfo.Info) uint64 { return 0 } function getBytesSent (line 14) | func getBytesSent(_ *tcpinfo.Info) uint64 { return 0 } function getBytesRcvd (line 15) | func getBytesRcvd(_ *tcpinfo.Info) uint64 { return 0 } FILE: p2p/transport/tcp/metrics_linux.go constant hasSegmentCounter (line 8) | hasSegmentCounter = true constant hasByteCounter (line 9) | hasByteCounter = false function getSegmentsSent (line 12) | func getSegmentsSent(info *tcpinfo.Info) uint64 { return uint64(info.Sys... function getSegmentsRcvd (line 13) | func getSegmentsRcvd(info *tcpinfo.Info) uint64 { return uint64(info.Sys... function getBytesSent (line 14) | func getBytesSent(_ *tcpinfo.Info) uint64 { return 0 } function getBytesRcvd (line 15) | func getBytesRcvd(_ *tcpinfo.Info) uint64 { return 0 } FILE: p2p/transport/tcp/metrics_none.go type aggregatingCollector (line 12) | type aggregatingCollector struct function newTracingConn (line 14) | func newTracingConn(c manet.Conn, collector *aggregatingCollector, isCli... function newTracingListener (line 17) | func newTracingListener(l transport.GatedMaListener, collector *aggregat... FILE: p2p/transport/tcp/metrics_test.go function TestTcpTransportCollectsMetricsWithSharedTcpSocket (line 13) | func TestTcpTransportCollectsMetricsWithSharedTcpSocket(t *testing.T) { FILE: p2p/transport/tcp/tcp.go constant defaultConnectTimeout (line 25) | defaultConnectTimeout = 5 * time.Second constant keepAlivePeriod (line 29) | keepAlivePeriod = 30 * time.Second type canKeepAlive (line 31) | type canKeepAlive interface function tryKeepAlive (line 41) | func tryKeepAlive(conn net.Conn, keepAlive bool) { function tryLinger (line 69) | func tryLinger(conn net.Conn, sec int) { type tcpGatedMaListener (line 79) | type tcpGatedMaListener struct method Accept (line 84) | func (ll *tcpGatedMaListener) Accept() (manet.Conn, network.ConnManage... type Option (line 98) | type Option function DisableReuseport (line 100) | func DisableReuseport() Option { function WithConnectionTimeout (line 107) | func WithConnectionTimeout(d time.Duration) Option { function WithMetrics (line 114) | func WithMetrics() Option { function WithDialerForAddr (line 123) | func WithDialerForAddr(d DialerForAddr) Option { type ContextDialer (line 130) | type ContextDialer interface type DialerForAddr (line 137) | type DialerForAddr type TcpTransport (line 140) | type TcpTransport struct method CanDial (line 193) | func (t *TcpTransport) CanDial(addr ma.Multiaddr) bool { method customDial (line 197) | func (t *TcpTransport) customDial(ctx context.Context, raddr ma.Multia... method maDial (line 226) | func (t *TcpTransport) maDial(ctx context.Context, raddr ma.Multiaddr)... method Dial (line 250) | func (t *TcpTransport) Dial(ctx context.Context, raddr ma.Multiaddr, p... method DialWithUpdates (line 254) | func (t *TcpTransport) DialWithUpdates(ctx context.Context, raddr ma.M... method dialWithScope (line 269) | func (t *TcpTransport) dialWithScope(ctx context.Context, raddr ma.Mul... method UseReuseport (line 306) | func (t *TcpTransport) UseReuseport() bool { method unsharedMAListen (line 310) | func (t *TcpTransport) unsharedMAListen(laddr ma.Multiaddr) (manet.Lis... method Listen (line 318) | func (t *TcpTransport) Listen(laddr ma.Multiaddr) (transport.Listener,... method Protocols (line 347) | func (t *TcpTransport) Protocols() []int { method Proxy (line 352) | func (t *TcpTransport) Proxy() bool { method String (line 356) | func (t *TcpTransport) String() string { function NewTCPTransport (line 171) | func NewTCPTransport(upgrader transport.Upgrader, rcmgr network.Resource... FILE: p2p/transport/tcp/tcp_test.go function TestTcpTransport (line 29) | func TestTcpTransport(t *testing.T) { function TestTcpTransportWithMetrics (line 51) | func TestTcpTransportWithMetrics(t *testing.T) { function TestResourceManager (line 68) | func TestResourceManager(t *testing.T) { function TestTcpTransportCantDialDNS (line 118) | func TestTcpTransportCantDialDNS(t *testing.T) { function TestTcpTransportCantListenUtp (line 136) | func TestTcpTransportCantListenUtp(t *testing.T) { function TestDialWithUpdates (line 153) | func TestDialWithUpdates(t *testing.T) { function makeInsecureMuxer (line 201) | func makeInsecureMuxer(t *testing.T) (peer.ID, []sec.SecureTransport) { type errDialer (line 210) | type errDialer struct method DialContext (line 214) | func (d errDialer) DialContext(_ context.Context, _, _ string) (net.Co... function TestCustomOverrideTCPDialer (line 218) | func TestCustomOverrideTCPDialer(t *testing.T) { FILE: p2p/transport/tcpreuse/connwithscope.go type connWithScope (line 11) | type connWithScope struct method Close (line 16) | func (c *connWithScope) Close() error { function manetConnWithScope (line 21) | func manetConnWithScope(c manet.Conn, scope network.ConnManagementScope)... FILE: p2p/transport/tcpreuse/demultiplex.go type DemultiplexedConnType (line 18) | type DemultiplexedConnType method String (line 27) | func (t DemultiplexedConnType) String() string { method IsKnown (line 40) | func (t DemultiplexedConnType) IsKnown() bool { constant DemultiplexedConnType_Unknown (line 21) | DemultiplexedConnType_Unknown DemultiplexedConnType = iota constant DemultiplexedConnType_MultistreamSelect (line 22) | DemultiplexedConnType_MultistreamSelect constant DemultiplexedConnType_HTTP (line 23) | DemultiplexedConnType_HTTP constant DemultiplexedConnType_TLS (line 24) | DemultiplexedConnType_TLS function identifyConnType (line 48) | func identifyConnType(c manet.Conn) (DemultiplexedConnType, manet.Conn, ... function IsMultistreamSelect (line 80) | func IsMultistreamSelect(s Prefix) bool { function IsHTTP (line 84) | func IsHTTP(s Prefix) bool { function IsTLS (line 93) | func IsTLS(s Prefix) bool { FILE: p2p/transport/tcpreuse/demultiplex_test.go function FuzzClash (line 5) | func FuzzClash(f *testing.F) { FILE: p2p/transport/tcpreuse/dialer.go method DialContext (line 11) | func (t *ConnMgr) DialContext(ctx context.Context, raddr ma.Multiaddr) (... FILE: p2p/transport/tcpreuse/internal/sampledconn/sampledconn.go constant peekSize (line 13) | peekSize = 3 function PeekBytes (line 19) | func PeekBytes(conn manet.Conn) (PeekedBytes, manet.Conn, error) { type wrappedSampledConn (line 27) | type wrappedSampledConn struct method Read (line 71) | func (sc *wrappedSampledConn) Read(b []byte) (int, error) { type tcpConnInterface (line 37) | type tcpConnInterface interface type ManetTCPConnInterface (line 54) | type ManetTCPConnInterface interface function newWrappedSampledConn (line 59) | func newWrappedSampledConn(conn ManetTCPConnInterface) (PeekedBytes, *wr... FILE: p2p/transport/tcpreuse/internal/sampledconn/sampledconn_test.go function TestSampledConn (line 16) | func TestSampledConn(t *testing.T) { function spawnServerAndClientConn (line 81) | func spawnServerAndClientConn(t *testing.T) (serverConn manet.Conn, clie... function TestHandleNoBytes (line 107) | func TestHandleNoBytes(t *testing.T) { function TestHandle1ByteAndClose (line 122) | func TestHandle1ByteAndClose(t *testing.T) { function TestSlowBytes (line 139) | func TestSlowBytes(t *testing.T) { FILE: p2p/transport/tcpreuse/listener.go constant acceptQueueSize (line 19) | acceptQueueSize = 64 constant acceptTimeout (line 22) | acceptTimeout = 30 * time.Second type ConnMgr (line 27) | type ConnMgr struct method gatedMaListen (line 45) | func (t *ConnMgr) gatedMaListen(listenAddr ma.Multiaddr) (transport.Ga... method useReuseport (line 62) | func (t *ConnMgr) useReuseport() bool { method DemultiplexedListen (line 86) | func (t *ConnMgr) DemultiplexedListen(laddr ma.Multiaddr, connType Dem... function NewConnMgr (line 36) | func NewConnMgr(enableReuseport bool, upgrader transport.Upgrader) *Conn... function getTCPAddr (line 66) | func getTCPAddr(listenAddr ma.Multiaddr) (ma.Multiaddr, error) { type multiplexedListener (line 143) | type multiplexedListener struct method DemultiplexedListen (line 155) | func (m *multiplexedListener) DemultiplexedListen(connType Demultiplex... method run (line 180) | func (m *multiplexedListener) run() error { method Close (line 251) | func (m *multiplexedListener) Close() error { method closeListener (line 262) | func (m *multiplexedListener) closeListener() error { method removeDemultiplexedListener (line 268) | func (m *multiplexedListener) removeDemultiplexedListener(c Demultiple... type demultiplexedListener (line 281) | type demultiplexedListener struct method Accept (line 289) | func (m *demultiplexedListener) Accept() (manet.Conn, network.ConnMana... method Close (line 298) | func (m *demultiplexedListener) Close() error { method Multiaddr (line 303) | func (m *demultiplexedListener) Multiaddr() ma.Multiaddr { method Addr (line 307) | func (m *demultiplexedListener) Addr() net.Addr { FILE: p2p/transport/tcpreuse/listener_test.go function selfSignedTLSConfig (line 30) | func selfSignedTLSConfig(t *testing.T) *tls.Config { type maListener (line 59) | type maListener struct method Accept (line 65) | func (ml *maListener) Accept() (manet.Conn, error) { type wsHandler (line 70) | type wsHandler struct method ServeHTTP (line 72) | func (wh wsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { function upgrader (line 78) | func upgrader(t *testing.T) transport.Upgrader { function TestListenerSingle (line 85) | func TestListenerSingle(t *testing.T) { function TestListenerMultiplexed (line 248) | func TestListenerMultiplexed(t *testing.T) { function TestListenerClose (line 425) | func TestListenerClose(t *testing.T) { function setDeferReset (line 472) | func setDeferReset[T any](t testing.TB, ptr *T, val T) { function TestHitTimeout (line 480) | func TestHitTimeout(t *testing.T) { FILE: p2p/transport/tcpreuse/reuseport.go constant envReuseport (line 12) | envReuseport = "LIBP2P_TCP_REUSEPORT" function init (line 17) | func init() { function ReuseportIsAvailable (line 33) | func ReuseportIsAvailable() bool { FILE: p2p/transport/testsuite/stream_suite.go function init (line 30) | func init() { type Options (line 44) | type Options struct function fullClose (line 52) | func fullClose(t *testing.T, s network.MuxedStream) { function randBuf (line 70) | func randBuf(size int) []byte { function echoStream (line 80) | func echoStream(t *testing.T, s network.MuxedStream) { function echo (line 87) | func echo(t *testing.T, c transport.CapableConn) { function serve (line 104) | func serve(t *testing.T, l transport.Listener) { function SubtestStress (line 123) | func SubtestStress(t *testing.T, ta, tb transport.Transport, maddr ma.Mu... function SubtestStreamOpenStress (line 237) | func SubtestStreamOpenStress(t *testing.T, ta, tb transport.Transport, m... function SubtestStreamReset (line 335) | func SubtestStreamReset(t *testing.T, ta, tb transport.Transport, maddr ... function SubtestStress1Conn1Stream1Msg (line 390) | func SubtestStress1Conn1Stream1Msg(t *testing.T, ta, tb transport.Transp... function SubtestStress1Conn1Stream100Msg (line 400) | func SubtestStress1Conn1Stream100Msg(t *testing.T, ta, tb transport.Tran... function SubtestStress1Conn100Stream100Msg (line 410) | func SubtestStress1Conn100Stream100Msg(t *testing.T, ta, tb transport.Tr... function SubtestStressManyConn10Stream50Msg (line 420) | func SubtestStressManyConn10Stream50Msg(t *testing.T, ta, tb transport.T... function SubtestStress1Conn1000Stream10Msg (line 436) | func SubtestStress1Conn1000Stream10Msg(t *testing.T, ta, tb transport.Tr... function SubtestStress1Conn100Stream100Msg10MB (line 446) | func SubtestStress1Conn100Stream100Msg10MB(t *testing.T, ta, tb transpor... FILE: p2p/transport/testsuite/transport_suite.go function SubtestProtocols (line 19) | func SubtestProtocols(t *testing.T, ta, tb transport.Transport, maddr ma... function SubtestBasic (line 50) | func SubtestBasic(t *testing.T, ta, tb transport.Transport, maddr ma.Mul... function SubtestPingPong (line 159) | func SubtestPingPong(t *testing.T, ta, tb transport.Transport, maddr ma.... function SubtestCancel (line 291) | func SubtestCancel(t *testing.T, ta, tb transport.Transport, maddr ma.Mu... FILE: p2p/transport/testsuite/utils_suite.go type TransportSubTestFn (line 14) | type TransportSubTestFn function getFunctionName (line 33) | func getFunctionName(i any) string { function SubtestTransport (line 37) | func SubtestTransport(t *testing.T, ta, tb transport.Transport, addr str... function SubtestTransportWithFs (line 42) | func SubtestTransportWithFs(t *testing.T, ta, tb transport.Transport, ad... FILE: p2p/transport/webrtc/connection.go constant maxAcceptQueueLen (line 25) | maxAcceptQueueLen = 256 type errConnectionTimeout (line 27) | type errConnectionTimeout struct method Error (line 31) | func (errConnectionTimeout) Error() string { return "connection time... method Timeout (line 32) | func (errConnectionTimeout) Timeout() bool { return true } method Temporary (line 33) | func (errConnectionTimeout) Temporary() bool { return false } type dataChannel (line 37) | type dataChannel struct type connection (line 42) | type connection struct method ConnState (line 125) | func (c *connection) ConnState() network.ConnectionState { method Close (line 130) | func (c *connection) Close() error { method As (line 135) | func (c *connection) As(target any) bool { method CloseWithError (line 145) | func (c *connection) CloseWithError(_ network.ConnErrorCode) error { method closeWithError (line 150) | func (c *connection) closeWithError(err error) { method IsClosed (line 170) | func (c *connection) IsClosed() bool { method OpenStream (line 174) | func (c *connection) OpenStream(ctx context.Context) (network.MuxedStr... method AcceptStream (line 207) | func (c *connection) AcceptStream() (network.MuxedStream, error) { method LocalPeer (line 221) | func (c *connection) LocalPeer() peer.ID { return c.localPe... method RemotePeer (line 222) | func (c *connection) RemotePeer() peer.ID { return c.remoteP... method RemotePublicKey (line 223) | func (c *connection) RemotePublicKey() ic.PubKey { return c.remoteK... method LocalMultiaddr (line 224) | func (c *connection) LocalMultiaddr() ma.Multiaddr { return c.localMu... method RemoteMultiaddr (line 225) | func (c *connection) RemoteMultiaddr() ma.Multiaddr { return c.remoteM... method Scope (line 226) | func (c *connection) Scope() network.ConnScope { return c.scope } method Transport (line 227) | func (c *connection) Transport() tpt.Transport { return c.transpo... method addStream (line 229) | func (c *connection) addStream(str *stream) error { method removeStream (line 242) | func (c *connection) removeStream(id uint16) { method onConnectionStateChange (line 248) | func (c *connection) onConnectionStateChange(state webrtc.PeerConnecti... method detachChannel (line 271) | func (c *connection) detachChannel(ctx context.Context, dc *webrtc.Dat... function newConnection (line 67) | func newConnection( FILE: p2p/transport/webrtc/fingerprint.go function parseFingerprint (line 20) | func parseFingerprint(cert *x509.Certificate, algo crypto.Hash) ([]byte,... function decodeRemoteFingerprint (line 31) | func decodeRemoteFingerprint(maddr ma.Multiaddr) (*mh.DecodedMultihash, ... function encodeDTLSFingerprint (line 43) | func encodeDTLSFingerprint(fp webrtc.DTLSFingerprint) (string, error) { FILE: p2p/transport/webrtc/hex.go function encodeInterspersedHex (line 18) | func encodeInterspersedHex(src []byte) string { function decodeInterspersedHexFromASCIIString (line 48) | func decodeInterspersedHexFromASCIIString(s string) ([]byte, error) { FILE: p2p/transport/webrtc/hex_test.go function TestEncodeInterspersedHex (line 11) | func TestEncodeInterspersedHex(t *testing.T) { function BenchmarkEncodeInterspersedHex (line 17) | func BenchmarkEncodeInterspersedHex(b *testing.B) { function TestDecodeInterpersedHexStringLowerCase (line 26) | func TestDecodeInterpersedHexStringLowerCase(t *testing.T) { function TestDecodeInterpersedHexStringMixedCase (line 32) | func TestDecodeInterpersedHexStringMixedCase(t *testing.T) { function TestDecodeInterpersedHexStringOneByte (line 38) | func TestDecodeInterpersedHexStringOneByte(t *testing.T) { function TestDecodeInterpersedHexBytesLowerCase (line 44) | func TestDecodeInterpersedHexBytesLowerCase(t *testing.T) { function BenchmarkDecode (line 50) | func BenchmarkDecode(b *testing.B) { function TestDecodeInterpersedHexBytesMixedCase (line 57) | func TestDecodeInterpersedHexBytesMixedCase(t *testing.T) { function TestDecodeInterpersedHexBytesOneByte (line 63) | func TestDecodeInterpersedHexBytesOneByte(t *testing.T) { function TestEncodeInterperseHexNilSlice (line 69) | func TestEncodeInterperseHexNilSlice(t *testing.T) { function TestDecodeInterspersedHexEmpty (line 74) | func TestDecodeInterspersedHexEmpty(t *testing.T) { function TestDecodeInterpersedHexFromASCIIStringEmpty (line 80) | func TestDecodeInterpersedHexFromASCIIStringEmpty(t *testing.T) { function TestDecodeInterpersedHexInvalid (line 86) | func TestDecodeInterpersedHexInvalid(t *testing.T) { function TestDecodeInterpersedHexValid (line 93) | func TestDecodeInterpersedHexValid(t *testing.T) { function TestDecodeInterpersedHexFromASCIIStringInvalid (line 99) | func TestDecodeInterpersedHexFromASCIIStringInvalid(t *testing.T) { function TestDecodeInterpersedHexFromASCIIStringValid (line 106) | func TestDecodeInterpersedHexFromASCIIStringValid(t *testing.T) { function FuzzInterpersedHex (line 112) | func FuzzInterpersedHex(f *testing.F) { function FuzzInterspersedHexASCII (line 123) | func FuzzInterspersedHexASCII(f *testing.F) { FILE: p2p/transport/webrtc/listener.go type connMultiaddrs (line 26) | type connMultiaddrs struct method LocalMultiaddr (line 32) | func (c *connMultiaddrs) LocalMultiaddr() ma.Multiaddr { return c.loc... method RemoteMultiaddr (line 33) | func (c *connMultiaddrs) RemoteMultiaddr() ma.Multiaddr { return c.rem... constant candidateSetupTimeout (line 36) | candidateSetupTimeout = 10 * time.Second constant DefaultMaxInFlightConnections (line 41) | DefaultMaxInFlightConnections = 128 type listener (line 44) | type listener struct method listen (line 109) | func (l *listener) listen() { method handleCandidate (line 154) | func (l *listener) handleCandidate(ctx context.Context, candidate udpm... method setupConnection (line 183) | func (l *listener) setupConnection( method Accept (line 292) | func (l *listener) Accept() (tpt.CapableConn, error) { method Close (line 301) | func (l *listener) Close() error { method Addr (line 321) | func (l *listener) Addr() net.Addr { method Multiaddr (line 325) | func (l *listener) Multiaddr() ma.Multiaddr { function newListener (line 67) | func newListener(transport *WebRTCTransport, laddr ma.Multiaddr, socket ... function addOnConnectionStateChangeCallback (line 333) | func addOnConnectionStateChangeCallback(pc *webrtc.PeerConnection) <-cha... FILE: p2p/transport/webrtc/logger.go type pionLogger (line 22) | type pionLogger struct method Debug (line 30) | func (l pionLogger) Debug(s string) { method Debugf (line 34) | func (l pionLogger) Debugf(s string, args ...any) { method Error (line 40) | func (l pionLogger) Error(s string) { method Errorf (line 44) | func (l pionLogger) Errorf(s string, args ...any) { method Info (line 50) | func (l pionLogger) Info(s string) { method Infof (line 54) | func (l pionLogger) Infof(s string, args ...any) { method Warn (line 60) | func (l pionLogger) Warn(s string) { method Warnf (line 64) | func (l pionLogger) Warnf(s string, args ...any) { method Trace (line 70) | func (l pionLogger) Trace(s string) { method Tracef (line 73) | func (l pionLogger) Tracef(s string, args ...any) { type loggerFactory (line 80) | type loggerFactory struct method NewLogger (line 85) | func (loggerFactory) NewLogger(_ string) pionLogging.LeveledLogger { FILE: p2p/transport/webrtc/pb/message.pb.go constant _ (line 19) | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) constant _ (line 21) | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) type Message_Flag (line 24) | type Message_Flag method Enum (line 57) | func (x Message_Flag) Enum() *Message_Flag { method String (line 63) | func (x Message_Flag) String() string { method Descriptor (line 67) | func (Message_Flag) Descriptor() protoreflect.EnumDescriptor { method Type (line 71) | func (Message_Flag) Type() protoreflect.EnumType { method Number (line 75) | func (x Message_Flag) Number() protoreflect.EnumNumber { method UnmarshalJSON (line 80) | func (x *Message_Flag) UnmarshalJSON(b []byte) error { method EnumDescriptor (line 90) | func (Message_Flag) EnumDescriptor() ([]byte, []int) { constant Message_FIN (line 28) | Message_FIN Message_Flag = 0 constant Message_STOP_SENDING (line 31) | Message_STOP_SENDING Message_Flag = 1 constant Message_RESET (line 34) | Message_RESET Message_Flag = 2 constant Message_FIN_ACK (line 38) | Message_FIN_ACK Message_Flag = 3 type Message (line 94) | type Message struct method Reset (line 103) | func (x *Message) Reset() { method String (line 110) | func (x *Message) String() string { method ProtoMessage (line 114) | func (*Message) ProtoMessage() {} method ProtoReflect (line 116) | func (x *Message) ProtoReflect() protoreflect.Message { method Descriptor (line 129) | func (*Message) Descriptor() ([]byte, []int) { method GetFlag (line 133) | func (x *Message) GetFlag() Message_Flag { method GetMessage (line 140) | func (x *Message) GetMessage() []byte { method GetErrorCode (line 147) | func (x *Message) GetErrorCode() uint32 { constant file_p2p_transport_webrtc_pb_message_proto_rawDesc (line 156) | file_p2p_transport_webrtc_pb_message_proto_rawDesc = "" + function file_p2p_transport_webrtc_pb_message_proto_rawDescGZIP (line 174) | func file_p2p_transport_webrtc_pb_message_proto_rawDescGZIP() []byte { function init (line 196) | func init() { file_p2p_transport_webrtc_pb_message_proto_init() } function file_p2p_transport_webrtc_pb_message_proto_init (line 197) | func file_p2p_transport_webrtc_pb_message_proto_init() { FILE: p2p/transport/webrtc/sdp.go constant clientSDP (line 17) | clientSDP = `v=0 function createClientSDP (line 34) | func createClientSDP(addr *net.UDPAddr, ufrag string) string { constant serverSDP (line 52) | serverSDP = `v=0 function createServerSDP (line 72) | func createServerSDP(addr *net.UDPAddr, ufrag string, fingerprint multih... function getSupportedSDPHash (line 103) | func getSupportedSDPHash(code uint64) (crypto.Hash, bool) { function getSupportedSDPString (line 125) | func getSupportedSDPString(code uint64) (string, error) { FILE: p2p/transport/webrtc/sdp_test.go constant expectedServerSDP (line 12) | expectedServerSDP = `v=0 function TestRenderServerSDP (line 32) | func TestRenderServerSDP(t *testing.T) { constant expectedClientSDP (line 51) | expectedClientSDP = `v=0 function TestRenderClientSDP (line 68) | func TestRenderClientSDP(t *testing.T) { function BenchmarkRenderClientSDP (line 75) | func BenchmarkRenderClientSDP(b *testing.B) { function BenchmarkRenderServerSDP (line 84) | func BenchmarkRenderServerSDP(b *testing.B) { FILE: p2p/transport/webrtc/stream.go constant maxSendMessageSize (line 20) | maxSendMessageSize = 16384 constant protoOverhead (line 22) | protoOverhead = 5 constant varintOverhead (line 29) | varintOverhead = 2 constant maxTotalControlMessagesSize (line 36) | maxTotalControlMessagesSize = 50 constant maxFINACKWait (line 40) | maxFINACKWait = 10 * time.Second constant maxReceiveMessageSize (line 43) | maxReceiveMessageSize = 256<<10 + 1<<10 type receiveState (line 46) | type receiveState constant receiveStateReceiving (line 49) | receiveStateReceiving receiveState = iota constant receiveStateDataRead (line 50) | receiveStateDataRead constant receiveStateReset (line 51) | receiveStateReset type sendState (line 54) | type sendState constant sendStateSending (line 57) | sendStateSending sendState = iota constant sendStateDataSent (line 58) | sendStateDataSent constant sendStateDataReceived (line 59) | sendStateDataReceived constant sendStateReset (line 60) | sendStateReset type stream (line 65) | type stream struct method Close (line 126) | func (s *stream) Close() error { method Reset (line 150) | func (s *stream) Reset() error { method ResetWithError (line 154) | func (s *stream) ResetWithError(errCode network.StreamErrorCode) error { method closeForShutdown (line 169) | func (s *stream) closeForShutdown(closeErr error) { method SetDeadline (line 179) | func (s *stream) SetDeadline(t time.Time) error { method processIncomingFlag (line 186) | func (s *stream) processIncomingFlag(msg *pb.Message) { method spawnControlMessageReader (line 227) | func (s *stream) spawnControlMessageReader() { method cleanup (line 287) | func (s *stream) cleanup() { function newStream (line 104) | func newStream( FILE: p2p/transport/webrtc/stream_read.go method Read (line 11) | func (s *stream) Read(b []byte) (int, error) { method SetReadDeadline (line 91) | func (s *stream) SetReadDeadline(t time.Time) error { method setDataChannelReadDeadline (line 100) | func (s *stream) setDataChannelReadDeadline(t time.Time) error { method CloseRead (line 104) | func (s *stream) CloseRead() error { method closeRead (line 108) | func (s *stream) closeRead(errCode network.StreamErrorCode, remote bool)... FILE: p2p/transport/webrtc/stream_test.go type detachedChan (line 26) | type detachedChan struct function getDetachedDataChannels (line 31) | func getDetachedDataChannels(t *testing.T) (detachedChan, detachedChan) { function assertDataChannelOpen (line 108) | func assertDataChannelOpen(t *testing.T, dc *datachannel.DataChannel) { function assertDataChannelClosed (line 128) | func assertDataChannelClosed(t *testing.T, dc *datachannel.DataChannel) { function TestStreamSimpleReadWriteClose (line 148) | func TestStreamSimpleReadWriteClose(t *testing.T) { function TestStreamPartialReads (line 195) | func TestStreamPartialReads(t *testing.T) { function TestStreamSkipEmptyFrames (line 218) | func TestStreamSkipEmptyFrames(t *testing.T) { function TestStreamReadReturnsOnClose (line 253) | func TestStreamReadReturnsOnClose(t *testing.T) { function TestStreamResets (line 275) | func TestStreamResets(t *testing.T) { function TestStreamReadDeadlineAsync (line 312) | func TestStreamReadDeadlineAsync(t *testing.T) { function TestStreamWriteDeadlineAsync (line 343) | func TestStreamWriteDeadlineAsync(t *testing.T) { function TestStreamReadAfterClose (line 373) | func TestStreamReadAfterClose(t *testing.T) { function TestStreamCloseAfterFINACK (line 399) | func TestStreamCloseAfterFINACK(t *testing.T) { function TestStreamFinAckAfterStopSending (line 427) | func TestStreamFinAckAfterStopSending(t *testing.T) { function TestStreamConcurrentClose (line 459) | func TestStreamConcurrentClose(t *testing.T) { function TestStreamResetAfterClose (line 495) | func TestStreamResetAfterClose(t *testing.T) { function TestStreamDataChannelCloseOnFINACK (line 520) | func TestStreamDataChannelCloseOnFINACK(t *testing.T) { function TestStreamChunking (line 543) | func TestStreamChunking(t *testing.T) { FILE: p2p/transport/webrtc/stream_write.go constant minMessageSize (line 16) | minMessageSize = 1 << 10 method Write (line 18) | func (s *stream) Write(b []byte) (int, error) { method SetWriteDeadline (line 102) | func (s *stream) SetWriteDeadline(t time.Time) error { method sendBufferSize (line 113) | func (s *stream) sendBufferSize() int { method sendBufferLowThreshold (line 119) | func (s *stream) sendBufferLowThreshold() int { method availableSendSpace (line 123) | func (s *stream) availableSendSpace() int { method cancelWrite (line 132) | func (s *stream) cancelWrite(errCode network.StreamErrorCode) error { method CloseWrite (line 150) | func (s *stream) CloseWrite() error { method notifyWriteStateChanged (line 164) | func (s *stream) notifyWriteStateChanged() { FILE: p2p/transport/webrtc/transport.go function init (line 44) | func init() { constant handshakeChannelNegotiated (line 58) | handshakeChannelNegotiated = true constant handshakeChannelID (line 63) | handshakeChannelID = uint16(0) constant DefaultDisconnectedTimeout (line 69) | DefaultDisconnectedTimeout = 20 * time.Second constant DefaultFailedTimeout (line 70) | DefaultFailedTimeout = 30 * time.Second constant DefaultKeepaliveTimeout (line 71) | DefaultKeepaliveTimeout = 15 * time.Second constant sctpReceiveBufferSize (line 79) | sctpReceiveBufferSize = 10 * maxReceiveMessageSize type WebRTCTransport (line 82) | type WebRTCTransport struct method ListenOrder (line 174) | func (t *WebRTCTransport) ListenOrder() int { method Protocols (line 178) | func (t *WebRTCTransport) Protocols() []int { method Proxy (line 182) | func (t *WebRTCTransport) Proxy() bool { method CanDial (line 186) | func (t *WebRTCTransport) CanDial(addr ma.Multiaddr) bool { method Listen (line 196) | func (t *WebRTCTransport) Listen(addr ma.Multiaddr) (tpt.Listener, err... method listenSocket (line 224) | func (t *WebRTCTransport) listenSocket(socket net.PacketConn) (tpt.Lis... method Dial (line 254) | func (t *WebRTCTransport) Dial(ctx context.Context, remoteMultiaddr ma... method dial (line 271) | func (t *WebRTCTransport) dial(ctx context.Context, scope network.Conn... method getCertificateFingerprint (line 444) | func (t *WebRTCTransport) getCertificateFingerprint() (webrtc.DTLSFing... method generateNoisePrologue (line 452) | func (t *WebRTCTransport) generateNoisePrologue(pc *webrtc.PeerConnect... method noiseHandshake (line 498) | func (t *WebRTCTransport) noiseHandshake(ctx context.Context, pc *webr... method AddCertHashes (line 527) | func (t *WebRTCTransport) AddCertHashes(addr ma.Multiaddr) (ma.Multiad... type Option (line 101) | type Option type iceTimeouts (line 103) | type iceTimeouts struct type ListenUDPFn (line 109) | type ListenUDPFn function New (line 111) | func New(privKey ic.PrivKey, psk pnet.PSK, gater connmgr.ConnectionGater... function genUfrag (line 423) | func genUfrag() string { type netConnWrapper (line 545) | type netConnWrapper struct method LocalAddr (line 549) | func (netConnWrapper) LocalAddr() net.Addr { return nil } method RemoteAddr (line 550) | func (netConnWrapper) RemoteAddr() net.Addr { return nil } method Close (line 551) | func (w netConnWrapper) Close() error { function detachHandshakeDataChannel (line 559) | func detachHandshakeDataChannel(ctx context.Context, dc *webrtc.DataChan... type webRTCConnection (line 584) | type webRTCConnection struct function newWebRTCConnection (line 591) | func newWebRTCConnection(settings webrtc.SettingEngine, config webrtc.Co... function IsWebRTCDirectMultiaddr (line 646) | func IsWebRTCDirectMultiaddr(addr ma.Multiaddr) (bool, int) { FILE: p2p/transport/webrtc/transport_test.go function getTransport (line 36) | func getTransport(t *testing.T, opts ...Option) (*WebRTCTransport, peer.... function TestNullRcmgrTransport (line 49) | func TestNullRcmgrTransport(t *testing.T) { function TestIsWebRTCDirectMultiaddr (line 70) | func TestIsWebRTCDirectMultiaddr(t *testing.T) { function TestTransportWebRTC_CanDial (line 122) | func TestTransportWebRTC_CanDial(t *testing.T) { function TestTransportAddCertHasher (line 147) | func TestTransportAddCertHasher(t *testing.T) { function TestTransportWebRTC_ListenFailsOnNonWebRTCMultiaddr (line 162) | func TestTransportWebRTC_ListenFailsOnNonWebRTCMultiaddr(t *testing.T) { function TestTransportWebRTC_DialFailsOnUnsupportedHashFunction (line 178) | func TestTransportWebRTC_DialFailsOnUnsupportedHashFunction(t *testing.T) { function TestTransportWebRTC_CanListenSingle (line 196) | func TestTransportWebRTC_CanListenSingle(t *testing.T) { function WithListenerMaxInFlightConnections (line 226) | func WithListenerMaxInFlightConnections(m uint32) Option { function TestTransportWebRTC_CanListenMultiple (line 237) | func TestTransportWebRTC_CanListenMultiple(t *testing.T) { function TestTransportWebRTC_CanCreateSuccessiveConnections (line 284) | func TestTransportWebRTC_CanCreateSuccessiveConnections(t *testing.T) { function TestTransportWebRTC_ListenerCanCreateStreams (line 314) | func TestTransportWebRTC_ListenerCanCreateStreams(t *testing.T) { function TestTransportWebRTC_DialerCanCreateStreams (line 360) | func TestTransportWebRTC_DialerCanCreateStreams(t *testing.T) { function TestTransportWebRTC_DialerCanCreateStreamsMultiple (line 406) | func TestTransportWebRTC_DialerCanCreateStreamsMultiple(t *testing.T) { function TestTransportWebRTC_Deadline (line 497) | func TestTransportWebRTC_Deadline(t *testing.T) { function TestTransportWebRTC_StreamWriteBufferContention (line 560) | func TestTransportWebRTC_StreamWriteBufferContention(t *testing.T) { function TestTransportWebRTC_RemoteReadsAfterClose (line 609) | func TestTransportWebRTC_RemoteReadsAfterClose(t *testing.T) { function TestTransportWebRTC_RemoteReadsAfterClose2 (line 662) | func TestTransportWebRTC_RemoteReadsAfterClose2(t *testing.T) { function TestTransportWebRTC_Close (line 713) | func TestTransportWebRTC_Close(t *testing.T) { function TestTransportWebRTC_PeerConnectionDTLSFailed (line 754) | func TestTransportWebRTC_PeerConnectionDTLSFailed(t *testing.T) { function newUDPConnLocalhost (line 779) | func newUDPConnLocalhost(t testing.TB) *net.UDPConn { function TestConnectionTimeoutOnListener (line 787) | func TestConnectionTimeoutOnListener(t *testing.T) { function TestMaxInFlightRequests (line 868) | func TestMaxInFlightRequests(t *testing.T) { function TestGenUfrag (line 900) | func TestGenUfrag(t *testing.T) { function TestManyConnections (line 907) | func TestManyConnections(t *testing.T) { function TestConnectionClosedWhenRemoteCloses (line 1021) | func TestConnectionClosedWhenRemoteCloses(t *testing.T) { FILE: p2p/transport/webrtc/udpmux/mux.go constant ReceiveBufSize (line 26) | ReceiveBufSize = 1500 type Candidate (line 28) | type Candidate struct type UDPMux (line 47) | type UDPMux struct method Start (line 85) | func (mux *UDPMux) Start() { method GetListenAddresses (line 94) | func (mux *UDPMux) GetListenAddresses() []net.Addr { method GetConn (line 102) | func (mux *UDPMux) GetConn(ufrag string, addr net.Addr) (net.PacketCon... method Close (line 118) | func (mux *UDPMux) Close() error { method writeTo (line 131) | func (mux *UDPMux) writeTo(buf []byte, addr net.Addr) (int, error) { method readLoop (line 135) | func (mux *UDPMux) readLoop() { method processPacket (line 163) | func (mux *UDPMux) processPacket(buf []byte, addr net.Addr) (processed... method Accept (line 224) | func (mux *UDPMux) Accept(ctx context.Context) (Candidate, error) { method RemoveConnByUfrag (line 264) | func (mux *UDPMux) RemoveConnByUfrag(ufrag string) { method getOrCreateConn (line 285) | func (mux *UDPMux) getOrCreateConn(ufrag string, isIPv6 bool, _ *UDPMu... function NewUDPMux (line 70) | func NewUDPMux(socket net.PacketConn) *UDPMux { type ufragConnKey (line 235) | type ufragConnKey struct function ufragFromSTUNMessage (line 249) | func ufragFromSTUNMessage(msg *stun.Message) (string, error) { FILE: p2p/transport/webrtc/udpmux/mux_test.go function getSTUNBindingRequest (line 15) | func getSTUNBindingRequest(ufrag string) *stun.Message { function setupMapping (line 27) | func setupMapping(t *testing.T, ufrag string, from net.PacketConn, m *UD... function newPacketConn (line 34) | func newPacketConn(t *testing.T) net.PacketConn { function TestAccept (line 43) | func TestAccept(t *testing.T) { function TestGetConn (line 81) | func TestGetConn(t *testing.T) { function TestRemoveConnByUfrag (line 136) | func TestRemoveConnByUfrag(t *testing.T) { function TestMuxedConnection (line 186) | func TestMuxedConnection(t *testing.T) { function TestRemovingUfragClosesConn (line 251) | func TestRemovingUfragClosesConn(t *testing.T) { FILE: p2p/transport/webrtc/udpmux/muxed_connection.go type packet (line 12) | type packet struct constant queueLen (line 19) | queueLen = 128 type muxedConnection (line 25) | type muxedConnection struct method Push (line 46) | func (c *muxedConnection) Push(buf []byte, addr net.Addr) error { method ReadFrom (line 58) | func (c *muxedConnection) ReadFrom(buf []byte) (int, net.Addr, error) { method WriteTo (line 72) | func (c *muxedConnection) WriteTo(p []byte, addr net.Addr) (n int, err... method Close (line 76) | func (c *muxedConnection) Close() error { method close (line 91) | func (c *muxedConnection) close() { method LocalAddr (line 104) | func (c *muxedConnection) LocalAddr() net.Addr { return c.mux.socket.L... method SetDeadline (line 106) | func (*muxedConnection) SetDeadline(_ time.Time) error { method SetReadDeadline (line 111) | func (*muxedConnection) SetReadDeadline(_ time.Time) error { method SetWriteDeadline (line 116) | func (*muxedConnection) SetWriteDeadline(_ time.Time) error { function newMuxedConnection (line 35) | func newMuxedConnection(mux *UDPMux, ufrag string) *muxedConnection { FILE: p2p/transport/websocket/addrs.go type Addr (line 14) | type Addr struct method Network (line 21) | func (addr *Addr) Network() string { function NewAddr (line 28) | func NewAddr(host string) *Addr { function NewAddrWithScheme (line 36) | func NewAddrWithScheme(host string, isSecure bool) *Addr { function ConvertWebsocketMultiaddrToNetAddr (line 49) | func ConvertWebsocketMultiaddrToNetAddr(maddr ma.Multiaddr) (net.Addr, e... function ParseWebsocketNetAddr (line 57) | func ParseWebsocketNetAddr(a net.Addr) (ma.Multiaddr, error) { function parseMultiaddr (line 107) | func parseMultiaddr(maddr ma.Multiaddr) (*url.URL, error) { type parsedWebsocketMultiaddr (line 133) | type parsedWebsocketMultiaddr struct function parseWebsocketMultiaddr (line 141) | func parseWebsocketMultiaddr(a ma.Multiaddr) (parsedWebsocketMultiaddr, ... FILE: p2p/transport/websocket/addrs_test.go function TestMultiaddrParsing (line 10) | func TestMultiaddrParsing(t *testing.T) { type httpAddr (line 25) | type httpAddr struct method Network (line 29) | func (addr *httpAddr) Network() string { function TestParseWebsocketNetAddr (line 33) | func TestParseWebsocketNetAddr(t *testing.T) { function TestConvertWebsocketMultiaddrToNetAddr (line 51) | func TestConvertWebsocketMultiaddrToNetAddr(t *testing.T) { FILE: p2p/transport/websocket/conn.go type Conn (line 22) | type Conn struct method LocalMultiaddr (line 67) | func (c *Conn) LocalMultiaddr() ma.Multiaddr { method RemoteMultiaddr (line 72) | func (c *Conn) RemoteMultiaddr() ma.Multiaddr { method Read (line 76) | func (c *Conn) Read(b []byte) (int, error) { method prepNextReader (line 107) | func (c *Conn) prepNextReader() error { method Write (line 126) | func (c *Conn) Write(b []byte) (n int, err error) { method Close (line 140) | func (c *Conn) Close() error { method closeOnceFn (line 144) | func (c *Conn) closeOnceFn() error { method LocalAddr (line 154) | func (c *Conn) LocalAddr() net.Addr { method RemoteAddr (line 158) | func (c *Conn) RemoteAddr() net.Addr { method SetDeadline (line 162) | func (c *Conn) SetDeadline(t time.Time) error { method SetReadDeadline (line 170) | func (c *Conn) SetReadDeadline(t time.Time) error { method SetWriteDeadline (line 176) | func (c *Conn) SetWriteDeadline(t time.Time) error { function newConn (line 39) | func newConn(raw *ws.Conn, secure bool, scope network.ConnManagementScop... FILE: p2p/transport/websocket/listener.go type listener (line 28) | type listener struct method serve (line 139) | func (l *listener) serve() { method ConnContext (line 150) | func (l *listener) ConnContext(ctx context.Context, c net.Conn) contex... method extractConnFromContext (line 165) | func (l *listener) extractConnFromContext(ctx context.Context) (*negot... method ServeHTTP (line 177) | func (l *listener) ServeHTTP(w http.ResponseWriter, r *http.Request) { method Accept (line 214) | func (l *listener) Accept() (manet.Conn, network.ConnManagementScope, ... method Addr (line 226) | func (l *listener) Addr() net.Addr { method Close (line 230) | func (l *listener) Close() error { method Multiaddr (line 240) | func (l *listener) Multiaddr() ma.Multiaddr { method toMultiaddr (line 48) | func (pwma *parsedWebsocketMultiaddr) toMultiaddr() ma.Multiaddr { function newListener (line 62) | func newListener(a ma.Multiaddr, tlsConf *tls.Config, sharedTcp *tcpreus... type connKey (line 148) | type connKey struct type httpNetListener (line 246) | type httpNetListener struct method Accept (line 253) | func (l *httpNetListener) Accept() (net.Conn, error) { type connWithScope (line 278) | type connWithScope struct method Close (line 283) | func (c connWithScope) Close() error { type negotiatingConn (line 288) | type negotiatingConn struct method Close (line 297) | func (c *negotiatingConn) Close() error { method Unwrap (line 305) | func (c *negotiatingConn) Unwrap() (connWithScope, error) { FILE: p2p/transport/websocket/websocket.go function init (line 47) | func init() { type Option (line 53) | type Option function WithTLSClientConfig (line 60) | func WithTLSClientConfig(c *tls.Config) Option { function WithTLSConfig (line 68) | func WithTLSConfig(conf *tls.Config) Option { function WithHandshakeTimeout (line 78) | func WithHandshakeTimeout(timeout time.Duration) Option { type WebsocketTransport (line 86) | type WebsocketTransport struct method CanDial (line 116) | func (t *WebsocketTransport) CanDial(a ma.Multiaddr) bool { method Protocols (line 120) | func (t *WebsocketTransport) Protocols() []int { method Proxy (line 124) | func (t *WebsocketTransport) Proxy() bool { method Resolve (line 128) | func (t *WebsocketTransport) Resolve(_ context.Context, maddr ma.Multi... method Dial (line 166) | func (t *WebsocketTransport) Dial(ctx context.Context, raddr ma.Multia... method dialWithScope (line 179) | func (t *WebsocketTransport) dialWithScope(ctx context.Context, raddr ... method maDial (line 191) | func (t *WebsocketTransport) maDial(ctx context.Context, raddr ma.Mult... method gatedMaListen (line 248) | func (t *WebsocketTransport) gatedMaListen(a ma.Multiaddr) (transport.... method Listen (line 261) | func (t *WebsocketTransport) Listen(a ma.Multiaddr) (transport.Listene... function New (line 97) | func New(u transport.Upgrader, rcmgr network.ResourceManager, sharedTCP ... type transportListener (line 270) | type transportListener struct method Accept (line 284) | func (l *transportListener) Accept() (transport.CapableConn, error) { type capableConn (line 274) | type capableConn struct method ConnState (line 278) | func (c *capableConn) ConnState() network.ConnectionState { FILE: p2p/transport/websocket/websocket_test.go function newUpgrader (line 42) | func newUpgrader(t *testing.T) (peer.ID, transport.Upgrader) { function newSecureUpgrader (line 52) | func newSecureUpgrader(t *testing.T) (peer.ID, transport.Upgrader) { function newInsecureMuxer (line 62) | func newInsecureMuxer(t *testing.T) (peer.ID, []sec.SecureTransport) { function newSecureMuxer (line 71) | func newSecureMuxer(t *testing.T) (peer.ID, []sec.SecureTransport) { function lastComponent (line 86) | func lastComponent(t *testing.T, a ma.Multiaddr) *ma.Component { function generateTLSConfig (line 100) | func generateTLSConfig(t *testing.T) *tls.Config { function TestCanDial (line 122) | func TestCanDial(t *testing.T) { function testWSSServer (line 148) | func testWSSServer(t *testing.T, listenAddr ma.Multiaddr) (ma.Multiaddr,... function getTLSConf (line 191) | func getTLSConf(t *testing.T, ip net.IP, start, end time.Time) *tls.Conf... function TestHostHeaderWss (line 219) | func TestHostHeaderWss(t *testing.T) { function TestDialWss (line 257) | func TestDialWss(t *testing.T) { function TestDialWssNoClientCert (line 281) | func TestDialWssNoClientCert(t *testing.T) { function TestWebsocketTransport (line 299) | func TestWebsocketTransport(t *testing.T) { function isWSS (line 335) | func isWSS(addr ma.Multiaddr) bool { function connectAndExchangeData (line 345) | func connectAndExchangeData(t *testing.T, laddr ma.Multiaddr, secure boo... function TestWebsocketConnection (line 399) | func TestWebsocketConnection(t *testing.T) { function TestWebsocketListenSecureFailWithoutTLSConfig (line 408) | func TestWebsocketListenSecureFailWithoutTLSConfig(t *testing.T) { function TestWebsocketListenSecureAndInsecure (line 417) | func TestWebsocketListenSecureAndInsecure(t *testing.T) { function TestConcurrentClose (line 462) | func TestConcurrentClose(t *testing.T) { function TestWriteZero (line 500) | func TestWriteZero(t *testing.T) { function TestResolveMultiaddr (line 549) | func TestResolveMultiaddr(t *testing.T) { function TestSocksProxy (line 577) | func TestSocksProxy(t *testing.T) { function TestListenerAddr (line 649) | func TestListenerAddr(t *testing.T) { function TestHandshakeTimeout (line 662) | func TestHandshakeTimeout(t *testing.T) { FILE: p2p/transport/webtransport/cert_manager.go constant clockSkewAllowance (line 21) | clockSkewAllowance = time.Hour constant validityMinusTwoSkew (line 22) | validityMinusTwoSkew = certValidity - (2 * clockSkewAllowance) type certConfig (line 24) | type certConfig struct method Start (line 29) | func (c *certConfig) Start() time.Time { return c.tlsConf.Certificates... method End (line 30) | func (c *certConfig) End() time.Time { return c.tlsConf.Certificates... function newCertConfig (line 32) | func newCertConfig(key ic.PrivKey, start, end time.Time) (*certConfig, e... type certManager (line 48) | type certManager struct method init (line 88) | func (m *certManager) init(hostKey ic.PrivKey) error { method rollConfig (line 110) | func (m *certManager) rollConfig(hostKey ic.PrivKey) error { method background (line 127) | func (m *certManager) background(hostKey ic.PrivKey) { method GetConfig (line 156) | func (m *certManager) GetConfig() *tls.Config { method AddrComponent (line 162) | func (m *certManager) AddrComponent() ma.Multiaddr { method SerializedCertHashes (line 168) | func (m *certManager) SerializedCertHashes() [][]byte { method cacheSerializedCertHashes (line 172) | func (m *certManager) cacheSerializedCertHashes() error { method cacheAddrComponent (line 193) | func (m *certManager) cacheAddrComponent() error { method Close (line 211) | func (m *certManager) Close() error { function newCertManager (line 63) | func newCertManager(hostKey ic.PrivKey, clock clock.Clock) (*certManager... function getCurrentBucketStartTime (line 83) | func getCurrentBucketStartTime(now time.Time, offset time.Duration) time... FILE: p2p/transport/webtransport/cert_manager_test.go function certificateHashFromTLSConfig (line 21) | func certificateHashFromTLSConfig(c *tls.Config) [32]byte { function splitMultiaddr (line 25) | func splitMultiaddr(addr ma.Multiaddr) []ma.Component { function certHashFromComponent (line 34) | func certHashFromComponent(t *testing.T, comp ma.Component) []byte { function TestInitialCert (line 44) | func TestInitialCert(t *testing.T) { function TestCertRenewal (line 67) | func TestCertRenewal(t *testing.T) { function TestDeterministicCertsAcrossReboots (line 115) | func TestDeterministicCertsAcrossReboots(t *testing.T) { function TestDeterministicTimeBuckets (line 146) | func TestDeterministicTimeBuckets(t *testing.T) { function TestGetCurrentBucketStartTimeIsWithinBounds (line 158) | func TestGetCurrentBucketStartTimeIsWithinBounds(t *testing.T) { FILE: p2p/transport/webtransport/conn.go type connSecurityMultiaddrs (line 14) | type connSecurityMultiaddrs struct type connMultiaddrs (line 19) | type connMultiaddrs struct method LocalMultiaddr (line 25) | func (c *connMultiaddrs) LocalMultiaddr() ma.Multiaddr { return c.loc... method RemoteMultiaddr (line 26) | func (c *connMultiaddrs) RemoteMultiaddr() ma.Multiaddr { return c.rem... type conn (line 28) | type conn struct method OpenStream (line 50) | func (c *conn) OpenStream(ctx context.Context) (network.MuxedStream, e... method AcceptStream (line 58) | func (c *conn) AcceptStream() (network.MuxedStream, error) { method allowWindowIncrease (line 66) | func (c *conn) allowWindowIncrease(size uint64) bool { method Close (line 73) | func (c *conn) Close() error { method CloseWithError (line 81) | func (c *conn) CloseWithError(_ network.ConnErrorCode) error { method IsClosed (line 85) | func (c *conn) IsClosed() bool { return c.session.Context().... method Scope (line 86) | func (c *conn) Scope() network.ConnScope { return c.scope } method Transport (line 87) | func (c *conn) Transport() tpt.Transport { return c.transport } method ConnState (line 89) | func (c *conn) ConnState() network.ConnectionState { method As (line 93) | func (c *conn) As(target any) bool { function newConn (line 40) | func newConn(tr *transport, sess *webtransport.Session, sconn *connSecur... FILE: p2p/transport/webtransport/crypto.go constant deterministicCertInfo (line 29) | deterministicCertInfo = "determinisitic cert" function getTLSConf (line 31) | func getTLSConf(key ic.PrivKey, start, end time.Time) (*tls.Config, erro... function generateCert (line 48) | func generateCert(key ic.PrivKey, start, end time.Time) (*x509.Certifica... type ErrCertHashMismatch (line 97) | type ErrCertHashMismatch struct method Error (line 102) | func (e ErrCertHashMismatch) Error() string { function verifyRawCerts (line 106) | func verifyRawCerts(rawCerts [][]byte, certHashes []multihash.DecodedMul... function newDeterministicReader (line 147) | func newDeterministicReader(seed []byte, salt []byte, info string) io.Re... type deterministicSigner (line 155) | type deterministicSigner struct method Sign (line 161) | func (ds deterministicSigner) Sign(rand io.Reader, digest []byte, opts... method Public (line 167) | func (ds deterministicSigner) Public() crypto.PublicKey { FILE: p2p/transport/webtransport/crypto_test.go function sha256Multihash (line 24) | func sha256Multihash(t *testing.T, b []byte) multihash.DecodedMultihash { function generateCertWithKey (line 34) | func generateCertWithKey(t *testing.T, key crypto.PrivateKey, start, end... function TestCertificateVerification (line 57) | func TestCertificateVerification(t *testing.T) { function TestDeterministicCertHashes (line 134) | func TestDeterministicCertHashes(t *testing.T) { FILE: p2p/transport/webtransport/listener.go constant queueLen (line 24) | queueLen = 16 constant handshakeTimeout (line 25) | handshakeTimeout = 10 * time.Second type connKey (line 27) | type connKey struct type listener (line 29) | type listener struct method startHandshake (line 101) | func (l *listener) startHandshake(conn *quic.Conn) error { method httpHandler (line 155) | func (l *listener) httpHandler(w http.ResponseWriter, r *http.Request) { method httpHandlerWithConnScope (line 194) | func (l *listener) httpHandlerWithConnScope(w http.ResponseWriter, r *... method Accept (line 260) | func (l *listener) Accept() (tpt.CapableConn, error) { method handshake (line 269) | func (l *listener) handshake(ctx context.Context, sess *webtransport.S... method Addr (line 306) | func (l *listener) Addr() net.Addr { method Multiaddr (line 310) | func (l *listener) Multiaddr() ma.Multiaddr { method Close (line 317) | func (l *listener) Close() error { function newListener (line 52) | func newListener(reuseListener quicreuse.Listener, t *transport, isStati... type negotiatingConn (line 129) | type negotiatingConn struct method StopHandshakeTimeout (line 138) | func (c *negotiatingConn) StopHandshakeTimeout() error { FILE: p2p/transport/webtransport/mock_connection_gater_test.go type MockConnectionGater (line 23) | type MockConnectionGater struct method EXPECT (line 42) | func (m *MockConnectionGater) EXPECT() *MockConnectionGaterMockRecorder { method InterceptAccept (line 47) | func (m *MockConnectionGater) InterceptAccept(arg0 network.ConnMultiad... method InterceptAddrDial (line 61) | func (m *MockConnectionGater) InterceptAddrDial(arg0 peer.ID, arg1 mul... method InterceptPeerDial (line 75) | func (m *MockConnectionGater) InterceptPeerDial(p peer.ID) bool { method InterceptSecured (line 89) | func (m *MockConnectionGater) InterceptSecured(arg0 network.Direction,... method InterceptUpgraded (line 103) | func (m *MockConnectionGater) InterceptUpgraded(arg0 network.Conn) (bo... type MockConnectionGaterMockRecorder (line 30) | type MockConnectionGaterMockRecorder struct method InterceptAccept (line 55) | func (mr *MockConnectionGaterMockRecorder) InterceptAccept(arg0 any) *... method InterceptAddrDial (line 69) | func (mr *MockConnectionGaterMockRecorder) InterceptAddrDial(arg0, arg... method InterceptPeerDial (line 83) | func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(p any) *g... method InterceptSecured (line 97) | func (mr *MockConnectionGaterMockRecorder) InterceptSecured(arg0, arg1... method InterceptUpgraded (line 112) | func (mr *MockConnectionGaterMockRecorder) InterceptUpgraded(arg0 any)... function NewMockConnectionGater (line 35) | func NewMockConnectionGater(ctrl *gomock.Controller) *MockConnectionGater { FILE: p2p/transport/webtransport/multiaddr.go function toWebtransportMultiaddr (line 17) | func toWebtransportMultiaddr(na net.Addr) (ma.Multiaddr, error) { function stringToWebtransportMultiaddr (line 28) | func stringToWebtransportMultiaddr(str string) (ma.Multiaddr, error) { function extractCertHashes (line 44) | func extractCertHashes(addr ma.Multiaddr) ([]multihash.DecodedMultihash,... function addrComponentForCert (line 67) | func addrComponentForCert(hash []byte) (*ma.Component, error) { function IsWebtransportMultiaddr (line 81) | func IsWebtransportMultiaddr(multiaddr ma.Multiaddr) (bool, int) { FILE: p2p/transport/webtransport/multiaddr_test.go function TestWebtransportMultiaddr (line 15) | func TestWebtransportMultiaddr(t *testing.T) { function TestWebtransportMultiaddrFromString (line 28) | func TestWebtransportMultiaddrFromString(t *testing.T) { function encodeCertHash (line 48) | func encodeCertHash(t *testing.T, b []byte, mh uint64, mb multibase.Enco... function TestExtractCertHashes (line 57) | func TestExtractCertHashes(t *testing.T) { function TestWebtransportResolve (line 79) | func TestWebtransportResolve(t *testing.T) { function TestIsWebtransportMultiaddr (line 107) | func TestIsWebtransportMultiaddr(t *testing.T) { FILE: p2p/transport/webtransport/noise_early_data.go type earlyDataHandler (line 12) | type earlyDataHandler struct method Send (line 27) | func (e *earlyDataHandler) Send(context.Context, net.Conn, peer.ID) *p... method Received (line 31) | func (e *earlyDataHandler) Received(_ context.Context, _ net.Conn, ext... function newEarlyDataSender (line 19) | func newEarlyDataSender(earlyData *pb.NoiseExtensions) noise.EarlyDataHa... function newEarlyDataReceiver (line 23) | func newEarlyDataReceiver(receive func(*pb.NoiseExtensions) error) noise... FILE: p2p/transport/webtransport/stream.go constant reset (line 13) | reset webtransport.StreamErrorCode = 0 type webtransportStream (line 16) | type webtransportStream struct method LocalAddr (line 23) | func (s webtransportStream) LocalAddr() net.Addr { method RemoteAddr (line 27) | func (s webtransportStream) RemoteAddr() net.Addr { type stream (line 31) | type stream struct method Read (line 37) | func (s stream) Read(b []byte) (n int, err error) { method Write (line 52) | func (s stream) Write(b []byte) (n int, err error) { method Reset (line 67) | func (s stream) Reset() error { method ResetWithError (line 78) | func (s stream) ResetWithError(_ network.StreamErrorCode) error { method Close (line 84) | func (s stream) Close() error { method CloseRead (line 89) | func (s stream) CloseRead() error { method CloseWrite (line 94) | func (s stream) CloseWrite() error { FILE: p2p/transport/webtransport/transport.go constant webtransportHTTPEndpoint (line 37) | webtransportHTTPEndpoint = "/.well-known/libp2p-webtransport" constant errorCodeConnectionGating (line 39) | errorCodeConnectionGating = 0x47415445 constant certValidity (line 41) | certValidity = 14 * 24 * time.Hour type Option (line 43) | type Option function WithClock (line 45) | func WithClock(cl clock.Clock) Option { function WithTLSClientConfig (line 56) | func WithTLSClientConfig(c *tls.Config) Option { function WithHandshakeTimeout (line 63) | func WithHandshakeTimeout(d time.Duration) Option { type transport (line 70) | type transport struct method Dial (line 132) | func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p pe... method dialWithScope (line 148) | func (t *transport) dialWithScope(ctx context.Context, raddr ma.Multia... method dial (line 191) | func (t *transport) dial(ctx context.Context, addr ma.Multiaddr, url, ... method upgrade (line 235) | func (t *transport) upgrade(ctx context.Context, sess *webtransport.Se... method CanDial (line 305) | func (t *transport) CanDial(addr ma.Multiaddr) bool { method Listen (line 310) | func (t *transport) Listen(laddr ma.Multiaddr) (tpt.Listener, error) { method Protocols (line 344) | func (t *transport) Protocols() []int { method Proxy (line 348) | func (t *transport) Proxy() bool { method Close (line 352) | func (t *transport) Close() error { method allowWindowIncrease (line 360) | func (t *transport) allowWindowIncrease(conn *quic.Conn, size uint64) ... method addConn (line 371) | func (t *transport) addConn(conn *quic.Conn, c *conn) { method removeConn (line 377) | func (t *transport) removeConn(conn *quic.Conn) { method Resolve (line 406) | func (t *transport) Resolve(_ context.Context, maddr ma.Multiaddr) ([]... method AddCertHashes (line 436) | func (t *transport) AddCertHashes(m ma.Multiaddr) (ma.Multiaddr, bool) { function New (line 97) | func New(key ic.PrivKey, psk pnet.PSK, connManager *quicreuse.ConnManage... function decodeCertHashesFromProtobuf (line 293) | func decodeCertHashesFromProtobuf(b [][]byte) ([]multihash.DecodedMultih... function extractSNI (line 388) | func extractSNI(maddr ma.Multiaddr) (sni string, foundSniComponent bool) { FILE: p2p/transport/webtransport/transport_test.go constant clockSkewAllowance (line 44) | clockSkewAllowance = time.Hour constant certValidity (line 45) | certValidity = 14 * 24 * time.Hour function newIdentity (line 47) | func newIdentity(t *testing.T) (peer.ID, ic.PrivKey) { function randomMultihash (line 55) | func randomMultihash(t *testing.T) string { function extractCertHashes (line 66) | func extractCertHashes(addr ma.Multiaddr) []string { function stripCertHashes (line 77) | func stripCertHashes(addr ma.Multiaddr) ma.Multiaddr { function getCerthashComponent (line 88) | func getCerthashComponent(t *testing.T, b []byte) *ma.Component { function newConnManager (line 100) | func newConnManager(t *testing.T, opts ...quicreuse.Option) *quicreuse.C... function TestTransport (line 108) | func TestTransport(t *testing.T) { function TestHashVerification (line 154) | func TestHashVerification(t *testing.T) { function TestCanDial (line 199) | func TestCanDial(t *testing.T) { function TestListenAddrValidity (line 226) | func TestListenAddrValidity(t *testing.T) { function TestListenerAddrs (line 254) | func TestListenerAddrs(t *testing.T) { function TestResourceManagerDialing (line 270) | func TestResourceManagerDialing(t *testing.T) { function TestResourceManagerListening (line 296) | func TestResourceManagerListening(t *testing.T) { function TestConnectionGaterDialing (line 371) | func TestConnectionGaterDialing(t *testing.T) { function TestConnectionGaterInterceptAccept (line 395) | func TestConnectionGaterInterceptAccept(t *testing.T) { function TestConnectionGaterInterceptSecured (line 421) | func TestConnectionGaterInterceptSecured(t *testing.T) { function TestAcceptQueueFilledUp (line 461) | func TestAcceptQueueFilledUp(t *testing.T) { type reportingRcmgr (line 525) | type reportingRcmgr struct method OpenConnection (line 530) | func (m *reportingRcmgr) OpenConnection(_ network.Direction, _ bool, _... type reportingScope (line 534) | type reportingScope struct method ReserveMemory (line 539) | func (s *reportingScope) ReserveMemory(size int, _ uint8) error { function newUDPConnLocalhost (line 544) | func newUDPConnLocalhost(t testing.TB) *net.UDPConn { function TestFlowControlWindowIncrease (line 552) | func TestFlowControlWindowIncrease(t *testing.T) { function serverSendsBackValidCert (line 658) | func serverSendsBackValidCert(t *testing.T, timeSinceUnixEpoch time.Dura... function TestServerSendsBackValidCert (line 715) | func TestServerSendsBackValidCert(t *testing.T) { function TestServerRotatesCertCorrectly (line 736) | func TestServerRotatesCertCorrectly(t *testing.T) { function TestServerRotatesCertCorrectlyAfterSteps (line 796) | func TestServerRotatesCertCorrectlyAfterSteps(t *testing.T) { function TestH3ConnClosed (line 838) | func TestH3ConnClosed(t *testing.T) { FILE: proto_test.go function TestProtoImportsAndPathsAreConsistent (line 27) | func TestProtoImportsAndPathsAreConsistent(t *testing.T) { FILE: scripts/test_analysis/cmd/gotest2sql/main.go type TestEvent (line 17) | type TestEvent struct function main (line 26) | func main() { FILE: scripts/test_analysis/main.go constant dbPath (line 17) | dbPath = "./test_results.db" constant retryCount (line 18) | retryCount = 4 function main (line 22) | func main() { type tester (line 42) | type tester struct method runTests (line 46) | func (t *tester) runTests(passThruFlags []string) error { method goTestAll (line 101) | func (t *tester) goTestAll(extraFlags []string) error { method goTestPkgTest (line 107) | func (t *tester) goTestPkgTest(pkg, testname string, extraFlags []stri... method goTest (line 115) | func (t *tester) goTest(extraFlags []string) error { method findFailedTests (line 148) | func (t *tester) findFailedTests(ctx context.Context) ([]failedTest, e... method findTimedoutTests (line 170) | func (t *tester) findTimedoutTests(ctx context.Context) ([]timedOutPac... method summarize (line 224) | func (t *tester) summarize() (string, error) { type failedTest (line 138) | type failedTest struct type timedOutPackage (line 143) | type timedOutPackage struct function filterOutFlags (line 213) | func filterOutFlags(flags []string, exclude *regexp.Regexp) []string { FILE: scripts/test_analysis/main_test.go function TestFailsOnConsistentFailure (line 8) | func TestFailsOnConsistentFailure(t *testing.T) { function TestPassesOnFlakyFailure (line 30) | func TestPassesOnFlakyFailure(t *testing.T) { FILE: test-plans/cmd/ping/main.go function main (line 35) | func main() { function generateTLSConfig (line 218) | func generateTLSConfig() *tls.Config { FILE: x/rate/limiter.go type Limit (line 20) | type Limit struct type PrefixLimit (line 28) | type PrefixLimit struct type SubnetLimit (line 34) | type SubnetLimit struct type Limiter (line 42) | type Limiter struct method init (line 57) | func (r *Limiter) init() { method Limit (line 80) | func (r *Limiter) Limit(f func(s network.Stream)) func(s network.Strea... method Allow (line 101) | func (r *Limiter) Allow(ipAddr netip.Addr) bool { type SubnetLimiter (line 134) | type SubnetLimiter struct method init (line 149) | func (s *SubnetLimiter) init() { method Allow (line 176) | func (s *SubnetLimiter) Allow(ipAddr netip.Addr, now time.Time) bool { method cleanUp (line 220) | func (s *SubnetLimiter) cleanUp(now time.Time) { type tokenBucket (line 230) | type tokenBucket struct method FullAt (line 235) | func (b *tokenBucket) FullAt(now time.Time) time.Time { type prefixBucketWithExpiry (line 244) | type prefixBucketWithExpiry struct type bucketHeap (line 252) | type bucketHeap struct method Upsert (line 261) | func (h *bucketHeap) Upsert(b prefixBucketWithExpiry) { method Get (line 271) | func (h *bucketHeap) Get(prefix netip.Prefix) prefixBucketWithExpiry { method Expire (line 279) | func (h *bucketHeap) Expire(expiry time.Time) { method Len (line 292) | func (h *bucketHeap) Len() int { method Less (line 297) | func (h *bucketHeap) Less(i, j int) bool { method Swap (line 302) | func (h *bucketHeap) Swap(i, j int) { method Push (line 309) | func (h *bucketHeap) Push(x any) { method Pop (line 316) | func (h *bucketHeap) Pop() any { FILE: x/rate/limiter_test.go constant rateLimitErrorTolerance (line 13) | rateLimitErrorTolerance = 0.05 function getSleepDurationAndRequestCount (line 15) | func getSleepDurationAndRequestCount(rps float64) (time.Duration, int) { function assertLimiter (line 27) | func assertLimiter(t *testing.T, rl *Limiter, ipAddr netip.Addr, allowed... function TestLimiterGlobal (line 38) | func TestLimiterGlobal(t *testing.T) { function TestLimiterNetworkPrefix (line 67) | func TestLimiterNetworkPrefix(t *testing.T) { function TestLimiterNetworkPrefixWidth (line 91) | func TestLimiterNetworkPrefixWidth(t *testing.T) { function subnetAddrs (line 114) | func subnetAddrs(prefix netip.Prefix) func() netip.Addr { function TestSubnetLimiter (line 127) | func TestSubnetLimiter(t *testing.T) { function TestSubnetLimiterCleanup (line 200) | func TestSubnetLimiterCleanup(t *testing.T) { function TestTokenBucketFullAfter (line 235) | func TestTokenBucketFullAfter(t *testing.T) { FILE: x/simlibp2p/libp2p.go function MustNewHost (line 34) | func MustNewHost(t *testing.T, opts ...libp2p.Option) host.Host { type MockSourceIPSelector (line 41) | type MockSourceIPSelector struct method PreferredSourceIPForDestination (line 45) | func (m *MockSourceIPSelector) PreferredSourceIPForDestination(_ *net.... constant OneMbps (line 49) | OneMbps = 1_000_000 function QUICSimnet (line 51) | func QUICSimnet(simnet *simnet.Simnet, linkSettings simnet.NodeBiDiLinkS... type wrappedHost (line 77) | type wrappedHost struct method Close (line 85) | func (h *wrappedHost) Close() error { type BlankHostOpts (line 94) | type BlankHostOpts struct function newBlankHost (line 102) | func newBlankHost(opts BlankHostOpts) (*wrappedHost, error) { type NodeLinkSettingsAndCount (line 189) | type NodeLinkSettingsAndCount struct type HostAndIdx (line 194) | type HostAndIdx struct type SimpleLibp2pNetworkMeta (line 199) | type SimpleLibp2pNetworkMeta struct type NetworkSettings (line 204) | type NetworkSettings struct type LatencyFunc (line 210) | type LatencyFunc function SimpleLibp2pNetwork (line 212) | func SimpleLibp2pNetwork(linkSettings []NodeLinkSettingsAndCount, latenc... function GetBasicHostPair (line 267) | func GetBasicHostPair(t *testing.T) (host.Host, host.Host) { FILE: x/simlibp2p/synctest_test.go function TestSimpleLibp2pNetwork_synctest (line 21) | func TestSimpleLibp2pNetwork_synctest(t *testing.T) { function TestSimpleSimNetPing_synctest (line 76) | func TestSimpleSimNetPing_synctest(t *testing.T) {