network

package
v0.0.0-...-53b40aa Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: AGPL-3.0, AGPL-3.0-only Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	*actor.Mailbox
	*actor.BasicServerOuter

	Rng *rand.Rand
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(yesman Handshaker, cm connectionmanager.ConnectionManager, logger log.Logger) *Connection

func (*Connection) Exec

func (cd *Connection) Exec() (bool, error)

func (*Connection) ShutdownCompleted

func (c *Connection) ShutdownCompleted()

func (*Connection) Status

func (c *Connection) Status(sc *status.StatusConsumer)

func (*Connection) TopologyChanged

func (c *Connection) TopologyChanged(topology *configuration.Topology, done func(bool))

type ConnectionMsgTopologyChanged

type ConnectionMsgTopologyChanged struct {
	actor.MsgSyncQuery

	Topology *configuration.Topology
	// contains filtered or unexported fields
}

func (*ConnectionMsgTopologyChanged) Exec

func (msg *ConnectionMsgTopologyChanged) Exec() (bool, error)

type Handshaker

type Handshaker interface {
	Dial() error
	PerformHandshake(*configuration.Topology) (Protocol, error)
	Restart() bool
	InternalShutdown()
}

type Protocol

type Protocol interface {
	Run(*Connection) error
	TopologyChanged(*ConnectionMsgTopologyChanged) error
	Restart() bool
	InternalShutdown()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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