lively

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 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 Liveliness

type Liveliness struct {
	PeerID string `json:"peer_id"`
	Ping   *Ping  `json:"ping"`
	Err    error  `json:"error"`
	Addr   string `json:"addr,omitepty"`
}

type LivelyRequest

type LivelyRequest struct {
	ConcurrentPings int
}

type Peer

type Peer struct {
	Addr string `json:"addr"`
	ID   string `json:"id"`

	Primary bool `json:"primary"`

	Peers map[string]*Peer `json:"peers"`
	// contains filtered or unexported fields
}

func (*Peer) AddPeer

func (p *Peer) AddPeer(other *Peer) error

func (*Peer) Consesus

func (e *Peer) Consesus() error

func (*Peer) Liveliness

func (p *Peer) Liveliness(llv *LivelyRequest) (livePeers, nonLivePeers []*Liveliness, err error)

func (*Peer) SetHTTPRoundTripper

func (p *Peer) SetHTTPRoundTripper(rt http.RoundTripper)

type Ping

type Ping struct {
	PeerID string `json:"id"`
	Clock  int64  `json:"clock"`
}

Jump to

Keyboard shortcuts

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