pb

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDiscoveryMsg        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDiscoveryMsg          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDiscoveryMsg = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DiscoveryMsg_Type_name = map[int32]string{
	0: "Announce",
	1: "FindReq",
	2: "FindRes",
}
View Source
var DiscoveryMsg_Type_value = map[string]int32{
	"Announce": 0,
	"FindReq":  1,
	"FindRes":  2,
}

Functions

This section is empty.

Types

type DiscoveryMsg

type DiscoveryMsg struct {
	Type   DiscoveryMsg_Type `protobuf:"varint,1,opt,name=type,proto3,enum=discovery.DiscoveryMsg_Type" json:"type,omitempty"`
	PInfos []*PeerInfo       `protobuf:"bytes,2,rep,name=pInfos,proto3" json:"pInfos,omitempty"`
	Size_  uint32            `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
}

func (*DiscoveryMsg) Descriptor

func (*DiscoveryMsg) Descriptor() ([]byte, []int)

func (*DiscoveryMsg) GetPInfos

func (m *DiscoveryMsg) GetPInfos() []*PeerInfo

func (*DiscoveryMsg) GetSize_

func (m *DiscoveryMsg) GetSize_() uint32

func (*DiscoveryMsg) GetType

func (m *DiscoveryMsg) GetType() DiscoveryMsg_Type

func (*DiscoveryMsg) Marshal

func (m *DiscoveryMsg) Marshal() (dAtA []byte, err error)

func (*DiscoveryMsg) MarshalTo

func (m *DiscoveryMsg) MarshalTo(dAtA []byte) (int, error)

func (*DiscoveryMsg) MarshalToSizedBuffer

func (m *DiscoveryMsg) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DiscoveryMsg) ProtoMessage

func (*DiscoveryMsg) ProtoMessage()

func (*DiscoveryMsg) Reset

func (m *DiscoveryMsg) Reset()

func (*DiscoveryMsg) Size

func (m *DiscoveryMsg) Size() (n int)

func (*DiscoveryMsg) String

func (m *DiscoveryMsg) String() string

func (*DiscoveryMsg) Unmarshal

func (m *DiscoveryMsg) Unmarshal(dAtA []byte) error

func (*DiscoveryMsg) XXX_DiscardUnknown

func (m *DiscoveryMsg) XXX_DiscardUnknown()

func (*DiscoveryMsg) XXX_Marshal

func (m *DiscoveryMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DiscoveryMsg) XXX_Merge

func (m *DiscoveryMsg) XXX_Merge(src proto.Message)

func (*DiscoveryMsg) XXX_Size

func (m *DiscoveryMsg) XXX_Size() int

func (*DiscoveryMsg) XXX_Unmarshal

func (m *DiscoveryMsg) XXX_Unmarshal(b []byte) error

type DiscoveryMsg_Type

type DiscoveryMsg_Type int32
const (
	DiscoveryMsg_Announce DiscoveryMsg_Type = 0
	DiscoveryMsg_FindReq  DiscoveryMsg_Type = 1
	DiscoveryMsg_FindRes  DiscoveryMsg_Type = 2
)

func (DiscoveryMsg_Type) EnumDescriptor

func (DiscoveryMsg_Type) EnumDescriptor() ([]byte, []int)

func (DiscoveryMsg_Type) String

func (x DiscoveryMsg_Type) String() string

type PeerInfo

type PeerInfo struct {
	Pid  string `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
	Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}

func (*PeerInfo) Descriptor

func (*PeerInfo) Descriptor() ([]byte, []int)

func (*PeerInfo) GetAddr

func (m *PeerInfo) GetAddr() string

func (*PeerInfo) GetPid

func (m *PeerInfo) GetPid() string

func (*PeerInfo) Marshal

func (m *PeerInfo) Marshal() (dAtA []byte, err error)

func (*PeerInfo) MarshalTo

func (m *PeerInfo) MarshalTo(dAtA []byte) (int, error)

func (*PeerInfo) MarshalToSizedBuffer

func (m *PeerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) Reset

func (m *PeerInfo) Reset()

func (*PeerInfo) Size

func (m *PeerInfo) Size() (n int)

func (*PeerInfo) String

func (m *PeerInfo) String() string

func (*PeerInfo) Unmarshal

func (m *PeerInfo) Unmarshal(dAtA []byte) error

func (*PeerInfo) XXX_DiscardUnknown

func (m *PeerInfo) XXX_DiscardUnknown()

func (*PeerInfo) XXX_Marshal

func (m *PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerInfo) XXX_Merge

func (m *PeerInfo) XXX_Merge(src proto.Message)

func (*PeerInfo) XXX_Size

func (m *PeerInfo) XXX_Size() int

func (*PeerInfo) XXX_Unmarshal

func (m *PeerInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL