Documentation ¶
Index ¶
- type AutowiredNode
- type Connector
- type ISimulation
- type NodeUtil
- type SimulatedNode
- func (n *SimulatedNode) Callback(timeout int, routine func()) interfaces.Callback
- func (n *SimulatedNode) Id() string
- func (n *SimulatedNode) Join() string
- func (n *SimulatedNode) Routine(interval int, routine func()) interfaces.Routine
- func (n *SimulatedNode) Time() func() int
- func (n *SimulatedNode) Transport() interfaces.Transport
- type Simulation
- type SimulationBuilder
- func (b *SimulationBuilder) Build() ISimulation
- func (b *SimulationBuilder) WithCapacityNodes(nodes int, upload int, download int) *SimulationBuilder
- func (b *SimulationBuilder) WithCapacityScheduler(interval int) *SimulationBuilder
- func (b *SimulationBuilder) WithFixedNodes(nodes int) *SimulationBuilder
- func (b *SimulationBuilder) WithInternetworkUnderlay(transitDomains int, transitDomainSize int, stubDomains int, stubDomainSize int) *SimulationBuilder
- func (b *SimulationBuilder) WithLogs(logsFile string) *SimulationBuilder
- func (b *SimulationBuilder) WithParallelSimulation() *SimulationBuilder
- func (b *SimulationBuilder) WithRandomUniformUnderlay(nodes int, edges int, minLatency int, maxLatency int) *SimulationBuilder
- type SpeerNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutowiredNode ¶
type AutowiredNode struct { interfaces.Node interfaces.NodeUtil }
type Connector ¶
type Connector struct { interfaces.ControlTransport interfaces.DataTransport }
type ISimulation ¶
type ISimulation interface { interfaces.ISimulation }
type NodeUtil ¶
type NodeUtil interface { interfaces.NodeUtil }
func NewSimulatedNode ¶
func NewSimulatedNode( controlTransport interfaces.ControlTransport, dataTransport interfaces.DataTransport, simulation *events.Simulation, bootstrap overlay.Bootstrap, id string, time func() int, ) NodeUtil
type SimulatedNode ¶
type SimulatedNode struct { *Connector // contains filtered or unexported fields }
func (*SimulatedNode) Callback ¶
func (n *SimulatedNode) Callback(timeout int, routine func()) interfaces.Callback
func (*SimulatedNode) Id ¶
func (n *SimulatedNode) Id() string
func (*SimulatedNode) Join ¶
func (n *SimulatedNode) Join() string
func (*SimulatedNode) Routine ¶
func (n *SimulatedNode) Routine(interval int, routine func()) interfaces.Routine
func (*SimulatedNode) Time ¶
func (n *SimulatedNode) Time() func() int
func (*SimulatedNode) Transport ¶
func (n *SimulatedNode) Transport() interfaces.Transport
type Simulation ¶
type Simulation struct {
// contains filtered or unexported fields
}
func (*Simulation) Run ¶
func (s *Simulation) Run()
func (*Simulation) Stop ¶
func (s *Simulation) Stop()
func (*Simulation) Time ¶
func (s *Simulation) Time() int
type SimulationBuilder ¶
type SimulationBuilder struct {
*Simulation
}
func NewSimulationBuilder ¶
func NewSimulationBuilder(template interfaces.Node) *SimulationBuilder
func (*SimulationBuilder) Build ¶
func (b *SimulationBuilder) Build() ISimulation
func (*SimulationBuilder) WithCapacityNodes ¶
func (b *SimulationBuilder) WithCapacityNodes( nodes int, upload int, download int, ) *SimulationBuilder
func (*SimulationBuilder) WithCapacityScheduler ¶
func (b *SimulationBuilder) WithCapacityScheduler( interval int, ) *SimulationBuilder
func (*SimulationBuilder) WithFixedNodes ¶
func (b *SimulationBuilder) WithFixedNodes( nodes int, ) *SimulationBuilder
func (*SimulationBuilder) WithInternetworkUnderlay ¶
func (b *SimulationBuilder) WithInternetworkUnderlay( transitDomains int, transitDomainSize int, stubDomains int, stubDomainSize int, ) *SimulationBuilder
func (*SimulationBuilder) WithLogs ¶
func (b *SimulationBuilder) WithLogs(logsFile string) *SimulationBuilder
func (*SimulationBuilder) WithParallelSimulation ¶
func (b *SimulationBuilder) WithParallelSimulation() *SimulationBuilder
func (*SimulationBuilder) WithRandomUniformUnderlay ¶
func (b *SimulationBuilder) WithRandomUniformUnderlay( nodes int, edges int, minLatency int, maxLatency int, ) *SimulationBuilder
type SpeerNode ¶
type SpeerNode interface { interfaces.Node interfaces.NodeUtil }
func NewAutowiredNode ¶
func NewAutowiredNode( template interfaces.Node, util interfaces.NodeUtil, ) SpeerNode
Click to show internal directories.
Click to hide internal directories.