feat: add container kill endpoint
parent
af2512034c
commit
46fcbd8be0
|
@ -20,7 +20,7 @@ reference](https://docs.docker.com/engine/api/v1.41/).
|
||||||
- [ ] Start a container
|
- [ ] Start a container
|
||||||
- [ ] Stop a container
|
- [ ] Stop a container
|
||||||
- [ ] Restart a container
|
- [ ] Restart a container
|
||||||
- [ ] Kill a container
|
- [x] Kill a container
|
||||||
- [ ] Update a container
|
- [ ] Update a container
|
||||||
- [ ] Rename a container
|
- [ ] Rename a container
|
||||||
- [ ] Pause a container
|
- [ ] Pause a container
|
||||||
|
|
|
@ -89,6 +89,12 @@ pub fn (mut d DockerConn) container_remove(id string) ! {
|
||||||
d.read_response()!
|
d.read_response()!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn (mut d DockerConn) container_kill(id string) ! {
|
||||||
|
d.request(.post, '/containers/${id}/kill')
|
||||||
|
d.send()!
|
||||||
|
d.read_response()!
|
||||||
|
}
|
||||||
|
|
||||||
pub fn (mut d DockerConn) container_get_logs(id string) !&StreamFormatReader {
|
pub fn (mut d DockerConn) container_get_logs(id string) !&StreamFormatReader {
|
||||||
d.request(.get, '/containers/${id}/logs')
|
d.request(.get, '/containers/${id}/logs')
|
||||||
d.params({
|
d.params({
|
||||||
|
|
Loading…
Reference in New Issue