Documentation ¶
Index ¶
- Constants
- func NewTestNetworkSwitcher() core.NetworkSwitcher
- type CommunicatorMock
- func (cm *CommunicatorMock) ExchangePhase1(ctx context.Context, originClaim *packets.NodeAnnounceClaim, ...) (map[core.RecordRef]*packets.Phase1Packet, error)
- func (cm *CommunicatorMock) ExchangePhase2(ctx context.Context, list network.UnsyncList, participants []core.Node, ...) (map[core.RecordRef]*packets.Phase2Packet, error)
- func (cm *CommunicatorMock) ExchangePhase21(ctx context.Context, list network.UnsyncList, packet *packets.Phase2Packet, ...) ([]packets.ReferendumVote, error)
- func (cm *CommunicatorMock) ExchangePhase3(ctx context.Context, participants []core.Node, packet *packets.Phase3Packet) (map[core.RecordRef]*packets.Phase3Packet, error)
- func (cm *CommunicatorMock) Init(ctx context.Context) error
- type CommunicatorTestOpt
- type ServiceNetwork
- func (n *ServiceNetwork) HandlePulse(ctx context.Context, newPulse core.Pulse)
- func (n *ServiceNetwork) Init(ctx context.Context) error
- func (n *ServiceNetwork) Leave(ctx context.Context, ETA core.PulseNumber)
- func (n *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)
- func (n *ServiceNetwork) SendCascadeMessage(data core.Cascade, method string, msg core.Parcel) error
- func (n *ServiceNetwork) SendMessage(nodeID core.RecordRef, method string, msg core.Parcel) ([]byte, error)
- func (n *ServiceNetwork) Start(ctx context.Context) error
- func (n *ServiceNetwork) Stop(ctx context.Context) error
- type TestPulsar
Constants ¶
View Source
const ( PartialPositive1Phase = CommunicatorTestOpt(iota + 1) PartialNegative1Phase PartialPositive2Phase PartialNegative2Phase PartialPositive3Phase PartialNegative3Phase PartialPositive23Phase PartialNegative23Phase )
Variables ¶
This section is empty.
Functions ¶
func NewTestNetworkSwitcher ¶ added in v0.8.0
func NewTestNetworkSwitcher() core.NetworkSwitcher
Types ¶
type CommunicatorMock ¶ added in v0.8.0
type CommunicatorMock struct {
// contains filtered or unexported fields
}
func (*CommunicatorMock) ExchangePhase1 ¶ added in v0.8.0
func (cm *CommunicatorMock) ExchangePhase1( ctx context.Context, originClaim *packets.NodeAnnounceClaim, participants []core.Node, packet *packets.Phase1Packet, ) (map[core.RecordRef]*packets.Phase1Packet, error)
func (*CommunicatorMock) ExchangePhase2 ¶ added in v0.8.0
func (cm *CommunicatorMock) ExchangePhase2(ctx context.Context, list network.UnsyncList, participants []core.Node, packet *packets.Phase2Packet) (map[core.RecordRef]*packets.Phase2Packet, error)
func (*CommunicatorMock) ExchangePhase21 ¶ added in v0.8.0
func (cm *CommunicatorMock) ExchangePhase21(ctx context.Context, list network.UnsyncList, packet *packets.Phase2Packet, additionalRequests []*phases.AdditionalRequest) ([]packets.ReferendumVote, error)
func (*CommunicatorMock) ExchangePhase3 ¶ added in v0.8.0
func (cm *CommunicatorMock) ExchangePhase3(ctx context.Context, participants []core.Node, packet *packets.Phase3Packet) (map[core.RecordRef]*packets.Phase3Packet, error)
type CommunicatorTestOpt ¶ added in v0.8.0
type CommunicatorTestOpt int
type ServiceNetwork ¶
type ServiceNetwork struct { // dependencies CertificateManager core.CertificateManager `inject:""` PulseManager core.PulseManager `inject:""` PulseStorage core.PulseStorage `inject:""` CryptographyService core.CryptographyService `inject:""` NetworkCoordinator core.NetworkCoordinator `inject:""` CryptographyScheme core.PlatformCryptographyScheme `inject:""` NodeKeeper network.NodeKeeper `inject:""` NetworkSwitcher core.NetworkSwitcher `inject:""` TerminationHandler core.TerminationHandler `inject:""` // subcomponents PhaseManager phases.PhaseManager `inject:"subcomponent"` Controller network.Controller `inject:"subcomponent"` // contains filtered or unexported fields }
ServiceNetwork is facade for network.
func NewServiceNetwork ¶
func NewServiceNetwork(conf configuration.Configuration, rootCm *component.Manager, isGenesis bool) (*ServiceNetwork, error)
NewServiceNetwork returns a new ServiceNetwork.
func (*ServiceNetwork) HandlePulse ¶ added in v0.6.3
func (n *ServiceNetwork) HandlePulse(ctx context.Context, newPulse core.Pulse)
func (*ServiceNetwork) Init ¶ added in v0.6.3
func (n *ServiceNetwork) Init(ctx context.Context) error
Start implements component.Initer
func (*ServiceNetwork) Leave ¶ added in v0.8.0
func (n *ServiceNetwork) Leave(ctx context.Context, ETA core.PulseNumber)
func (*ServiceNetwork) RemoteProcedureRegister ¶
func (n *ServiceNetwork) RemoteProcedureRegister(name string, method core.RemoteProcedure)
RemoteProcedureRegister registers procedure for remote call on this host.
func (*ServiceNetwork) SendCascadeMessage ¶ added in v0.2.0
func (n *ServiceNetwork) SendCascadeMessage(data core.Cascade, method string, msg core.Parcel) error
SendCascadeMessage sends a message from MessageBus to a cascade of nodes
func (*ServiceNetwork) SendMessage ¶
func (n *ServiceNetwork) SendMessage(nodeID core.RecordRef, method string, msg core.Parcel) ([]byte, error)
SendMessage sends a message from MessageBus.
type TestPulsar ¶ added in v0.8.0
type TestPulsar interface { Start(ctx context.Context, bootstrapHosts []string) error component.Stopper }
func NewTestPulsar ¶ added in v0.8.0
func NewTestPulsar(pulseTimeMs, requestsTimeoutMs, pulseDelta int32) (TestPulsar, error)
Click to show internal directories.
Click to hide internal directories.