-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial revision/generation of mesos-0.26 protos
- Loading branch information
James DeFelice
committed
Jan 15, 2016
1 parent
925add3
commit 7870a46
Showing
30 changed files
with
25,920 additions
and
10,893 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package mesosproto; | ||
|
||
import "mesos.proto"; | ||
import "github.com/gogo/protobuf/gogoproto/gogo.proto"; | ||
|
||
option (gogoproto.gostring_all) = true; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jdef
via email
Contributor
|
||
option (gogoproto.equal_all) = true; | ||
option (gogoproto.verbose_equal_all) = true; | ||
option (gogoproto.goproto_stringer_all) = false; | ||
option (gogoproto.stringer_all) = true; | ||
option (gogoproto.populate_all) = true; | ||
option (gogoproto.testgen_all) = true; | ||
option (gogoproto.benchgen_all) = true; | ||
option (gogoproto.marshaler_all) = true; | ||
option (gogoproto.sizer_all) = true; | ||
option (gogoproto.unmarshaler_all) = true; | ||
|
||
/** | ||
* Describes a role, which is used to group frameworks for allocation | ||
* decisions, depending on the allocation policy being used. | ||
* The weight field can be used to indicate forms of priority. | ||
*/ | ||
message RoleInfo { | ||
required string name = 1; | ||
optional double weight = 2 [default = 1]; | ||
} | ||
|
||
|
||
/** | ||
* Describes the status of an inverse offer. | ||
* | ||
* This is a protobuf so as to be able to share the status to inverse offers | ||
* through endpoints such as the maintenance status endpoint. | ||
*/ | ||
// TODO(jmlvanre): Copy this when V1 Allocator API is introduced. | ||
message InverseOfferStatus { | ||
enum Status { | ||
// We have not received a response yet. This is the default state before | ||
// receiving a response. | ||
UNKNOWN = 1; | ||
// The framework is ok with the inverse offer. This means it will not | ||
// violate any SLAs and will attempt to evacuate any tasks running on the | ||
// agent. If the tasks are not evacuated by the framework, the operator can | ||
// manually shut down the slave knowing that the framework will not have | ||
// violated its SLAs. | ||
ACCEPT = 2; | ||
// The framework wants to block the maintenance operation from happening. An | ||
// example would be that it can not meet its SLA by losing resources. | ||
DECLINE = 3; | ||
} | ||
|
||
required Status status = 1; | ||
required FrameworkID framework_id = 2; | ||
|
||
// Time, since the epoch, when this status was last updated. | ||
required TimeInfo timestamp = 3; | ||
|
||
// TODO(jmlvanre): Capture decline message. | ||
} |
Oops, something went wrong.
You could possibly use something as simple as protoc --gogoslick_out=. and remove the complex proto_path, the import of gogo.proto and the options enabled here.
https://github.com/gogo/protobuf#more-speed-and-more-generated-code