bazaar

package
v1.2.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type EventType
	Data []byte
	Time int64
}

type EventHandler

type EventHandler func(peer.ID, *Event) error

type EventType

type EventType uint64
const EventPing EventType = 0

developers can define the types except Ping

type Host

type Host interface {
	RegisterHandler(typ Event, hdl EventHandler) error
	Emit(ctx context.Context, evt Event, to ...peer.ID) error
}

Jump to

Keyboard shortcuts

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