notifications

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2015 License: MIT Imports: 3 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 []*peer.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
)

Jump to

Keyboard shortcuts

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