2019-07-03 07:50:59 +00:00
|
|
|
import * as types from '../api/types'
|
2020-01-03 06:30:39 +00:00
|
|
|
import { DockerApiClient } from './api';
|
2019-07-03 07:50:59 +00:00
|
|
|
|
2020-01-03 06:30:39 +00:00
|
|
|
export class System {
|
|
|
|
constructor(public api: DockerApiClient) {
|
|
|
|
}
|
|
|
|
info() {
|
|
|
|
return this.api.get<types.system.Info>('/info');
|
2019-07-03 07:50:59 +00:00
|
|
|
}
|
|
|
|
|
2020-01-03 06:30:39 +00:00
|
|
|
version() {
|
|
|
|
return this.api.get<types.system.Version>('/version');
|
2019-07-03 07:50:59 +00:00
|
|
|
}
|
|
|
|
|
2020-01-03 06:30:39 +00:00
|
|
|
events() {
|
|
|
|
return this.api.stream('/events');
|
2019-07-03 07:50:59 +00:00
|
|
|
}
|
|
|
|
}
|