Documentation
¶
Index ¶
- Constants
- type Event
- type IO
- type Strategy
- func (s *Strategy) Clean(ctx context.Context) error
- func (s *Strategy) Deploy(ctx context.Context, round sim.Round) error
- func (s *Strategy) Execute(ctx context.Context, round sim.Round) error
- func (s *Strategy) Option(opt sim.Option)
- func (s *Strategy) String() string
- func (s *Strategy) WriteStats(ctx context.Context, filename string) error
- type VPN
Constants ¶
View Source
const ( // ContainerStopTimeout is the maximum amount of time given to a container // to stop. ContainerStopTimeout = 10 * time.Second // ExecWaitTimeout is the maximum amount of time given to an exec to end. ExecWaitTimeout = 10 * time.Second // ImageBaseURL is the origin where the images will be pulled. ImageBaseURL = "docker.io" // ImageMonitor is the path to the docker image that contains the network // emulator tool. ImageMonitor = "dedis/simnet-monitor" // ContainerLabelKey is the label key assigned to every application // container. ContainerLabelKey = "go.dedis.ch.simnet.container" // ContainerLabelValue is the value for application containers. ContainerLabelValue = "app" // DefaultContainerNetwork is the default network used by Docker when no // additionnal network is required when creating the container. // This should be different whatsoever the Docker environment settings. DefaultContainerNetwork = "bridge" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Status string `json:"status"` Error string `json:"error"` Progress string `json:"progress"` }
Event is the json encoded events sent when pulling an image.
type Strategy ¶
type Strategy struct {
// contains filtered or unexported fields
}
Strategy implements the strategy interface for running simulations inside a Docker environment.
func NewStrategy ¶
NewStrategy creates a docker strategy for simulations.
func (*Strategy) Execute ¶
Execute takes the round and execute it against the context created from the options.
Click to show internal directories.
Click to hide internal directories.