fusrodah

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryMessage added in v0.3.0

type DiscoveryMessage struct {
	WorkerEndpoint string `json:"worker_endpoint"`
	ClientEndpoint string `json:"client_endpoint"`
}

type Fusrodah

type Fusrodah struct {
	Prv *ecdsa.PrivateKey

	Enodes []string
	Port   string
	// contains filtered or unexported fields
}

func NewServer

func NewServer(prv *ecdsa.PrivateKey, port string, enodes []string) (frd *Fusrodah, err error)

NewServer builds new Fusrodah server instance

func (*Fusrodah) AddHandling

func (fusrodah *Fusrodah) AddHandling(to *ecdsa.PublicKey, from *ecdsa.PublicKey, handler func(msg *whisperv2.Message), topics ...string) int

AddHandling adds register handler for messages with given keys and on given topics

func (*Fusrodah) RemoveHandling

func (fusrodah *Fusrodah) RemoveHandling(id int)

RemoveHandling removes message handler by their id

func (*Fusrodah) Send

func (fusrodah *Fusrodah) Send(payload string, anonymous bool, topics ...string) error

Send sends broadcast send non-encrypted message

func (*Fusrodah) Start

func (fusrodah *Fusrodah) Start() (err error)

Start start whisper server

func (*Fusrodah) Stop

func (fusrodah *Fusrodah) Stop() (err error)

Stop stops whisper and p2p servers

Directories

Path Synopsis
examples
hub

Jump to

Keyboard shortcuts

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