peerdirectory

package
v0.0.0-...-43cd4a5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2017 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directory

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

func NewDirectory

func NewDirectory(addr string, codec gomsg.Codec) *Directory

NewDirectory creates a peer directory where all the clients connect to know about their peers

type Peer

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

func NewPeer

func NewPeer(dirAddr string, bindAddr string, codec gomsg.Codec) *Peer

func (*Peer) Cancel

func (this *Peer) Cancel(name string)

func (*Peer) Destroy

func (this *Peer) Destroy()

func (*Peer) Handle

func (this *Peer) Handle(name string, fun interface{}) *Peer

func (*Peer) Publish

func (this *Peer) Publish(name string, payload interface{})

func (*Peer) Push

func (this *Peer) Push(name string, payload interface{}) error

func (*Peer) Request

func (this *Peer) Request(name string, payload interface{}, handler interface{}) <-chan error

func (*Peer) RequestAll

func (this *Peer) RequestAll(name string, payload interface{}, handler interface{}) <-chan error

type Peered

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

type Peers

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

func NewPeers

func NewPeers() *Peers

func (*Peers) Clear

func (this *Peers) Clear()

func (*Peers) List

func (this *Peers) List() []*gomsg.Client

func (*Peers) Put

func (this *Peers) Put(addr string, peer *gomsg.Client)

func (*Peers) Remove

func (this *Peers) Remove(addr string)

func (*Peers) Rotate

func (this *Peers) Rotate() []*gomsg.Client

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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