implement RunService in global mode and RemoveService

This commit is contained in:
Pavel Sviderski
2024-12-04 18:26:59 +10:00
parent 7d47d274a0
commit 2727c3c97e
3 changed files with 323 additions and 72 deletions
+25
View File
@@ -0,0 +1,25 @@
package api
const (
ServiceModeReplicated = "replicated"
ServiceModeGlobal = "global"
)
type ServiceSpec struct {
Container ContainerSpec
// Mode is the replication mode of the service. Default is ServiceModeReplicated if empty.
Mode string
Name string
}
type ContainerSpec struct {
Command []string
Image string
// Run a custom init inside the container. If nil, use the daemon's configured settings.
Init *bool
}
type MachineContainerID struct {
MachineID string
ContainerID string
}