peer

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(self plan.PeerID) *router

Types

type Peer

type Peer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New() (*Peer, error)

func NewFromConfig

func NewFromConfig(cfg *env.Config) (*Peer, error)

func (*Peer) Close

func (p *Peer) Close() error

func (*Peer) CurrentSession

func (p *Peer) CurrentSession() *session.Session

func (*Peer) Detached added in v0.2.3

func (p *Peer) Detached() bool

func (*Peer) ProposeNewSize

func (p *Peer) ProposeNewSize(newSize int) error

func (*Peer) Request added in v0.2.3

func (p *Peer) Request(target plan.PeerID, version, name string, buf *base.Vector) (bool, error)

func (*Peer) RequestRank added in v0.2.3

func (p *Peer) RequestRank(rank int, version, name string, buf *base.Vector) (bool, error)

func (*Peer) ResizeCluster added in v0.2.3

func (p *Peer) ResizeCluster(newSize int) (bool, bool, error)

func (*Peer) ResizeClusterFromURL

func (p *Peer) ResizeClusterFromURL() (bool, bool, error)

func (*Peer) Save

func (p *Peer) Save(name string, buf *base.Vector) error

func (*Peer) SaveVersion

func (p *Peer) SaveVersion(version, name string, buf *base.Vector) error

func (*Peer) Start

func (p *Peer) Start() error

func (*Peer) UID

func (p *Peer) UID() uint64

UID returns an immutable unique ID of this peer

func (*Peer) Update

func (p *Peer) Update() bool

Jump to

Keyboard shortcuts

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