zgossip

package
v0.0.0-...-5ca05b5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2015 License: MPL-2.0 Imports: 14 Imported by: 6

Documentation

Overview

Package zgossip is a server implementation of the ZeroMQ Gossip Discovery Protocol

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resp

type Resp struct {
	Method  string
	Payload interface{}
	Err     error
}

type Zgossip

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

func New

func New(logPrefix string) (*Zgossip, error)

New creates a new Zgossip instance.

func (*Zgossip) RecvResp

func (z *Zgossip) RecvResp(timeout time.Duration) (interface{}, error)

RecvResp returns a response from the pipe channel (the server).

func (*Zgossip) Resp

func (z *Zgossip) Resp() chan interface{}

Resp returns the response channel. Resp channel should be used to receive responses from the server.

func (*Zgossip) Run

func (z *Zgossip) Run() error

Run starts the server and waits for connections. Note that this is blocking and will wait until a signal is received or a handler returns with an error.

func (*Zgossip) SendCmd

func (z *Zgossip) SendCmd(method string, arg interface{}, timeout time.Duration) error

SendCmd sends a command to the server.

Directories

Path Synopsis
Package msg is 100% generated.
Package msg is 100% generated.

Jump to

Keyboard shortcuts

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