summaryrefslogtreecommitdiff
path: root/pkg/domain/entities
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-09 14:55:45 +0200
committerGitHub <noreply@github.com>2020-04-09 14:55:45 +0200
commit555b30e9ebdf82dfc2e0c7ddd9f0f8b51ccb4a39 (patch)
treee56d6b21c07df5e3a442ed423a6d6cba8d22247f /pkg/domain/entities
parent655139fdda20819160b2baad840429a80d6285e5 (diff)
parente0847f5457edfdeb17dad259f1cd06b1d4cec93e (diff)
downloadpodman-555b30e9ebdf82dfc2e0c7ddd9f0f8b51ccb4a39.tar.gz
podman-555b30e9ebdf82dfc2e0c7ddd9f0f8b51ccb4a39.tar.bz2
podman-555b30e9ebdf82dfc2e0c7ddd9f0f8b51ccb4a39.zip
Merge pull request #5634 from jwhonce/wip/service
V2 podman system service
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r--pkg/domain/entities/engine_container.go7
-rw-r--r--pkg/domain/entities/system.go14
2 files changed, 18 insertions, 3 deletions
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go
index fec288eb8..0ef6018e8 100644
--- a/pkg/domain/entities/engine_container.go
+++ b/pkg/domain/entities/engine_container.go
@@ -24,13 +24,14 @@ type ContainerEngine interface {
ContainerRestart(ctx context.Context, namesOrIds []string, options RestartOptions) ([]*RestartReport, error)
ContainerRestore(ctx context.Context, namesOrIds []string, options RestoreOptions) ([]*RestoreReport, error)
ContainerRm(ctx context.Context, namesOrIds []string, options RmOptions) ([]*RmReport, error)
- ContainerStart(ctx context.Context, namesOrIds []string, options ContainerStartOptions) ([]*ContainerStartReport, error)
ContainerRun(ctx context.Context, opts ContainerRunOptions) (*ContainerRunReport, error)
+ ContainerStart(ctx context.Context, namesOrIds []string, options ContainerStartOptions) ([]*ContainerStartReport, error)
ContainerStop(ctx context.Context, namesOrIds []string, options StopOptions) ([]*StopReport, error)
ContainerTop(ctx context.Context, options TopOptions) (*StringSliceReport, error)
ContainerUnpause(ctx context.Context, namesOrIds []string, options PauseUnPauseOptions) ([]*PauseUnpauseReport, error)
ContainerWait(ctx context.Context, namesOrIds []string, options WaitOptions) ([]WaitReport, error)
HealthCheckRun(ctx context.Context, nameOrId string, options HealthCheckOptions) (*define.HealthCheckResults, error)
+ Info(ctx context.Context) (*define.Info, error)
PodCreate(ctx context.Context, opts PodCreateOptions) (*PodCreateReport, error)
PodExists(ctx context.Context, nameOrId string) (*BoolReport, error)
PodInspect(ctx context.Context, options PodInspectOptions) (*PodInspectReport, error)
@@ -43,11 +44,11 @@ type ContainerEngine interface {
PodStop(ctx context.Context, namesOrIds []string, options PodStopOptions) ([]*PodStopReport, error)
PodTop(ctx context.Context, options PodTopOptions) (*StringSliceReport, error)
PodUnpause(ctx context.Context, namesOrIds []string, options PodunpauseOptions) ([]*PodUnpauseReport, error)
+ RestService(ctx context.Context, opts ServiceOptions) error
+ VarlinkService(ctx context.Context, opts ServiceOptions) error
VolumeCreate(ctx context.Context, opts VolumeCreateOptions) (*IdOrNameResponse, error)
VolumeInspect(ctx context.Context, namesOrIds []string, opts VolumeInspectOptions) ([]*VolumeInspectReport, error)
VolumeList(ctx context.Context, opts VolumeListOptions) ([]*VolumeListReport, error)
VolumePrune(ctx context.Context, opts VolumePruneOptions) ([]*VolumePruneReport, error)
VolumeRm(ctx context.Context, namesOrIds []string, opts VolumeRmOptions) ([]*VolumeRmReport, error)
-
- Info(ctx context.Context) (*define.Info, error)
}
diff --git a/pkg/domain/entities/system.go b/pkg/domain/entities/system.go
new file mode 100644
index 000000000..3ddc04293
--- /dev/null
+++ b/pkg/domain/entities/system.go
@@ -0,0 +1,14 @@
+package entities
+
+import (
+ "time"
+
+ "github.com/spf13/cobra"
+)
+
+// ServiceOptions provides the input for starting an API Service
+type ServiceOptions struct {
+ URI string // Path to unix domain socket service should listen on
+ Timeout time.Duration // duration of inactivity the service should wait before shutting down
+ Command *cobra.Command // CLI command provided. Used in V1 code
+}