Documentation
¶
Index ¶
- Variables
- type Addrbook
- type AddrbookEntry
- func (*AddrbookEntry) Descriptor() ([]byte, []int)deprecated
- func (x *AddrbookEntry) GetAttempts() uint32
- func (x *AddrbookEntry) GetBackoff() uint64
- func (x *AddrbookEntry) GetBackoffMultiplier() float32
- func (x *AddrbookEntry) GetDefaultBackoff() uint64
- func (x *AddrbookEntry) GetFailedAttempts() uint32
- func (x *AddrbookEntry) GetLastSuccess() uint64
- func (x *AddrbookEntry) GetMaxAttempts() uint32
- func (x *AddrbookEntry) GetMaxBackoff() uint64
- func (x *AddrbookEntry) GetPeer() string
- func (x *AddrbookEntry) GetPersistent() bool
- func (*AddrbookEntry) ProtoMessage()
- func (x *AddrbookEntry) ProtoReflect() protoreflect.Message
- func (x *AddrbookEntry) Reset()
- func (x *AddrbookEntry) String() string
- type Handshake
- func (*Handshake) Descriptor() ([]byte, []int)deprecated
- func (x *Handshake) GetIntents() []*core.Intent
- func (x *Handshake) GetInterests() []*core.Interest
- func (x *Handshake) GetMe() string
- func (x *Handshake) GetPublicKey() []byte
- func (x *Handshake) GetStage() HandshakeStage
- func (x *Handshake) GetYou() string
- func (*Handshake) ProtoMessage()
- func (x *Handshake) ProtoReflect() protoreflect.Message
- func (x *Handshake) Reset()
- func (x *Handshake) String() string
- type HandshakeStage
- func (HandshakeStage) Descriptor() protoreflect.EnumDescriptor
- func (x HandshakeStage) Enum() *HandshakeStage
- func (HandshakeStage) EnumDescriptor() ([]byte, []int)deprecated
- func (x HandshakeStage) Number() protoreflect.EnumNumber
- func (x HandshakeStage) String() string
- func (HandshakeStage) Type() protoreflect.EnumType
- type Peers
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HandshakeStage_name = map[int32]string{ 0: "UNSPECIFIED_HANDSHAKE", 1: "INITIAL", 2: "FINAL", 3: "UPDATE", } HandshakeStage_value = map[string]int32{ "UNSPECIFIED_HANDSHAKE": 0, "INITIAL": 1, "FINAL": 2, "UPDATE": 3, } )
Enum value maps for HandshakeStage.
View Source
var File_types_p2p_addrbook_proto protoreflect.FileDescriptor
View Source
var File_types_p2p_peering_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Addrbook ¶
type Addrbook struct { Entries []*AddrbookEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` // contains filtered or unexported fields }
Addrbook contains entries about peers.
func (*Addrbook) Descriptor
deprecated
func (*Addrbook) GetEntries ¶
func (x *Addrbook) GetEntries() []*AddrbookEntry
func (*Addrbook) ProtoMessage ¶
func (*Addrbook) ProtoMessage()
func (*Addrbook) ProtoReflect ¶
func (x *Addrbook) ProtoReflect() protoreflect.Message
type AddrbookEntry ¶
type AddrbookEntry struct { Peer string `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` MaxAttempts uint32 `protobuf:"varint,2,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"` DefaultBackoff uint64 `protobuf:"varint,3,opt,name=default_backoff,json=defaultBackoff,proto3" json:"default_backoff,omitempty"` MaxBackoff uint64 `protobuf:"varint,4,opt,name=max_backoff,json=maxBackoff,proto3" json:"max_backoff,omitempty"` BackoffMultiplier float32 `protobuf:"fixed32,5,opt,name=backoff_multiplier,json=backoffMultiplier,proto3" json:"backoff_multiplier,omitempty"` Attempts uint32 `protobuf:"varint,6,opt,name=attempts,proto3" json:"attempts,omitempty"` FailedAttempts uint32 `protobuf:"varint,7,opt,name=failed_attempts,json=failedAttempts,proto3" json:"failed_attempts,omitempty"` LastSuccess uint64 `protobuf:"varint,8,opt,name=last_success,json=lastSuccess,proto3" json:"last_success,omitempty"` Backoff uint64 `protobuf:"varint,9,opt,name=backoff,proto3" json:"backoff,omitempty"` Persistent bool `protobuf:"varint,10,opt,name=persistent,proto3" json:"persistent,omitempty"` // contains filtered or unexported fields }
AddrbookEntry is for storing and transfering information about peers. This structure contains the information about connectivity history with that peer.
func AddrbookEntryFromPeer ¶
func AddrbookEntryFromPeer(peer string) *AddrbookEntry
func AddrbookFromPeers ¶
func AddrbookFromPeers(peers []string) []*AddrbookEntry
func (*AddrbookEntry) Descriptor
deprecated
func (*AddrbookEntry) Descriptor() ([]byte, []int)
Deprecated: Use AddrbookEntry.ProtoReflect.Descriptor instead.
func (*AddrbookEntry) GetAttempts ¶
func (x *AddrbookEntry) GetAttempts() uint32
func (*AddrbookEntry) GetBackoff ¶
func (x *AddrbookEntry) GetBackoff() uint64
func (*AddrbookEntry) GetBackoffMultiplier ¶
func (x *AddrbookEntry) GetBackoffMultiplier() float32
func (*AddrbookEntry) GetDefaultBackoff ¶
func (x *AddrbookEntry) GetDefaultBackoff() uint64
func (*AddrbookEntry) GetFailedAttempts ¶
func (x *AddrbookEntry) GetFailedAttempts() uint32
func (*AddrbookEntry) GetLastSuccess ¶
func (x *AddrbookEntry) GetLastSuccess() uint64
func (*AddrbookEntry) GetMaxAttempts ¶
func (x *AddrbookEntry) GetMaxAttempts() uint32
func (*AddrbookEntry) GetMaxBackoff ¶
func (x *AddrbookEntry) GetMaxBackoff() uint64
func (*AddrbookEntry) GetPeer ¶
func (x *AddrbookEntry) GetPeer() string
func (*AddrbookEntry) GetPersistent ¶
func (x *AddrbookEntry) GetPersistent() bool
func (*AddrbookEntry) ProtoMessage ¶
func (*AddrbookEntry) ProtoMessage()
func (*AddrbookEntry) ProtoReflect ¶
func (x *AddrbookEntry) ProtoReflect() protoreflect.Message
func (*AddrbookEntry) Reset ¶
func (x *AddrbookEntry) Reset()
func (*AddrbookEntry) String ¶
func (x *AddrbookEntry) String() string
type Handshake ¶
type Handshake struct { Me string `protobuf:"bytes,1,opt,name=me,proto3" json:"me,omitempty"` You string `protobuf:"bytes,2,opt,name=you,proto3" json:"you,omitempty"` Stage HandshakeStage `protobuf:"varint,3,opt,name=stage,proto3,enum=types.p2p.HandshakeStage" json:"stage,omitempty"` Intents []*core.Intent `protobuf:"bytes,4,rep,name=intents,proto3" json:"intents,omitempty"` Interests []*core.Interest `protobuf:"bytes,5,rep,name=interests,proto3" json:"interests,omitempty"` PublicKey []byte `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // contains filtered or unexported fields }
Handshake will contain the information needed for each handshake stage.
func (*Handshake) Descriptor
deprecated
func (*Handshake) GetIntents ¶
func (*Handshake) GetInterests ¶
func (*Handshake) GetPublicKey ¶
func (*Handshake) GetStage ¶
func (x *Handshake) GetStage() HandshakeStage
func (*Handshake) ProtoMessage ¶
func (*Handshake) ProtoMessage()
func (*Handshake) ProtoReflect ¶
func (x *Handshake) ProtoReflect() protoreflect.Message
type HandshakeStage ¶
type HandshakeStage int32
HandshakeStage enum specifies what handshake state this message corresponds to.
const ( HandshakeStage_UNSPECIFIED_HANDSHAKE HandshakeStage = 0 HandshakeStage_INITIAL HandshakeStage = 1 HandshakeStage_FINAL HandshakeStage = 2 HandshakeStage_UPDATE HandshakeStage = 3 )
func (HandshakeStage) Descriptor ¶
func (HandshakeStage) Descriptor() protoreflect.EnumDescriptor
func (HandshakeStage) Enum ¶
func (x HandshakeStage) Enum() *HandshakeStage
func (HandshakeStage) EnumDescriptor
deprecated
func (HandshakeStage) EnumDescriptor() ([]byte, []int)
Deprecated: Use HandshakeStage.Descriptor instead.
func (HandshakeStage) Number ¶
func (x HandshakeStage) Number() protoreflect.EnumNumber
func (HandshakeStage) String ¶
func (x HandshakeStage) String() string
func (HandshakeStage) Type ¶
func (HandshakeStage) Type() protoreflect.EnumType
type Peers ¶
type Peers struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` Remove bool `protobuf:"varint,2,opt,name=remove,proto3" json:"remove,omitempty"` // contains filtered or unexported fields }
Peers is used for sharing peering information so that it would be possible to form a mesh.
func (*Peers) Descriptor
deprecated
func (*Peers) ProtoMessage ¶
func (*Peers) ProtoMessage()
func (*Peers) ProtoReflect ¶
func (x *Peers) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.