Versions in this module Expand all Collapse all v0 v0.1.10 Dec 16, 2019 Changes in this version + const ACK_ACCEPT + const ACK_CANCEL + const STATE_ACK + const STATE_CANCEL + const STATE_NEW + const STATE_TIMEOUT + const STORE_RECV + const STORE_SEND + var SendingListTypeError = fmt.Errorf("Elements in prapareSendingList is not TicketAck") + func NewLinkedTicketStore() *linkedTicketStore + type BasicTicket struct + func CreateBasicTicket(sendTo peer.ID, contentId cid.Cid, blockSize int64) *BasicTicket + func CreateBasicTicketWithTime(sendTo peer.ID, contentId cid.Cid, blockSize int64, timeStamp int64) *BasicTicket + func NewBasicTicket(ticket *pb.Ticket) (*BasicTicket, error) + func (a *BasicTicket) SetTimeStamp(timeStamp int64) + func (t *BasicTicket) ACKed() + func (t *BasicTicket) BasicInfo() string + func (t *BasicTicket) Canceled() + func (t *BasicTicket) Cid() cid.Cid + func (t *BasicTicket) GetSize() int64 + func (t *BasicTicket) GetState() int32 + func (t *BasicTicket) GetStateString() string + func (t *BasicTicket) Level() int64 + func (t *BasicTicket) Loggable() map[string]interface{} + func (t *BasicTicket) Publisher() peer.ID + func (t *BasicTicket) SendTo() peer.ID + func (t *BasicTicket) SetPublisher(p peer.ID) + func (t *BasicTicket) ToProto() *pb.Ticket + type BasicTicketAck struct + func CreateBasicTicketAck(publisher peer.ID, receiver peer.ID, contentId cid.Cid, acktype int32) *BasicTicketAck + func NewBasicTicketAck(ack *pb.TicketAck) (*BasicTicketAck, error) + func (a *BasicTicketAck) ACK() int32 + func (a *BasicTicketAck) Cid() cid.Cid + func (a *BasicTicketAck) Loggable() map[string]interface{} + func (a *BasicTicketAck) Publisher() peer.ID + func (a *BasicTicketAck) Receiver() peer.ID + func (a *BasicTicketAck) ToProto() *pb.TicketAck + type InvalidPublisherError struct + func (e *InvalidPublisherError) Error() string + type Loggable interface + Loggable func() map[string]interface{} + type NotInitializeError struct + func (e *NotInitializeError) Error() string + type Ticket interface + ACKed func() + BasicInfo func() string + Canceled func() + Cid func() cid.Cid + GetSize func() int64 + GetState func() int32 + Level func() int64 + Publisher func() peer.ID + SendTo func() peer.ID + SetPublisher func(peer.ID) + SetTimeStamp func(timeStamp int64) + ToProto func() *pb.Ticket + type TicketAck interface + ACK func() int32 + Cid func() cid.Cid + Publisher func() peer.ID + Receiver func() peer.ID + ToProto func() *pb.TicketAck + func AckFromTicket(p peer.ID, t Ticket, ackType int32) TicketAck + func GetAcceptAcks(p peer.ID, ts []Ticket) []TicketAck + func GetRejectAcks(p peer.ID, ts []Ticket) []TicketAck + type TicketNotFound struct + func (e *TicketNotFound) Error() string + type TicketStore interface + AddTicket func(ticket Ticket) error + AddTickets func(ticket []Ticket) error + Clean func() + GetReceivedTicket func(cids []cid.Cid) (map[cid.Cid]Ticket, error) + GetTickets func(cid cid.Cid) ([]Ticket, error) + PopSendingTasks func(cids []cid.Cid) ([]TicketAck, error) + PopTickets func() *TicketTask + PredictTime func() int64 + PrepareSending func(acks []TicketAck) error + RemoveCanceled func() int + RemoveSendingTask func(pid peer.ID, cids []cid.Cid) error + RemoveTicket func(pid peer.ID, cid cid.Cid) error + RemoveTicketEqualsTo func(ticket Ticket) + RemoveTickets func(pid peer.ID, cids []cid.Cid) error + StoreReceivedTickets func(tickets []Ticket) error + TicketNumber func() int + TicketSize func() int64 + type TicketTask struct + Target peer.ID + Tickets []Ticket v0.1.10-1 Dec 16, 2019