Dobby 3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Loading...
Searching...
No Matches
DobbyHibernate.h
1/*
2* If not stated otherwise in this file or this component's LICENSE file the
3* following copyright and licenses apply:
4*
5* Copyright 2016 Sky UK
6*
7* Licensed under the Apache License, Version 2.0 (the "License");
8* you may not use this file except in compliance with the License.
9* You may obtain a copy of the License at
10*
11* http://www.apache.org/licenses/LICENSE-2.0
12*
13* Unless required by applicable law or agreed to in writing, software
14* distributed under the License is distributed on an "AS IS" BASIS,
15* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16* See the License for the specific language governing permissions and
17* limitations under the License.
18*/
19/*
20 * File: DobbyHibernate.h
21 *
22 */
23#pragma once
24
25#include <sys/types.h>
26#include <stdint.h>
27#include <string>
28
30{
31 public:
32
33 enum Error
34 {
35 ErrorNone = 0,
36 ErrorGeneral = 1,
37 ErrorTimeout = 2
38 };
39
40 enum CompressionAlg
41 {
42 AlgNone = 0,
43 AlgLz4 = 1,
44 AlgZstd = 2,
45 AlgDefault = 3
46 };
47
48 static const std::string DFL_LOCATOR;
49 static const uint32_t DFL_TIMEOUTE_MS;
50
51 static Error HibernateProcess(const pid_t pid, const uint32_t timeout = DFL_TIMEOUTE_MS,
52 const std::string &locator = DFL_LOCATOR, const std::string &dumpDirPath = std::string(), CompressionAlg compression = AlgDefault);
53
54 static Error WakeupProcess(const pid_t pid, const uint32_t timeout = DFL_TIMEOUTE_MS, const std::string &locator = DFL_LOCATOR);
55};
Definition DobbyHibernate.h:30