github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/pkg/domain/entities/generate.go (about) 1 package entities 2 3 import "io" 4 5 // GenerateSystemdOptions control the generation of systemd unit files. 6 type GenerateSystemdOptions struct { 7 // Name - use container/pod name instead of its ID. 8 Name bool 9 // New - create a new container instead of starting a new one. 10 New bool 11 // RestartPolicy - systemd restart policy. 12 RestartPolicy *string 13 // RestartSec - systemd service restartsec. Configures the time to sleep before restarting a service. 14 RestartSec *uint 15 // StartTimeout - time when starting the container. 16 StartTimeout *uint 17 // StopTimeout - time when stopping the container. 18 StopTimeout *uint 19 // ContainerPrefix - systemd unit name prefix for containers 20 ContainerPrefix string 21 // PodPrefix - systemd unit name prefix for pods 22 PodPrefix string 23 // Separator - systemd unit name separator between name/id and prefix 24 Separator string 25 // NoHeader - skip header generation 26 NoHeader bool 27 // TemplateUnitFile - make use of %i and %I to differentiate between the different instances of the unit 28 TemplateUnitFile bool 29 // Wants - systemd wants list for the container or pods 30 Wants []string 31 // After - systemd after list for the container or pods 32 After []string 33 // Requires - systemd requires list for the container or pods 34 Requires []string 35 } 36 37 // GenerateSystemdReport 38 type GenerateSystemdReport struct { 39 // Units of the generate process. key = unit name -> value = unit content 40 Units map[string]string 41 } 42 43 // GenerateKubeOptions control the generation of Kubernetes YAML files. 44 type GenerateKubeOptions struct { 45 // Service - generate YAML for a Kubernetes _service_ object. 46 Service bool 47 } 48 49 // GenerateKubeReport 50 // 51 // FIXME: Podman4.0 should change io.Reader to io.ReaderCloser 52 type GenerateKubeReport struct { 53 // Reader - the io.Reader to reader the generated YAML file. 54 Reader io.Reader 55 }