-
Notifications
You must be signed in to change notification settings - Fork 573
Add definitions proto for vocabulary and other definitions #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2017 Google Inc. | ||
// | ||
// Licensed 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. | ||
|
||
syntax = "proto3"; | ||
|
||
import "mixer/descriptor/attribute_descriptor.proto"; | ||
import "mixer/descriptor/label_descriptor.proto"; | ||
import "mixer/descriptor/metric_descriptor.proto"; | ||
import "mixer/descriptor/quota_descriptor.proto"; | ||
import "mixer/descriptor/log_entry_descriptor.proto"; | ||
import "mixer/descriptor/monitored_resource_descriptor.proto"; | ||
import "mixer/descriptor/principal_descriptor.proto"; | ||
|
||
package istio.mixer.descriptor; | ||
|
||
// Istio Definitions | ||
// An istio definition proto message may contain some or all definition types. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "a definition may contain some or all definitions" isn't clear. Presumably, you mean to say something like The effective set of descriptors understood by Istio is produced through the union of all Definition messages within the configuration state. |
||
// Messages are combined by runtime to form the effective definition. | ||
// In many cases attribute definitions (vocabulary) are available as separate messages. | ||
// Every descriptor proto defined in this package should be represented here. | ||
// Every proto message in definition has a unique name within the message class. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's 'message class'? |
||
// Mixer uses a lookup api to access these definitions. | ||
// Find(definition_name, definition_type) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presumably, this is actually descriptor_name and descriptor_type, right? |
||
message Definitions { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Considering this holds descriptors, why not call this Descriptors? |
||
// subject | ||
string subject = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's this for? The comment is not helpful. |
||
string revision = 2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's this for, how is it used, what does it contain? |
||
// attributes form the attribute vocabulary | ||
// The effective vocabulary is a union of vocabulary presented by the proxy | ||
// and additional attributes generated by the mixer. | ||
repeated istio.mixer.v1.config.descriptor.AttributeDescriptor attributes = 3; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to update the packages here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should move attribute and vocabulary to istio.attribute. Leave the rest under mixer/somewhere. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Definitions message is intended to hold the definitions of the various 'object types' used by the operator. The set of attributes supported by a deployment is not a property of the configuration state, it is a manifest associated with pieces of code (the proxy in particular). As such, I don't think this field should exist here. |
||
// labels are analogous to attributes. They are externalized representation of attributes used by aspects. | ||
repeated istio.mixer.v1.config.descriptor.LabelDescriptor labels = 4; | ||
// metrics defines available metrics types. | ||
repeated istio.mixer.v1.config.descriptor.MetricDescriptor metrics = 5; | ||
// quota defines available quota types. | ||
repeated istio.mixer.v1.config.descriptor.QuotaDescriptor quotas = 6; | ||
// logEntries define available log types. | ||
repeated istio.mixer.v1.config.descriptor.LogEntryDescriptor logEntries = 7; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For proto fields, please use _ to separate words instead of camelCase. |
||
// monitoredResources define monitored resource types. | ||
repeated istio.mixer.v1.config.descriptor.MonitoredResourceDescriptor monitoredResources = 8; | ||
// principals define principal types. | ||
repeated istio.mixer.v1.config.descriptor.PrincipalDescriptor principals = 9; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rephrase this comment to be in flowing prose with the intended audience to be the consumer of the message. That is, this shouldn't have things like "Every descriptor proto defined in this package should be represented here" as that is a comment for implementers of the package, not for its consumers.