Skip to content

Commit

Permalink
initial revision/generation of mesos-0.26 protos
Browse files Browse the repository at this point in the history
  • Loading branch information
James DeFelice committed Jan 15, 2016
1 parent 925add3 commit 7870a46
Show file tree
Hide file tree
Showing 30 changed files with 25,920 additions and 10,893 deletions.
1,179 changes: 1,179 additions & 0 deletions mesosproto/allocator.pb.go

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions mesosproto/allocator.proto
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.

Copy link
@awalterschulze

awalterschulze Sep 25, 2016

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

This comment has been minimized.

Copy link
@jdef

jdef via email Sep 26, 2016

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.
}
Loading

0 comments on commit 7870a46

Please sign in to comment.