forked from canonical/lxd
/
migrate.pb.go
140 lines (120 loc) · 3.42 KB
/
migrate.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Code generated by protoc-gen-go.
// source: lxd/migration/migrate.proto
// DO NOT EDIT!
package migration
import proto "github.com/golang/protobuf/proto"
import json "encoding/json"
import math "math"
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf
type MigrationFSType int32
const (
MigrationFSType_RSYNC MigrationFSType = 0
MigrationFSType_BTRFS MigrationFSType = 1
)
var MigrationFSType_name = map[int32]string{
0: "RSYNC",
1: "BTRFS",
}
var MigrationFSType_value = map[string]int32{
"RSYNC": 0,
"BTRFS": 1,
}
func (x MigrationFSType) Enum() *MigrationFSType {
p := new(MigrationFSType)
*p = x
return p
}
func (x MigrationFSType) String() string {
return proto.EnumName(MigrationFSType_name, int32(x))
}
func (x MigrationFSType) MarshalJSON() ([]byte, error) {
return json.Marshal(x.String())
}
func (x *MigrationFSType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MigrationFSType_value, data, "MigrationFSType")
if err != nil {
return err
}
*x = MigrationFSType(value)
return nil
}
type CRIUType int32
const (
CRIUType_CRIU_RSYNC CRIUType = 0
CRIUType_PHAUL CRIUType = 1
)
var CRIUType_name = map[int32]string{
0: "CRIU_RSYNC",
1: "PHAUL",
}
var CRIUType_value = map[string]int32{
"CRIU_RSYNC": 0,
"PHAUL": 1,
}
func (x CRIUType) Enum() *CRIUType {
p := new(CRIUType)
*p = x
return p
}
func (x CRIUType) String() string {
return proto.EnumName(CRIUType_name, int32(x))
}
func (x CRIUType) MarshalJSON() ([]byte, error) {
return json.Marshal(x.String())
}
func (x *CRIUType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(CRIUType_value, data, "CRIUType")
if err != nil {
return err
}
*x = CRIUType(value)
return nil
}
type MigrationHeader struct {
Fs *MigrationFSType `protobuf:"varint,1,req,name=fs,enum=migration.MigrationFSType" json:"fs,omitempty"`
Criu *CRIUType `protobuf:"varint,2,opt,name=criu,enum=migration.CRIUType" json:"criu,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MigrationHeader) Reset() { *m = MigrationHeader{} }
func (m *MigrationHeader) String() string { return proto.CompactTextString(m) }
func (*MigrationHeader) ProtoMessage() {}
func (m *MigrationHeader) GetFs() MigrationFSType {
if m != nil && m.Fs != nil {
return *m.Fs
}
return 0
}
func (m *MigrationHeader) GetCriu() CRIUType {
if m != nil && m.Criu != nil {
return *m.Criu
}
return 0
}
type MigrationControl struct {
Success *bool `protobuf:"varint,1,req,name=success" json:"success,omitempty"`
// optional failure message if sending a failure
Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *MigrationControl) Reset() { *m = MigrationControl{} }
func (m *MigrationControl) String() string { return proto.CompactTextString(m) }
func (*MigrationControl) ProtoMessage() {}
func (m *MigrationControl) GetSuccess() bool {
if m != nil && m.Success != nil {
return *m.Success
}
return false
}
func (m *MigrationControl) GetMessage() string {
if m != nil && m.Message != nil {
return *m.Message
}
return ""
}
func init() {
proto.RegisterEnum("migration.MigrationFSType", MigrationFSType_name, MigrationFSType_value)
proto.RegisterEnum("migration.CRIUType", CRIUType_name, CRIUType_value)
}