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, address string, codec network.Codec, orchestrator insecure.AttackOrchestrator, connector insecure.CorruptedNodeConnector, corruptedIds flow.IdentityList) (*AttackNetwork, error)
func (*AttackNetwork) Observe ¶
func (a *AttackNetwork) Observe(stream insecure.Attacker_ObserveServer) error
Observe implements the gRPC interface of the attack network that is exposed to the corrupted conduits. 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 Observe method of it remotely.
func (*AttackNetwork) Send ¶
func (a *AttackNetwork) Send(event *insecure.Event) error
Send enforces dissemination of given event via its encapsulated corrupted node networking layer through the Flow network
func (AttackNetwork) ServerAddress ¶
func (a AttackNetwork) ServerAddress() net.Addr
ServerAddress returns the address on which the orchestrator is reachable from corrupted nodes.
type CorruptedConnector ¶
type CorruptedConnector struct {
// contains filtered or unexported fields
}
func NewCorruptedConnector ¶
func NewCorruptedConnector(attackerAddress string, corruptedIds flow.IdentityList) *CorruptedConnector
func (*CorruptedConnector) Connect ¶
func (c *CorruptedConnector) Connect(ctx context.Context, targetId flow.Identifier) (insecure.CorruptedNodeConnection, error)
Connect creates a connection the corruptible conduit factory of the given corrupted identity.
type CorruptedNodeConnection ¶
type CorruptedNodeConnection struct {
// contains filtered or unexported fields
}
CorruptedNodeConnection abstracts connection from orchestrator to a corrupted conduit factory through the attack network.
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.