Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions mixer/v1/attributes.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

969 changes: 718 additions & 251 deletions mixer/v1/check.pb.go → mixer/v1/mixer.pb.go

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions mixer/v1/check.proto → mixer/v1/mixer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@

syntax = "proto3";

// This package defines the Mixer API that the sidecar proxy uses to perform
// precondition checks, manage quotas, and report telemetry.
package istio.mixer.v1;

option go_package = "istio.io/api/mixer/v1";
option cc_generic_services = true;

import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
Expand All @@ -28,6 +31,33 @@ option (gogoproto.equal_all) = false;
option (gogoproto.gostring_all) = false;
option cc_enable_arenas = true;

// Mixer provides three core features:
//
// - *Precondition Checking*. Enables callers to verify a number of preconditions
// before responding to an incoming request from a service consumer.
// Preconditions can include whether the service consumer is properly
// authenticated, is on the service’s whitelist, passes ACL checks, and more.
//
// - *Quota Management*. Enables services to allocate and free quota on a number
// of dimensions, Quotas are used as a relatively simple resource management tool
// to provide some fairness between service consumers when contending for limited
// resources. Rate limits are examples of quotas.
//
// - *Telemetry Reporting*. Enables services to report logging and monitoring.
// In the future, it will also enable tracing and billing streams intended for
// both the service operator as well as for service consumers.
service Mixer {
// Checks preconditions and allocate quota before performing an operation.
// The preconditions enforced depend on the set of supplied attributes and
// the active configuration.
rpc Check(CheckRequest) returns (CheckResponse) {}

// Reports telemetry, such as logs and metrics.
// The reported information depends on the set of supplied attributes and the
// active configuration.
rpc Report(ReportRequest) returns (ReportResponse) {}
}

// Used to get a thumbs-up/thumbs-down before performing an action.
message CheckRequest {
// parameters for a quota allocation
Expand Down Expand Up @@ -188,3 +218,40 @@ message RouteDirective {
// If this setting is omitted, no body is included in the generated response.
string direct_response_body = 4;
}

// Used to report telemetry after performing one or more actions.
message ReportRequest {
// The attributes to use for this request.
//
// Each `Attributes` element represents the state of a single action. Multiple actions
// can be provided in a single message in order to improve communication efficiency. The
// client can accumulate a set of actions and send them all in one single message.
//
// Although each `Attributes` message is semantically treated as an independent
// stand-alone entity unrelated to the other attributes within the message, this
// message format leverages delta-encoding between attribute messages in order to
// substantially reduce the request size and improve end-to-end efficiency. Each
// individual set of attributes is used to modify the previous set. This eliminates
// the need to redundantly send the same attributes multiple times over within
// a single request.
//
// If a client is not sophisticated and doesn't want to use delta-encoding,
// a degenerate case is to include all attributes in every individual message.
repeated CompressedAttributes attributes = 1 [(gogoproto.nullable) = false];

// The default message-level dictionary for all the attributes.
// Individual attribute messages can have their own dictionaries, but if they don't
// then this set of words, if it is provided, is used instead.
//
// This makes it possible to share the same dictionary for all attributes in this
// request, which can substantially reduce the overall request size.
repeated string default_words = 2;

// The number of words in the global dictionary.
// To detect global dictionary out of sync between client and server.
uint32 global_word_count = 3;
}

// Used to carry responses to telemetry reports
message ReportResponse {
}
Loading