notifications

package
v0.0.0-...-8b9b725 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT, MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QueryEventBufferSize = 16

Number of events to buffer.

Functions

func PublishQueryEvent

func PublishQueryEvent(ctx context.Context, ev *QueryEvent)

func RegisterForQueryEvents

func RegisterForQueryEvents(ctx context.Context) (context.Context, <-chan *QueryEvent)

Types

type QueryEvent

type QueryEvent struct {
	ID        peer.ID
	Type      QueryEventType
	Responses []*pstore.PeerInfo
	Extra     string
}

func (*QueryEvent) MarshalJSON

func (qe *QueryEvent) MarshalJSON() ([]byte, error)

func (*QueryEvent) UnmarshalJSON

func (qe *QueryEvent) UnmarshalJSON(b []byte) error

type QueryEventType

type QueryEventType int
const (
	SendingQuery QueryEventType = iota
	PeerResponse
	FinalPeer
	QueryError
	Provider
	Value
	AddingPeer
	DialingPeer
)

Jump to

Keyboard shortcuts

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