queue

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestQueueTickerInterval = 2 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugRequest added in v0.3.0

type DebugRequest struct {
	Hash        string `json:"hash"`
	IsReceived  bool   `json:"received"`
	IsProcessed bool   `json:"processed"`
	InCache     bool   `json:"inCache"`
	InPending   bool   `json:"inPending"`
	InLifo      bool   `json:"inLifo"`
	TxExists    bool   `json:"txExists"`
}

Request struct

type RequestQueue

type RequestQueue struct {
	syncutils.Mutex
	// contains filtered or unexported fields
}

func NewRequestQueue

func NewRequestQueue() *RequestQueue

func (*RequestQueue) Add

func (s *RequestQueue) Add(txHash trinary.Hash, ms milestone_index.MilestoneIndex, markRequested bool) bool

func (*RequestQueue) AddMulti

func (s *RequestQueue) AddMulti(hashes trinary.Hashes, ms milestone_index.MilestoneIndex, markRequested bool) []bool

func (*RequestQueue) Contains

func (*RequestQueue) CurrentMilestoneIndexAndSize

func (s *RequestQueue) CurrentMilestoneIndexAndSize() (index milestone_index.MilestoneIndex, size int)

func (*RequestQueue) DebugRequests added in v0.3.0

func (s *RequestQueue) DebugRequests() []*DebugRequest

func (*RequestQueue) GetCache added in v0.2.1

func (s *RequestQueue) GetCache() *lru_cache.LRUCache

func (*RequestQueue) GetNext

func (*RequestQueue) GetNextInRange

func (*RequestQueue) MarkProcessed

func (s *RequestQueue) MarkProcessed(txHash trinary.Hash) bool

func (*RequestQueue) MarkReceived

func (s *RequestQueue) MarkReceived(txHash trinary.Hash) bool

func (*RequestQueue) Stop

func (s *RequestQueue) Stop()

Jump to

Keyboard shortcuts

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