Skip to content

Commit

Permalink
Move config/mcp => mcp (istio#569)
Browse files Browse the repository at this point in the history
* Add a Readme.md file for the MCP protocol.

* Move config/mcp to mcp. This does not include fixups.

* Complete the move config/mcp => mcp.

Fixup names, and regenerate code/documents.

* Add missing Python files.
  • Loading branch information
ozevren authored and rshriram committed Jul 4, 2018
1 parent 2d182f5 commit 80b4a7b
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 159 deletions.
22 changes: 11 additions & 11 deletions Makefile
Expand Up @@ -80,8 +80,8 @@ protoc_gen_docs_plugin := --docs_out=warnings=true,mode=html_fragment_with_front
generate: \
generate-broker-go \
generate-broker-python \
generate-config-mcp-go \
generate-config-mcp-python \
generate-mcp-go \
generate-mcp-python \
generate-mesh-go \
generate-mesh-python \
generate-mixer-go \
Expand Down Expand Up @@ -122,28 +122,28 @@ clean-broker:
rm -f $(broker_v1_pb_doc)

#####################
# config/mcp/...
# mcp/...
#####################

config_mcp_path := config/mcp/v1alpha1
config_mcp_path := mcp/v1alpha1
config_mcp_protos := $(shell find $(config_mcp_path) -type f -name '*.proto' | sort)
config_mcp_pb_gos := $(config_mcp_protos:.proto=.pb.go)
config_mcp_pb_pythons := $(config_mcp_protos:.proto=_pb2.py)
config_mcp_pb_doc := $(config_mcp_path)/istio.config.mcp.v1alpha1.pb.html
config_mcp_pb_doc := $(config_mcp_path)/istio.mcp.v1alpha1.pb.html

generate-config-mcp-go: $(config_mcp_pb_gos) $(config_mcp_pb_doc)
generate-mcp-go: $(config_mcp_pb_gos) $(config_mcp_pb_doc)

$(config_mcp_pb_gos) $(config_mcp_pb_doc): $(config_mcp_protos)
## Generate config/mcp/v1alpha1/*.pb.go + $(config_mcp_pb_doc)
## Generate mcp/v1alpha1/*.pb.go + $(config_mcp_pb_doc)
@$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(config_mcp_path) $^

generate-config-mcp-python: $(config_mcp_pb_pythons)
generate-mcp-python: $(config_mcp_pb_pythons)

$(config_mcp_pb_pythons): $(config_mcp_protos)
## Generate python/istio_api/config/mcp/v1alpha1/*_pb2.py
## Generate python/istio_api/mcp/v1alpha1/*_pb2.py
@$(docker_gen) $(protoc_gen_python_plugin) $^

clean-config-mcp:
clean-mcp:
rm -f $(config_mcp_pb_gos)
rm -f $(config_mcp_pb_doc)

Expand Down Expand Up @@ -387,7 +387,7 @@ clean-python:
rm -rf python/istio_api/*

clean: clean-broker \
clean-config-mcp \
clean-mcp \
clean-mesh \
clean-mixer \
clean-routing \
Expand Down
12 changes: 12 additions & 0 deletions mcp/Readme.md
@@ -0,0 +1,12 @@
# Mesh Configuration Protocol Protos

This folder contains the proto buffers used by the Mesh Configuration Protocol,
an ADS-inspired protocol for transferring configuration among Istio components
during runtime.

The protocol buffers in this folder are not used for configuring Istio.
Instead, they define an internal protocol through which the configuration proto
instances can be delivered to components, such as Mixer and Pilot.

The server side of the protocol is implemented in Galley, Istio's config
aggregation and distribution component.
42 changes: 21 additions & 21 deletions config/mcp/v1alpha1/envelope.pb.go → mcp/v1alpha1/envelope.pb.go

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

Expand Up @@ -15,21 +15,21 @@
syntax = "proto3";

// This package defines the common, core types used by the Mesh Configuration Protocol.
package istio.config.mcp.v1alpha1;
package istio.mcp.v1alpha1;

import "google/protobuf/any.proto";
import "gogoproto/gogo.proto";
import "config/mcp/v1alpha1/metadata.proto";
import "mcp/v1alpha1/metadata.proto";

option go_package="istio.io/api/config/mcp/v1alpha1";
option go_package="istio.io/api/mcp/v1alpha1";
option (gogoproto.equal_all) = true;

// Envelope for a configuration resource as transferred via the Mesh Configuration Protocol.
// Each envelope is made up of common metadata, and a type-specific resource payload.
message Envelope {

// Common metadata describing the resource.
istio.config.mcp.v1alpha1.Metadata metadata = 1;
istio.mcp.v1alpha1.Metadata metadata = 1;

// The resource itself.
google.protobuf.Any resource = 2;
Expand Down
@@ -1,5 +1,5 @@
---
title: istio.config.mcp.v1alpha1
title: istio.mcp.v1alpha1
layout: protoc-gen-docs
generator: protoc-gen-docs
number_of_entries: 7
Expand Down
77 changes: 38 additions & 39 deletions config/mcp/v1alpha1/mcp.pb.go → mcp/v1alpha1/mcp.pb.go

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

6 changes: 3 additions & 3 deletions config/mcp/v1alpha1/mcp.proto → mcp/v1alpha1/mcp.proto
Expand Up @@ -14,14 +14,14 @@

syntax = "proto3";

package istio.config.mcp.v1alpha1;
package istio.mcp.v1alpha1;

import "google/protobuf/struct.proto";
import "google/rpc/status.proto";
import "gogoproto/gogo.proto";
import "config/mcp/v1alpha1/envelope.proto";
import "mcp/v1alpha1/envelope.proto";

option go_package="istio.io/api/config/mcp/v1alpha1";
option go_package="istio.io/api/mcp/v1alpha1";
option (gogoproto.equal_all) = true;

// Identifies a specific MCP client instance. The client identifier is
Expand Down
27 changes: 13 additions & 14 deletions config/mcp/v1alpha1/metadata.pb.go → mcp/v1alpha1/metadata.pb.go

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

Expand Up @@ -14,11 +14,11 @@

syntax = "proto3";

package istio.config.mcp.v1alpha1;
package istio.mcp.v1alpha1;

import "gogoproto/gogo.proto";

option go_package="istio.io/api/config/mcp/v1alpha1";
option go_package="istio.io/api/mcp/v1alpha1";
option (gogoproto.equal_all) = true;

// Metadata information that all resources within the Mesh Configuration Protocol must have.
Expand Down

0 comments on commit 80b4a7b

Please sign in to comment.