Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttackNetwork ¶
AttackNetwork implements a middleware for mounting an attack orchestrator and empowering it to communicate with the corrupted nodes.
func NewAttackNetwork ¶
func NewAttackNetwork( logger zerolog.Logger, codec network.Codec, orchestrator insecure.AttackOrchestrator, connector insecure.CorruptedNodeConnector, corruptedNodeIds flow.IdentityList) (*AttackNetwork, error)
func (*AttackNetwork) Observe ¶
func (a *AttackNetwork) Observe(message *insecure.Message)
Observe is the inbound message handler of the attack network. Instead of dispatching their messages to the networking layer of Flow, the conduits of corrupted nodes dispatch the outgoing messages to the attack network by calling the InboundHandler method of it remotely.
type CorruptedConnector ¶
type CorruptedConnector struct {
// contains filtered or unexported fields
}
func NewCorruptedConnector ¶
func NewCorruptedConnector( logger zerolog.Logger, corruptedNodeIds flow.IdentityList, corruptedPortMapping map[flow.Identifier]string) *CorruptedConnector
func (*CorruptedConnector) Connect ¶
func (c *CorruptedConnector) Connect(ctx irrecoverable.SignalerContext, targetId flow.Identifier) (insecure.CorruptedNodeConnection, error)
Connect creates a connection the corruptible conduit factory of the given corrupted identity.
func (*CorruptedConnector) WithIncomingMessageHandler ¶ added in v0.27.0
func (c *CorruptedConnector) WithIncomingMessageHandler(handler func(*insecure.Message))
WithIncomingMessageHandler sets the handler for the incoming messages from remote corrupted nodes.
type CorruptedNodeConnection ¶
type CorruptedNodeConnection struct { component.Component // contains filtered or unexported fields }
CorruptedNodeConnection abstracts connection between an attack orchestrator to a corruptible conduit factory (ccf) through the attack network.
func NewCorruptedNodeConnection ¶ added in v0.27.0
func NewCorruptedNodeConnection( logger zerolog.Logger, inboundHandler func(message *insecure.Message), outbound insecure.CorruptibleConduitFactory_ProcessAttackerMessageClient, inbound insecure.CorruptibleConduitFactory_ConnectAttackerClient) *CorruptedNodeConnection
func (*CorruptedNodeConnection) CloseConnection ¶
func (c *CorruptedNodeConnection) CloseConnection() error
CloseConnection closes the connection to the corrupted conduit factory.
func (*CorruptedNodeConnection) SendMessage ¶
func (c *CorruptedNodeConnection) SendMessage(message *insecure.Message) error
SendMessage sends the message from orchestrator to the corrupted conduit factory.