Documentation ¶
Index ¶
- Variables
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetBlocks() [][]byte
- func (m *Message) GetPayload() []Message_Block
- func (m *Message) GetTicketAcklist() []*TicketAck
- func (m *Message) GetTicketlist() []*Ticket
- 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_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) GetBlock() []byte
- func (m *Message_Wantlist_Entry) GetCancel() bool
- func (m *Message_Wantlist_Entry) GetPriority() int32
- 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 Ticket
- func (*Ticket) Descriptor() ([]byte, []int)
- func (m *Ticket) GetByteSize() int64
- func (m *Ticket) GetCid() string
- func (m *Ticket) GetPublisher() string
- func (m *Ticket) GetSendTo() string
- func (m *Ticket) GetState() Ticket_State
- func (m *Ticket) GetTimeStamp() int64
- func (m *Ticket) Marshal() (dAtA []byte, err error)
- func (m *Ticket) MarshalTo(dAtA []byte) (int, error)
- func (m *Ticket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Ticket) ProtoMessage()
- func (m *Ticket) Reset()
- func (m *Ticket) Size() (n int)
- func (m *Ticket) String() string
- func (m *Ticket) Unmarshal(dAtA []byte) error
- func (m *Ticket) XXX_DiscardUnknown()
- func (m *Ticket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ticket) XXX_Merge(src proto.Message)
- func (m *Ticket) XXX_Size() int
- func (m *Ticket) XXX_Unmarshal(b []byte) error
- type TicketAck
- func (*TicketAck) Descriptor() ([]byte, []int)
- func (m *TicketAck) GetCid() string
- func (m *TicketAck) GetPublisher() string
- func (m *TicketAck) GetReceiver() string
- func (m *TicketAck) GetType() TicketAck_Type
- func (m *TicketAck) Marshal() (dAtA []byte, err error)
- func (m *TicketAck) MarshalTo(dAtA []byte) (int, error)
- func (m *TicketAck) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TicketAck) ProtoMessage()
- func (m *TicketAck) Reset()
- func (m *TicketAck) Size() (n int)
- func (m *TicketAck) String() string
- func (m *TicketAck) Unmarshal(dAtA []byte) error
- func (m *TicketAck) XXX_DiscardUnknown()
- func (m *TicketAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TicketAck) XXX_Merge(src proto.Message)
- func (m *TicketAck) XXX_Size() int
- func (m *TicketAck) XXX_Unmarshal(b []byte) error
- type TicketAck_Type
- type TicketAcklist
- func (*TicketAcklist) Descriptor() ([]byte, []int)
- func (m *TicketAcklist) GetItems() []*TicketAck
- func (m *TicketAcklist) Marshal() (dAtA []byte, err error)
- func (m *TicketAcklist) MarshalTo(dAtA []byte) (int, error)
- func (m *TicketAcklist) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TicketAcklist) ProtoMessage()
- func (m *TicketAcklist) Reset()
- func (m *TicketAcklist) Size() (n int)
- func (m *TicketAcklist) String() string
- func (m *TicketAcklist) Unmarshal(dAtA []byte) error
- func (m *TicketAcklist) XXX_DiscardUnknown()
- func (m *TicketAcklist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TicketAcklist) XXX_Merge(src proto.Message)
- func (m *TicketAcklist) XXX_Size() int
- func (m *TicketAcklist) XXX_Unmarshal(b []byte) error
- type Ticket_State
- type Ticketlist
- func (*Ticketlist) Descriptor() ([]byte, []int)
- func (m *Ticketlist) GetItems() []*Ticket
- func (m *Ticketlist) Marshal() (dAtA []byte, err error)
- func (m *Ticketlist) MarshalTo(dAtA []byte) (int, error)
- func (m *Ticketlist) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Ticketlist) ProtoMessage()
- func (m *Ticketlist) Reset()
- func (m *Ticketlist) Size() (n int)
- func (m *Ticketlist) String() string
- func (m *Ticketlist) Unmarshal(dAtA []byte) error
- func (m *Ticketlist) XXX_DiscardUnknown()
- func (m *Ticketlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ticketlist) XXX_Merge(src proto.Message)
- func (m *Ticketlist) XXX_Size() int
- func (m *Ticketlist) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") )
View Source
var TicketAck_Type_name = map[int32]string{
0: "ACCEPT",
1: "CANCEL",
}
View Source
var TicketAck_Type_value = map[string]int32{
"ACCEPT": 0,
"CANCEL": 1,
}
View Source
var Ticket_State_name = map[int32]string{
0: "New",
1: "ACK",
2: "CANCEL",
3: "TIMEOUT",
}
View Source
var Ticket_State_value = map[string]int32{
"New": 0,
"ACK": 1,
"CANCEL": 2,
"TIMEOUT": 3,
}
Functions ¶
This section is empty.
Types ¶
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"` //Ticketlist ticketlist = 4; //TicketAcklist ticketAcklist = 5; Ticketlist []*Ticket `protobuf:"bytes,4,rep,name=ticketlist,proto3" json:"ticketlist,omitempty"` TicketAcklist []*TicketAck `protobuf:"bytes,5,rep,name=ticketAcklist,proto3" json:"ticketAcklist,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetPayload ¶
func (m *Message) GetPayload() []Message_Block
func (*Message) GetTicketAcklist ¶
func (*Message) GetTicketlist ¶
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_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 []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` Priority int32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"` Cancel bool `protobuf:"varint,3,opt,name=cancel,proto3" json:"cancel,omitempty"` }
func (*Message_Wantlist_Entry) Descriptor ¶
func (*Message_Wantlist_Entry) Descriptor() ([]byte, []int)
func (*Message_Wantlist_Entry) GetBlock ¶
func (m *Message_Wantlist_Entry) GetBlock() []byte
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) 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 Ticket ¶
type Ticket struct { Publisher string `protobuf:"bytes,1,opt,name=publisher,proto3" json:"publisher,omitempty"` SendTo string `protobuf:"bytes,2,opt,name=sendTo,proto3" json:"sendTo,omitempty"` Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` ByteSize int64 `protobuf:"varint,4,opt,name=byteSize,proto3" json:"byteSize,omitempty"` TimeStamp int64 `protobuf:"varint,5,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"` State Ticket_State `protobuf:"varint,6,opt,name=state,proto3,enum=bitswap.message.pb.Ticket_State" json:"state,omitempty"` }
func (*Ticket) Descriptor ¶
func (*Ticket) GetByteSize ¶
func (*Ticket) GetPublisher ¶
func (*Ticket) GetState ¶
func (m *Ticket) GetState() Ticket_State
func (*Ticket) GetTimeStamp ¶
func (*Ticket) MarshalToSizedBuffer ¶
func (*Ticket) ProtoMessage ¶
func (*Ticket) ProtoMessage()
func (*Ticket) XXX_DiscardUnknown ¶
func (m *Ticket) XXX_DiscardUnknown()
func (*Ticket) XXX_Marshal ¶
func (*Ticket) XXX_Unmarshal ¶
type TicketAck ¶
type TicketAck struct { Publisher string `protobuf:"bytes,1,opt,name=publisher,proto3" json:"publisher,omitempty"` Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` Type TicketAck_Type `protobuf:"varint,4,opt,name=type,proto3,enum=bitswap.message.pb.TicketAck_Type" json:"type,omitempty"` }
func (*TicketAck) Descriptor ¶
func (*TicketAck) GetPublisher ¶
func (*TicketAck) GetReceiver ¶
func (*TicketAck) GetType ¶
func (m *TicketAck) GetType() TicketAck_Type
func (*TicketAck) MarshalToSizedBuffer ¶
func (*TicketAck) ProtoMessage ¶
func (*TicketAck) ProtoMessage()
func (*TicketAck) XXX_DiscardUnknown ¶
func (m *TicketAck) XXX_DiscardUnknown()
func (*TicketAck) XXX_Marshal ¶
func (*TicketAck) XXX_Unmarshal ¶
type TicketAck_Type ¶
type TicketAck_Type int32
const ( TicketAck_ACCEPT TicketAck_Type = 0 TicketAck_CANCEL TicketAck_Type = 1 )
func (TicketAck_Type) EnumDescriptor ¶
func (TicketAck_Type) EnumDescriptor() ([]byte, []int)
func (TicketAck_Type) String ¶
func (x TicketAck_Type) String() string
type TicketAcklist ¶
type TicketAcklist struct {
Items []*TicketAck `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}
func (*TicketAcklist) Descriptor ¶
func (*TicketAcklist) Descriptor() ([]byte, []int)
func (*TicketAcklist) GetItems ¶
func (m *TicketAcklist) GetItems() []*TicketAck
func (*TicketAcklist) Marshal ¶
func (m *TicketAcklist) Marshal() (dAtA []byte, err error)
func (*TicketAcklist) MarshalToSizedBuffer ¶
func (m *TicketAcklist) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TicketAcklist) ProtoMessage ¶
func (*TicketAcklist) ProtoMessage()
func (*TicketAcklist) Reset ¶
func (m *TicketAcklist) Reset()
func (*TicketAcklist) Size ¶
func (m *TicketAcklist) Size() (n int)
func (*TicketAcklist) String ¶
func (m *TicketAcklist) String() string
func (*TicketAcklist) Unmarshal ¶
func (m *TicketAcklist) Unmarshal(dAtA []byte) error
func (*TicketAcklist) XXX_DiscardUnknown ¶
func (m *TicketAcklist) XXX_DiscardUnknown()
func (*TicketAcklist) XXX_Marshal ¶
func (m *TicketAcklist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TicketAcklist) XXX_Merge ¶
func (m *TicketAcklist) XXX_Merge(src proto.Message)
func (*TicketAcklist) XXX_Size ¶
func (m *TicketAcklist) XXX_Size() int
func (*TicketAcklist) XXX_Unmarshal ¶
func (m *TicketAcklist) XXX_Unmarshal(b []byte) error
type Ticket_State ¶
type Ticket_State int32
const ( Ticket_New Ticket_State = 0 Ticket_ACK Ticket_State = 1 Ticket_CANCEL Ticket_State = 2 Ticket_TIMEOUT Ticket_State = 3 )
func (Ticket_State) EnumDescriptor ¶
func (Ticket_State) EnumDescriptor() ([]byte, []int)
func (Ticket_State) String ¶
func (x Ticket_State) String() string
type Ticketlist ¶
type Ticketlist struct {
Items []*Ticket `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}
func (*Ticketlist) Descriptor ¶
func (*Ticketlist) Descriptor() ([]byte, []int)
func (*Ticketlist) GetItems ¶
func (m *Ticketlist) GetItems() []*Ticket
func (*Ticketlist) Marshal ¶
func (m *Ticketlist) Marshal() (dAtA []byte, err error)
func (*Ticketlist) MarshalToSizedBuffer ¶
func (m *Ticketlist) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Ticketlist) ProtoMessage ¶
func (*Ticketlist) ProtoMessage()
func (*Ticketlist) Reset ¶
func (m *Ticketlist) Reset()
func (*Ticketlist) Size ¶
func (m *Ticketlist) Size() (n int)
func (*Ticketlist) String ¶
func (m *Ticketlist) String() string
func (*Ticketlist) Unmarshal ¶
func (m *Ticketlist) Unmarshal(dAtA []byte) error
func (*Ticketlist) XXX_DiscardUnknown ¶
func (m *Ticketlist) XXX_DiscardUnknown()
func (*Ticketlist) XXX_Marshal ¶
func (m *Ticketlist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Ticketlist) XXX_Merge ¶
func (m *Ticketlist) XXX_Merge(src proto.Message)
func (*Ticketlist) XXX_Size ¶
func (m *Ticketlist) XXX_Size() int
func (*Ticketlist) XXX_Unmarshal ¶
func (m *Ticketlist) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.