notify

package
v0.0.0-...-b78b3a4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//
	MsgCodeStart = iota

	//
	MsgCodeNotifyWithKey

	//
	MsgCodeNotify

	//
	MsgCodeStop
	MsgCodeMax
)
View Source
const (
	DefaultAddressLength = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(ps *pss.Pss) *Controller

func (*Controller) Handler

func (c *Controller) Handler(smsg []byte, p *p2p.Peer, asymmetric bool, keyid string) error

func (*Controller) IsActive

func (c *Controller) IsActive(name string) bool

func (*Controller) NewNotifier

func (c *Controller) NewNotifier(name string, threshold int, updateC <-chan []byte) (func(), error)

func (*Controller) RemoveNotifier

func (c *Controller) RemoveNotifier(name string) error

func (*Controller) Subscribe

func (c *Controller) Subscribe(name string, pubkey *ecdsa.PublicKey, address pss.PssAddress, handler func(string, []byte) error) error

func (*Controller) Unsubscribe

func (c *Controller) Unsubscribe(name string) error

type Msg

type Msg struct {
	Code    byte
	Name    []byte
	Payload []byte
	// contains filtered or unexported fields
}

func NewMsg

func NewMsg(code byte, name string, payload []byte) *Msg

func NewMsgFromPayload

func NewMsgFromPayload(payload []byte) (*Msg, error)

Jump to

Keyboard shortcuts

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