Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

docs: update the sandbox operation API table #728

Merged
merged 1 commit into from
Sep 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions design/kata-api-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,24 @@ To fulfill the [Kata design requirements](kata-design-requirements.md), and base

|Name|Description|
|---|---|
|`sandbox.Pause()`| Pause the sandbox.|
|`sandbox.Resume()`| Resume the paused sandbox.|
|`sandbox.Release()`| Release a sandbox data structure, close connections to the agent, and quit any goroutines associated with the sandbox. Mostly used for daemon restart.|
|`sandbox.Delete()`| Destroy the sandbox and remove all persistent metadata.|
|`sandbox.Status()`| Get the status of the sandbox and containers.|
|`sandbox.Monitor()`| Return a context handler for caller to monitor sandbox callbacks such as error termination.|
|`sandbox.Release()`| Release a sandbox data structure, close connections to the agent, and quit any goroutines associated with the sandbox. Mostly used for daemon restart.|
|`sandbox.Start()`| Start a a sandbox and the containers making the sandbox.|
|`sandbox.Status()`| Get the status of the sandbox and containers.|
|`sandbox.Stop()`| Stop a sandbox and Destroy the containers in the sandbox..|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: lowercase "destroy" (otherwise suggests it's a method name)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In doing reviews like this, you realize how stupid the Go convention of capitalizing public methods really is. It's really pointlessly painful to find the exports in a file from an editor. Even guru does not help. Any good suggestion there?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added #729 about missing documentation for types.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @c3d, I don't have any means about the problem of Go. Thanks Christophe, the types are important for the api docs. I will fix the #729 issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@c3d - I tend to either use a crazy grep regex, but also have a golang program that uses ast + parse packages to list functions (it "works" but doesn't list the receiver for methods yet 😢)

|`sandbox.CreateContainer()`| Create new container in the sandbox.|
|`sandbox.DeleteContainer()`| Delete a container from the sandbox.|
|`sandbox.EnterContainer()`| Run a new process in a container.|
|`sandbox.KillContainer()`| Signal a container in the sandbox.|
|`sandbox.PauseContainer()`| Pause a running container in the sandbox.|
|`sandbox.ProcessListContainer()`| List every process running inside a specific container in the sandbox.|
|`sandbox.ResumeContainer()`| Resume a paused container in the sandbox.|
|`sandbox.StartContainer()`| Start a container in the sandbox.|
|`sandbox.StatsContainer()`| Return the stats of a running container.|
|`sandbox.StatusContainer()`| Get the status of a container in the sandbox.|
|`sandbox.EnterContainer()`| Run a new process in a container.|
|`sandbox.StopContainer()`| Stop a container in the sandbox.|
|`sandbox.UpdateContainer()`| Update a running container in the sandbox.|
|`sandbox.WaitProcess()`| Wait on a process to terminate.|
### Sandbox Hotplug API
|Name|Description|
Expand Down