Documentation ¶
Index ¶
- Variables
- type Cid
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetBlockPresences() []Message_BlockPresence
- func (m *Message) GetBlocks() [][]byte
- func (m *Message) GetPayload() []Message_Block
- func (m *Message) GetPendingBytes() int32
- func (m *Message) GetWantlist() Message_Wantlist
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) Size() (n int)
- func (m *Message) String() string
- func (m *Message) Unmarshal(dAtA []byte) error
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type Message_Block
- func (*Message_Block) Descriptor() ([]byte, []int)
- func (m *Message_Block) GetData() []byte
- func (m *Message_Block) GetPrefix() []byte
- func (m *Message_Block) Marshal() (dAtA []byte, err error)
- func (m *Message_Block) MarshalTo(dAtA []byte) (int, error)
- func (m *Message_Block) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message_Block) ProtoMessage()
- func (m *Message_Block) Reset()
- func (m *Message_Block) Size() (n int)
- func (m *Message_Block) String() string
- func (m *Message_Block) Unmarshal(dAtA []byte) error
- func (m *Message_Block) XXX_DiscardUnknown()
- func (m *Message_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message_Block) XXX_Merge(src proto.Message)
- func (m *Message_Block) XXX_Size() int
- func (m *Message_Block) XXX_Unmarshal(b []byte) error
- type Message_BlockPresence
- func (*Message_BlockPresence) Descriptor() ([]byte, []int)
- func (m *Message_BlockPresence) GetType() Message_BlockPresenceType
- func (m *Message_BlockPresence) Marshal() (dAtA []byte, err error)
- func (m *Message_BlockPresence) MarshalTo(dAtA []byte) (int, error)
- func (m *Message_BlockPresence) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message_BlockPresence) ProtoMessage()
- func (m *Message_BlockPresence) Reset()
- func (m *Message_BlockPresence) Size() (n int)
- func (m *Message_BlockPresence) String() string
- func (m *Message_BlockPresence) Unmarshal(dAtA []byte) error
- func (m *Message_BlockPresence) XXX_DiscardUnknown()
- func (m *Message_BlockPresence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message_BlockPresence) XXX_Merge(src proto.Message)
- func (m *Message_BlockPresence) XXX_Size() int
- func (m *Message_BlockPresence) XXX_Unmarshal(b []byte) error
- type Message_BlockPresenceType
- type Message_Wantlist
- func (*Message_Wantlist) Descriptor() ([]byte, []int)
- func (m *Message_Wantlist) GetEntries() []Message_Wantlist_Entry
- func (m *Message_Wantlist) GetFull() bool
- func (m *Message_Wantlist) Marshal() (dAtA []byte, err error)
- func (m *Message_Wantlist) MarshalTo(dAtA []byte) (int, error)
- func (m *Message_Wantlist) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message_Wantlist) ProtoMessage()
- func (m *Message_Wantlist) Reset()
- func (m *Message_Wantlist) Size() (n int)
- func (m *Message_Wantlist) String() string
- func (m *Message_Wantlist) Unmarshal(dAtA []byte) error
- func (m *Message_Wantlist) XXX_DiscardUnknown()
- func (m *Message_Wantlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message_Wantlist) XXX_Merge(src proto.Message)
- func (m *Message_Wantlist) XXX_Size() int
- func (m *Message_Wantlist) XXX_Unmarshal(b []byte) error
- type Message_Wantlist_Entry
- func (*Message_Wantlist_Entry) Descriptor() ([]byte, []int)
- func (m *Message_Wantlist_Entry) GetCancel() bool
- func (m *Message_Wantlist_Entry) GetPriority() int32
- func (m *Message_Wantlist_Entry) GetSendDontHave() bool
- func (m *Message_Wantlist_Entry) GetWantType() Message_Wantlist_WantType
- func (m *Message_Wantlist_Entry) Marshal() (dAtA []byte, err error)
- func (m *Message_Wantlist_Entry) MarshalTo(dAtA []byte) (int, error)
- func (m *Message_Wantlist_Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message_Wantlist_Entry) ProtoMessage()
- func (m *Message_Wantlist_Entry) Reset()
- func (m *Message_Wantlist_Entry) Size() (n int)
- func (m *Message_Wantlist_Entry) String() string
- func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error
- func (m *Message_Wantlist_Entry) XXX_DiscardUnknown()
- func (m *Message_Wantlist_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message_Wantlist_Entry) XXX_Merge(src proto.Message)
- func (m *Message_Wantlist_Entry) XXX_Size() int
- func (m *Message_Wantlist_Entry) XXX_Unmarshal(b []byte) error
- type Message_Wantlist_WantType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") )
View Source
var Message_BlockPresenceType_name = map[int32]string{
0: "Have",
1: "DontHave",
}
View Source
var Message_BlockPresenceType_value = map[string]int32{
"Have": 0,
"DontHave": 1,
}
View Source
var Message_Wantlist_WantType_name = map[int32]string{
0: "Block",
1: "Have",
}
View Source
var Message_Wantlist_WantType_value = map[string]int32{
"Block": 0,
"Have": 1,
}
Functions ¶
This section is empty.
Types ¶
type Cid ¶
type Cid struct {
Cid cid.Cid
}
Cid is a custom type for CIDs in protobufs, that allows us to avoid reallocating.
func (Cid) MarshalJSON ¶
func (*Cid) UnmarshalJSON ¶
type Message ¶
type Message struct { Wantlist Message_Wantlist `protobuf:"bytes,1,opt,name=wantlist,proto3" json:"wantlist"` Blocks [][]byte `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"` Payload []Message_Block `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload"` BlockPresences []Message_BlockPresence `protobuf:"bytes,4,rep,name=blockPresences,proto3" json:"blockPresences"` PendingBytes int32 `protobuf:"varint,5,opt,name=pendingBytes,proto3" json:"pendingBytes,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetBlockPresences ¶
func (m *Message) GetBlockPresences() []Message_BlockPresence
func (*Message) GetPayload ¶
func (m *Message) GetPayload() []Message_Block
func (*Message) GetPendingBytes ¶
func (*Message) GetWantlist ¶
func (m *Message) GetWantlist() Message_Wantlist
func (*Message) MarshalToSizedBuffer ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type Message_Block ¶
type Message_Block struct { Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
func (*Message_Block) Descriptor ¶
func (*Message_Block) Descriptor() ([]byte, []int)
func (*Message_Block) GetData ¶
func (m *Message_Block) GetData() []byte
func (*Message_Block) GetPrefix ¶
func (m *Message_Block) GetPrefix() []byte
func (*Message_Block) Marshal ¶
func (m *Message_Block) Marshal() (dAtA []byte, err error)
func (*Message_Block) MarshalToSizedBuffer ¶
func (m *Message_Block) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Message_Block) ProtoMessage ¶
func (*Message_Block) ProtoMessage()
func (*Message_Block) Reset ¶
func (m *Message_Block) Reset()
func (*Message_Block) Size ¶
func (m *Message_Block) Size() (n int)
func (*Message_Block) String ¶
func (m *Message_Block) String() string
func (*Message_Block) Unmarshal ¶
func (m *Message_Block) Unmarshal(dAtA []byte) error
func (*Message_Block) XXX_DiscardUnknown ¶
func (m *Message_Block) XXX_DiscardUnknown()
func (*Message_Block) XXX_Marshal ¶
func (m *Message_Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Message_Block) XXX_Merge ¶
func (m *Message_Block) XXX_Merge(src proto.Message)
func (*Message_Block) XXX_Size ¶
func (m *Message_Block) XXX_Size() int
func (*Message_Block) XXX_Unmarshal ¶
func (m *Message_Block) XXX_Unmarshal(b []byte) error
type Message_BlockPresence ¶
type Message_BlockPresence struct { Cid Cid `protobuf:"bytes,1,opt,name=cid,proto3,customtype=Cid" json:"cid"` Type Message_BlockPresenceType `protobuf:"varint,2,opt,name=type,proto3,enum=bitswap.message.v1.pb.Message_BlockPresenceType" json:"type,omitempty"` }
func (*Message_BlockPresence) Descriptor ¶
func (*Message_BlockPresence) Descriptor() ([]byte, []int)
func (*Message_BlockPresence) GetType ¶
func (m *Message_BlockPresence) GetType() Message_BlockPresenceType
func (*Message_BlockPresence) Marshal ¶
func (m *Message_BlockPresence) Marshal() (dAtA []byte, err error)
func (*Message_BlockPresence) MarshalTo ¶
func (m *Message_BlockPresence) MarshalTo(dAtA []byte) (int, error)
func (*Message_BlockPresence) MarshalToSizedBuffer ¶
func (m *Message_BlockPresence) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Message_BlockPresence) ProtoMessage ¶
func (*Message_BlockPresence) ProtoMessage()
func (*Message_BlockPresence) Reset ¶
func (m *Message_BlockPresence) Reset()
func (*Message_BlockPresence) Size ¶
func (m *Message_BlockPresence) Size() (n int)
func (*Message_BlockPresence) String ¶
func (m *Message_BlockPresence) String() string
func (*Message_BlockPresence) Unmarshal ¶
func (m *Message_BlockPresence) Unmarshal(dAtA []byte) error
func (*Message_BlockPresence) XXX_DiscardUnknown ¶
func (m *Message_BlockPresence) XXX_DiscardUnknown()
func (*Message_BlockPresence) XXX_Marshal ¶
func (m *Message_BlockPresence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Message_BlockPresence) XXX_Merge ¶
func (m *Message_BlockPresence) XXX_Merge(src proto.Message)
func (*Message_BlockPresence) XXX_Size ¶
func (m *Message_BlockPresence) XXX_Size() int
func (*Message_BlockPresence) XXX_Unmarshal ¶
func (m *Message_BlockPresence) XXX_Unmarshal(b []byte) error
type Message_BlockPresenceType ¶
type Message_BlockPresenceType int32
const ( Message_Have Message_BlockPresenceType = 0 Message_DontHave Message_BlockPresenceType = 1 )
func (Message_BlockPresenceType) EnumDescriptor ¶
func (Message_BlockPresenceType) EnumDescriptor() ([]byte, []int)
func (Message_BlockPresenceType) String ¶
func (x Message_BlockPresenceType) String() string
type Message_Wantlist ¶
type Message_Wantlist struct { Entries []Message_Wantlist_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries"` Full bool `protobuf:"varint,2,opt,name=full,proto3" json:"full,omitempty"` }
func (*Message_Wantlist) Descriptor ¶
func (*Message_Wantlist) Descriptor() ([]byte, []int)
func (*Message_Wantlist) GetEntries ¶
func (m *Message_Wantlist) GetEntries() []Message_Wantlist_Entry
func (*Message_Wantlist) GetFull ¶
func (m *Message_Wantlist) GetFull() bool
func (*Message_Wantlist) Marshal ¶
func (m *Message_Wantlist) Marshal() (dAtA []byte, err error)
func (*Message_Wantlist) MarshalToSizedBuffer ¶
func (m *Message_Wantlist) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Message_Wantlist) ProtoMessage ¶
func (*Message_Wantlist) ProtoMessage()
func (*Message_Wantlist) Reset ¶
func (m *Message_Wantlist) Reset()
func (*Message_Wantlist) Size ¶
func (m *Message_Wantlist) Size() (n int)
func (*Message_Wantlist) String ¶
func (m *Message_Wantlist) String() string
func (*Message_Wantlist) Unmarshal ¶
func (m *Message_Wantlist) Unmarshal(dAtA []byte) error
func (*Message_Wantlist) XXX_DiscardUnknown ¶
func (m *Message_Wantlist) XXX_DiscardUnknown()
func (*Message_Wantlist) XXX_Marshal ¶
func (m *Message_Wantlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Message_Wantlist) XXX_Merge ¶
func (m *Message_Wantlist) XXX_Merge(src proto.Message)
func (*Message_Wantlist) XXX_Size ¶
func (m *Message_Wantlist) XXX_Size() int
func (*Message_Wantlist) XXX_Unmarshal ¶
func (m *Message_Wantlist) XXX_Unmarshal(b []byte) error
type Message_Wantlist_Entry ¶
type Message_Wantlist_Entry struct { Block Cid `protobuf:"bytes,1,opt,name=block,proto3,customtype=Cid" json:"block"` Priority int32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"` Cancel bool `protobuf:"varint,3,opt,name=cancel,proto3" json:"cancel,omitempty"` WantType Message_Wantlist_WantType `protobuf:"varint,4,opt,name=wantType,proto3,enum=bitswap.message.v1.pb.Message_Wantlist_WantType" json:"wantType,omitempty"` SendDontHave bool `protobuf:"varint,5,opt,name=sendDontHave,proto3" json:"sendDontHave,omitempty"` }
func (*Message_Wantlist_Entry) Descriptor ¶
func (*Message_Wantlist_Entry) Descriptor() ([]byte, []int)
func (*Message_Wantlist_Entry) GetCancel ¶
func (m *Message_Wantlist_Entry) GetCancel() bool
func (*Message_Wantlist_Entry) GetPriority ¶
func (m *Message_Wantlist_Entry) GetPriority() int32
func (*Message_Wantlist_Entry) GetSendDontHave ¶
func (m *Message_Wantlist_Entry) GetSendDontHave() bool
func (*Message_Wantlist_Entry) GetWantType ¶
func (m *Message_Wantlist_Entry) GetWantType() Message_Wantlist_WantType
func (*Message_Wantlist_Entry) Marshal ¶
func (m *Message_Wantlist_Entry) Marshal() (dAtA []byte, err error)
func (*Message_Wantlist_Entry) MarshalTo ¶
func (m *Message_Wantlist_Entry) MarshalTo(dAtA []byte) (int, error)
func (*Message_Wantlist_Entry) MarshalToSizedBuffer ¶
func (m *Message_Wantlist_Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Message_Wantlist_Entry) ProtoMessage ¶
func (*Message_Wantlist_Entry) ProtoMessage()
func (*Message_Wantlist_Entry) Reset ¶
func (m *Message_Wantlist_Entry) Reset()
func (*Message_Wantlist_Entry) Size ¶
func (m *Message_Wantlist_Entry) Size() (n int)
func (*Message_Wantlist_Entry) String ¶
func (m *Message_Wantlist_Entry) String() string
func (*Message_Wantlist_Entry) Unmarshal ¶
func (m *Message_Wantlist_Entry) Unmarshal(dAtA []byte) error
func (*Message_Wantlist_Entry) XXX_DiscardUnknown ¶
func (m *Message_Wantlist_Entry) XXX_DiscardUnknown()
func (*Message_Wantlist_Entry) XXX_Marshal ¶
func (m *Message_Wantlist_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Message_Wantlist_Entry) XXX_Merge ¶
func (m *Message_Wantlist_Entry) XXX_Merge(src proto.Message)
func (*Message_Wantlist_Entry) XXX_Size ¶
func (m *Message_Wantlist_Entry) XXX_Size() int
func (*Message_Wantlist_Entry) XXX_Unmarshal ¶
func (m *Message_Wantlist_Entry) XXX_Unmarshal(b []byte) error
type Message_Wantlist_WantType ¶
type Message_Wantlist_WantType int32
const ( Message_Wantlist_Block Message_Wantlist_WantType = 0 Message_Wantlist_Have Message_Wantlist_WantType = 1 )
func (Message_Wantlist_WantType) EnumDescriptor ¶
func (Message_Wantlist_WantType) EnumDescriptor() ([]byte, []int)
func (Message_Wantlist_WantType) String ¶
func (x Message_Wantlist_WantType) String() string
Click to show internal directories.
Click to hide internal directories.