MCPcopy Index your code
hub / github.com/moby/moby / simpleTestService

Function simpleTestService

integration-cli/docker_api_swarm_test.go:597–618  ·  view source on GitHub ↗
(s *swarm.Service)

Source from the content-addressed store, hash-verified

595}
596
597func simpleTestService(s *swarm.Service) {
598 ureplicas := uint64(1)
599 restartDelay := 100 * time.Millisecond
600
601 s.Spec = swarm.ServiceSpec{
602 TaskTemplate: swarm.TaskSpec{
603 ContainerSpec: &swarm.ContainerSpec{
604 Image: "busybox:latest",
605 Command: []string{"/bin/top"},
606 },
607 RestartPolicy: &swarm.RestartPolicy{
608 Delay: &restartDelay,
609 },
610 },
611 Mode: swarm.ServiceMode{
612 Replicated: &swarm.ReplicatedService{
613 Replicas: &ureplicas,
614 },
615 },
616 }
617 s.Spec.Name = "top"
618}
619
620func serviceForUpdate(s *swarm.Service) {
621 ureplicas := uint64(1)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…