notifications

package
Version: v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const RoutingQueryKey = "RoutingQueryEvent"

Variables

This section is empty.

Functions

func PublishQueryEvent

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

func RegisterForQueryEvents

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

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
)

Source Files

Jump to

Keyboard shortcuts

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