Debian Codegraph @

api/v1/lib/allocator/allocator.proto

raw
1 //
2 // Licensed to the Apache Software Foundation (ASF) under one
3 // or more contributor license agreements. See the NOTICE file
4 // distributed with this work for additional information
5 // regarding copyright ownership. The ASF licenses this file
6 // to you under the Apache License, Version 2.0 (the
7 // "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17
18 syntax = "proto2";
19
20 package mesos.allocator;
21
22 import "github.com/mesos/mesos-go/api/v1/lib/mesos.proto";
23 import "github.com/gogo/protobuf/gogoproto/gogo.proto";
24
25 option go_package = "allocator";
26 option (gogoproto.benchgen_all) = true;
27 option (gogoproto.enum_stringer_all) = true;
28 option (gogoproto.equal_all) = true;
29 option (gogoproto.goproto_enum_prefix_all) = false;
30 option (gogoproto.goproto_enum_stringer_all) = false;
31 option (gogoproto.goproto_stringer_all) = false;
32 option (gogoproto.goproto_unrecognized_all) = false;
33 option (gogoproto.gostring_all) = true;
34 option (gogoproto.marshaler_all) = true;
35 option (gogoproto.populate_all) = true;
36 option (gogoproto.protosizer_all) = true;
37 option (gogoproto.stringer_all) = true;
38 option (gogoproto.testgen_all) = true;
39 option (gogoproto.unmarshaler_all) = true;
40 option (gogoproto.verbose_equal_all) = true;
41
42
43 /**
44 * Describes the status of an inverse offer.
45 *
46 * This is a protobuf so as to be able to share the status to inverse offers
47 * through endpoints such as the maintenance status endpoint.
48 */
49 message InverseOfferStatus {
50 enum Status {
51 // We have not received a response yet. This is the default state before
52 // receiving a response.
53 UNKNOWN = 1;
54 // The framework is ok with the inverse offer. This means it will not
55 // violate any SLAs and will attempt to evacuate any tasks running on the
56 // agent. If the tasks are not evacuated by the framework, the operator can
57 // manually shut down the slave knowing that the framework will not have
58 // violated its SLAs.
59 ACCEPT = 2;
60 // The framework wants to block the maintenance operation from happening. An
61 // example would be that it cannot meet its SLA by losing resources.
62 DECLINE = 3;
63
64 option (gogoproto.goproto_enum_prefix) = true;
65 }
66
67 required Status status = 1;
68 required FrameworkID framework_id = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FrameworkID"];
69
70 // Time, since the epoch, when this status was last updated.
71 required TimeInfo timestamp = 3 [(gogoproto.nullable) = false];
72
73 // TODO(jmlvanre): Capture decline message.
74 }