sdk

package
v0.0.0-...-6d29b5c Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 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

Jump to

Keyboard shortcuts

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