network

package
v0.0.0-...-7ef8827 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: AGPL-3.0, AGPL-3.0-only Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnectionManager

func NewConnectionManager(rmId common.RMId, bootCount uint32, procs int, db *db.Databases, nodeCertPrivKeyPair *certs.NodeCertificatePrivateKeyPair, port uint16, ss ShutdownSignaller, config *configuration.Configuration) (*ConnectionManager, *TopologyTransmogrifier)

Types

type Connection

type Connection struct {
	ConnectionNumber uint32
	// contains filtered or unexported fields
}

func NewConnectionFromTCPConn

func NewConnectionFromTCPConn(socket *net.TCPConn, cm *ConnectionManager, count uint32) *Connection

func NewConnectionToDial

func NewConnectionToDial(host string, cm *ConnectionManager) *Connection

func (*Connection) ConnectedRMs

func (conn *Connection) ConnectedRMs(servers map[common.RMId]paxos.Connection)

func (*Connection) ConnectionEstablished

func (conn *Connection) ConnectionEstablished(rmId common.RMId, c paxos.Connection, servers map[common.RMId]paxos.Connection, done func())

func (*Connection) ConnectionLost

func (conn *Connection) ConnectionLost(rmId common.RMId, servers map[common.RMId]paxos.Connection)

func (*Connection) Send

func (conn *Connection) Send(msg []byte)

func (*Connection) Shutdown

func (conn *Connection) Shutdown(sync paxos.Blocking)

func (*Connection) Status

func (conn *Connection) Status(sc *server.StatusConsumer)

func (*Connection) SubmissionOutcomeReceived

func (conn *Connection) SubmissionOutcomeReceived(sender common.RMId, txn *eng.TxnReader, outcome *msgs.Outcome)

func (*Connection) TopologyChanged

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

type ConnectionManager

type ConnectionManager struct {
	sync.RWMutex

	RMId common.RMId

	NodeCertificatePrivateKeyPair *certs.NodeCertificatePrivateKeyPair
	Transmogrifier                *TopologyTransmogrifier

	Dispatchers *paxos.Dispatchers
	// contains filtered or unexported fields
}

func (*ConnectionManager) AddServerConnectionSubscriber

func (cm *ConnectionManager) AddServerConnectionSubscriber(obs paxos.ServerConnectionSubscriber)

func (*ConnectionManager) AddTopologySubscriber

func (*ConnectionManager) BootCount

func (cm *ConnectionManager) BootCount() uint32

func (*ConnectionManager) ClientEstablished

func (cm *ConnectionManager) ClientEstablished(connNumber uint32, conn paxos.ClientConnection) map[common.RMId]paxos.Connection

NB client established gets you server connection subscriber too. It does not get you a topology subscriber.

func (*ConnectionManager) ClientLost

func (cm *ConnectionManager) ClientLost(connNumber uint32, conn paxos.ClientConnection)

func (*ConnectionManager) DispatchMessage

func (cm *ConnectionManager) DispatchMessage(sender common.RMId, msgType msgs.Message_Which, msg msgs.Message)

func (*ConnectionManager) GetClient

func (cm *ConnectionManager) GetClient(bootNumber, connNumber uint32) paxos.ClientConnection

func (*ConnectionManager) LocalHost

func (cm *ConnectionManager) LocalHost() string

func (*ConnectionManager) RemoveServerConnectionSubscriber

func (cm *ConnectionManager) RemoveServerConnectionSubscriber(obs paxos.ServerConnectionSubscriber)

func (*ConnectionManager) RemoveTopologySubscriberAsync

func (cm *ConnectionManager) RemoveTopologySubscriberAsync(subType eng.TopologyChangeSubscriberType, obs eng.TopologySubscriber)

func (*ConnectionManager) RequestConfigurationChange

func (cm *ConnectionManager) RequestConfigurationChange(config *configuration.Configuration)

func (*ConnectionManager) Send

func (cm *ConnectionManager) Send(b []byte)

paxos.Connection interface to allow sending to ourself.

func (*ConnectionManager) ServerConnectionFlushed

func (cm *ConnectionManager) ServerConnectionFlushed(rmId common.RMId)

func (*ConnectionManager) ServerEstablished

func (cm *ConnectionManager) ServerEstablished(conn *Connection, host string, rmId common.RMId, bootCount uint32, tieBreak uint32, clusterUUId uint64, flushCallback func())

func (*ConnectionManager) ServerLost

func (cm *ConnectionManager) ServerLost(conn *Connection, rmId common.RMId, restarting bool)

func (*ConnectionManager) SetDesiredServers

func (cm *ConnectionManager) SetDesiredServers(localhost string, remotehosts []string)

func (*ConnectionManager) SetTopology

func (cm *ConnectionManager) SetTopology(topology *configuration.Topology, callbacks map[eng.TopologyChangeSubscriberType]func())

func (*ConnectionManager) Shutdown

func (cm *ConnectionManager) Shutdown(sync paxos.Blocking)

func (*ConnectionManager) Status

func (cm *ConnectionManager) Status(sc *server.StatusConsumer)

func (*ConnectionManager) TopologyChanged

func (cm *ConnectionManager) TopologyChanged(topology *configuration.Topology, done func(bool))

type Listener

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

func NewListener

func NewListener(listenPort uint16, cm *ConnectionManager) (*Listener, error)

func (*Listener) Shutdown

func (l *Listener) Shutdown()

type ShutdownSignaller

type ShutdownSignaller interface {
	SignalShutdown()
}

type TopologyTransmogrifier

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

func NewTopologyTransmogrifier

func NewTopologyTransmogrifier(db *db.Databases, cm *ConnectionManager, lc *client.LocalConnection, listenPort uint16, ss ShutdownSignaller, config *configuration.Configuration) (*TopologyTransmogrifier, <-chan struct{})

func (*TopologyTransmogrifier) ConnectedRMs

func (tt *TopologyTransmogrifier) ConnectedRMs(conns map[common.RMId]paxos.Connection)

func (*TopologyTransmogrifier) ConnectionEstablished

func (tt *TopologyTransmogrifier) ConnectionEstablished(rmId common.RMId, conn paxos.Connection, conns map[common.RMId]paxos.Connection, done func())

func (*TopologyTransmogrifier) ConnectionLost

func (tt *TopologyTransmogrifier) ConnectionLost(rmId common.RMId, conns map[common.RMId]paxos.Connection)

func (*TopologyTransmogrifier) MigrationCompleteReceived

func (tt *TopologyTransmogrifier) MigrationCompleteReceived(sender common.RMId, migrationComplete *msgs.MigrationComplete)

func (*TopologyTransmogrifier) MigrationReceived

func (tt *TopologyTransmogrifier) MigrationReceived(sender common.RMId, migration *msgs.Migration)

func (*TopologyTransmogrifier) RequestConfigurationChange

func (tt *TopologyTransmogrifier) RequestConfigurationChange(config *configuration.Configuration)

func (*TopologyTransmogrifier) Shutdown

func (tt *TopologyTransmogrifier) Shutdown()

Jump to

Keyboard shortcuts

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