service_container_api.h 1.6 KB
Newer Older
O
overweight 已提交
1
/******************************************************************************
L
lifeng68 已提交
2
 * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
3 4 5 6
 * iSulad licensed under the Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *     http://license.coscl.org.cn/MulanPSL2
O
overweight 已提交
7 8 9
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
 * PURPOSE.
10
 * See the Mulan PSL v2 for more details.
L
lifeng68 已提交
11 12
 * Author: lifeng
 * Create: 2020-06-22
O
overweight 已提交
13 14
 * Description: provide container supervisor definition
 ******************************************************************************/
L
lifeng68 已提交
15 16
#ifndef __ISULAD_SERVICE_CONTAINER_OPERATOR_H
#define __ISULAD_SERVICE_CONTAINER_OPERATOR_H
17
#include "container_api.h"
O
overweight 已提交
18

19 20 21 22 23 24 25
#ifdef __cplusplus
extern "C" {
#endif

int start_container(container_t *cont, const char *console_fifos[], bool reset_rm);

int stop_container(container_t *cont, int timeout, bool force, bool restart);
O
overweight 已提交
26

L
lifeng68 已提交
27 28
int clean_container_resource(const char *id, const char *runtime, pid_t pid);

29
int cleanup_mounts_by_id(const char *id, const char *engine_root_path);
O
overweight 已提交
30

31
void umount_host_channel(const host_config_host_channel *host_channel);
O
overweight 已提交
32

33
void umount_share_shm(container_t *cont);
O
overweight 已提交
34

L
lifeng68 已提交
35
int kill_container(container_t *cont, uint32_t signal);
36

L
lifeng68 已提交
37 38 39 40
int set_container_to_removal(const container_t *cont);

int delete_container(container_t *cont, bool force);

41 42
#ifdef __cplusplus
}
O
overweight 已提交
43
#endif
Z
zhuchunyi 已提交
44

45
#endif