{"action":"created","comment":{"url":"https://api.github.com/repos/istio/api/pulls/comments/174338350","pull_request_review_id":103674794,"id":174338350,"diff_hunk":"@@ -0,0 +1,110 @@\n+// Copyright 2018 Istio Authors\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+syntax = \"proto3\";\n+\n+// $title: Mixer Adapter Model\n+// $overview: Definitions used to create adapters and templates\n+// $location: https://istio.io/docs/reference/config/mixer/istio.mixer.adapter.model.v1beta1.html\n+\n+// This package defines the service and types used by adapter code to serve requests from Mixer.\n+// This package also defines the types that are used to create Mixer templates.\n+package istio.mixer.adapter.model.v1beta1;\n+\n+option go_package=\"istio.io/api/mixer/adapter/model/v1beta1\";\n+option cc_generic_services = true;\n+\n+import \"google/protobuf/any.proto\";\n+import \"google/rpc/status.proto\";\n+\n+// `AdapterService` is implemented by backends that wants to provide telemetry and policy functionality to Mixer as an\n+// out of process adapter.\n+//\n+// `AdapterService` allows Mixer and the backends to have a session based model. In a session based model, Mixer passes\n+// the relevant configuration state to the backend only once and estabilshes a session using a session identifier.\n+// All future communications between Mixer and the backend uses the session identifier which refers to the previously\n+// passed in configuration data.\n+//\n+// For a given `AdapterService`, Mixer calls the `Validate` function, followed by `CreateSession`. The `session_id`\n+// returned from `CreateSession` is used to make subsequent request-time Handle calls and the eventual `CloseSession` function.\n+// Mixer assumes that, given the `session_id`, the backend can retrive the necessary context to serve the\n+// Handle calls that contains the request-time payload (template-specific instance protobuf).\n+service AdapterService {\n+    // Validates the handler configuration along with the template-specific instances that would be routed to that\n+    // handler. The `CreateSession` for a specific handler configuration is invoked only if its associated `Validate`\n+    // call has returned success.\n+    rpc  Validate(ValidateRequest) returns (ValidateResponse);\n+\n+    // Creates a session for a given handler configuration and the template-specific instances that would be routed to\n+    // that handler. For every handler configuration, Mixer creates a separate session by invoking `CreateSession`\n+    // on the backend.\n+    //\n+    // `CreateSessionRequest` contains the adapter specific handler configuration and the inferred type information about\n+    // the instances the handler would receive during request processing.\n+    //\n+    // `CreateSession` must return a `session_id` which Mixer uses to invoke template-specific Handle functions during\n+    // request processing. If the backend couldn't create a session for a specific handler configuration and\n+    // returns non S_OK status, Mixer will not make request-time Handle calls associated with that handler configuration.\n+    // The `session_id` provides the Handle functions a way to retrive the necessary configuration associated with the session.\n+    // Upon Mixer configuration change, Mixer will re-invoke `CreateSession` for all handler configurations whose existing\n+    // sessions are invalidated or didn't existed.\n+    rpc  CreateSession(CreateSessionRequest) returns (CreateSessionResponse);","path":"mixer/adapter/model/v1beta1/service.proto","position":62,"original_position":62,"commit_id":"420b77a307c81c04fdd0631c5c94191c99994b10","original_commit_id":"420b77a307c81c04fdd0631c5c94191c99994b10","user":{"login":"geeknoid","id":22780957,"avatar_url":"https://avatars3.githubusercontent.com/u/22780957?v=4","gravatar_id":"","url":"https://api.github.com/users/geeknoid","html_url":"https://github.com/geeknoid","followers_url":"https://api.github.com/users/geeknoid/followers","following_url":"https://api.github.com/users/geeknoid/following{/other_user}","gists_url":"https://api.github.com/users/geeknoid/gists{/gist_id}","starred_url":"https://api.github.com/users/geeknoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geeknoid/subscriptions","organizations_url":"https://api.github.com/users/geeknoid/orgs","repos_url":"https://api.github.com/users/geeknoid/repos","events_url":"https://api.github.com/users/geeknoid/events{/privacy}","received_events_url":"https://api.github.com/users/geeknoid/received_events","type":"User","site_admin":false},"body":"Note that given CloseSession, reusing session_id assumes the backend is doing refcounting.","created_at":"2018-03-14T02:28:11Z","updated_at":"2018-03-14T02:29:03Z","html_url":"https://github.com/istio/api/pull/406#discussion_r174338350","pull_request_url":"https://api.github.com/repos/istio/api/pulls/406","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/istio/api/pulls/comments/174338350"},"html":{"href":"https://github.com/istio/api/pull/406#discussion_r174338350"},"pull_request":{"href":"https://api.github.com/repos/istio/api/pulls/406"}},"in_reply_to_id":174338215},"pull_request":{"url":"https://api.github.com/repos/istio/api/pulls/406","id":174775821,"html_url":"https://github.com/istio/api/pull/406","diff_url":"https://github.com/istio/api/pull/406.diff","patch_url":"https://github.com/istio/api/pull/406.patch","issue_url":"https://api.github.com/repos/istio/api/issues/406","number":406,"state":"open","locked":false,"title":"Service definition for OOP adapter that will be on session plan.","user":{"login":"guptasu","id":11448595,"avatar_url":"https://avatars3.githubusercontent.com/u/11448595?v=4","gravatar_id":"","url":"https://api.github.com/users/guptasu","html_url":"https://github.com/guptasu","followers_url":"https://api.github.com/users/guptasu/followers","following_url":"https://api.github.com/users/guptasu/following{/other_user}","gists_url":"https://api.github.com/users/guptasu/gists{/gist_id}","starred_url":"https://api.github.com/users/guptasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guptasu/subscriptions","organizations_url":"https://api.github.com/users/guptasu/orgs","repos_url":"https://api.github.com/users/guptasu/repos","events_url":"https://api.github.com/users/guptasu/events{/privacy}","received_events_url":"https://api.github.com/users/guptasu/received_events","type":"User","site_admin":false},"body":"As per the API design https://docs.google.com/document/d/1Fic1Mgp0W5Sxhd0BxAFOc82DbSYWTsYpi5P-pv8ZjSQ/edit","created_at":"2018-03-13T20:09:41Z","updated_at":"2018-03-14T02:29:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7be23a0b27858b9391504a8090abecf28c046bbe","assignee":null,"assignees":[],"requested_reviewers":[{"login":"theganyo","id":772731,"avatar_url":"https://avatars2.githubusercontent.com/u/772731?v=4","gravatar_id":"","url":"https://api.github.com/users/theganyo","html_url":"https://github.com/theganyo","followers_url":"https://api.github.com/users/theganyo/followers","following_url":"https://api.github.com/users/theganyo/following{/other_user}","gists_url":"https://api.github.com/users/theganyo/gists{/gist_id}","starred_url":"https://api.github.com/users/theganyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theganyo/subscriptions","organizations_url":"https://api.github.com/users/theganyo/orgs","repos_url":"https://api.github.com/users/theganyo/repos","events_url":"https://api.github.com/users/theganyo/events{/privacy}","received_events_url":"https://api.github.com/users/theganyo/received_events","type":"User","site_admin":false},{"login":"mandarjog","id":800375,"avatar_url":"https://avatars2.githubusercontent.com/u/800375?v=4","gravatar_id":"","url":"https://api.github.com/users/mandarjog","html_url":"https://github.com/mandarjog","followers_url":"https://api.github.com/users/mandarjog/followers","following_url":"https://api.github.com/users/mandarjog/following{/other_user}","gists_url":"https://api.github.com/users/mandarjog/gists{/gist_id}","starred_url":"https://api.github.com/users/mandarjog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandarjog/subscriptions","organizations_url":"https://api.github.com/users/mandarjog/orgs","repos_url":"https://api.github.com/users/mandarjog/repos","events_url":"https://api.github.com/users/mandarjog/events{/privacy}","received_events_url":"https://api.github.com/users/mandarjog/received_events","type":"User","site_admin":false},{"login":"wora","id":6994853,"avatar_url":"https://avatars3.githubusercontent.com/u/6994853?v=4","gravatar_id":"","url":"https://api.github.com/users/wora","html_url":"https://github.com/wora","followers_url":"https://api.github.com/users/wora/followers","following_url":"https://api.github.com/users/wora/following{/other_user}","gists_url":"https://api.github.com/users/wora/gists{/gist_id}","starred_url":"https://api.github.com/users/wora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wora/subscriptions","organizations_url":"https://api.github.com/users/wora/orgs","repos_url":"https://api.github.com/users/wora/repos","events_url":"https://api.github.com/users/wora/events{/privacy}","received_events_url":"https://api.github.com/users/wora/received_events","type":"User","site_admin":false},{"login":"douglas-reid","id":21148125,"avatar_url":"https://avatars3.githubusercontent.com/u/21148125?v=4","gravatar_id":"","url":"https://api.github.com/users/douglas-reid","html_url":"https://github.com/douglas-reid","followers_url":"https://api.github.com/users/douglas-reid/followers","following_url":"https://api.github.com/users/douglas-reid/following{/other_user}","gists_url":"https://api.github.com/users/douglas-reid/gists{/gist_id}","starred_url":"https://api.github.com/users/douglas-reid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglas-reid/subscriptions","organizations_url":"https://api.github.com/users/douglas-reid/orgs","repos_url":"https://api.github.com/users/douglas-reid/repos","events_url":"https://api.github.com/users/douglas-reid/events{/privacy}","received_events_url":"https://api.github.com/users/douglas-reid/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":717060039,"url":"https://api.github.com/repos/istio/api/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/istio/api/pulls/406/commits","review_comments_url":"https://api.github.com/repos/istio/api/pulls/406/comments","review_comment_url":"https://api.github.com/repos/istio/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/istio/api/issues/406/comments","statuses_url":"https://api.github.com/repos/istio/api/statuses/420b77a307c81c04fdd0631c5c94191c99994b10","head":{"label":"guptasu:oopadapterservice","ref":"oopadapterservice","sha":"420b77a307c81c04fdd0631c5c94191c99994b10","user":{"login":"guptasu","id":11448595,"avatar_url":"https://avatars3.githubusercontent.com/u/11448595?v=4","gravatar_id":"","url":"https://api.github.com/users/guptasu","html_url":"https://github.com/guptasu","followers_url":"https://api.github.com/users/guptasu/followers","following_url":"https://api.github.com/users/guptasu/following{/other_user}","gists_url":"https://api.github.com/users/guptasu/gists{/gist_id}","starred_url":"https://api.github.com/users/guptasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guptasu/subscriptions","organizations_url":"https://api.github.com/users/guptasu/orgs","repos_url":"https://api.github.com/users/guptasu/repos","events_url":"https://api.github.com/users/guptasu/events{/privacy}","received_events_url":"https://api.github.com/users/guptasu/received_events","type":"User","site_admin":false},"repo":{"id":91873115,"name":"api","full_name":"guptasu/api","owner":{"login":"guptasu","id":11448595,"avatar_url":"https://avatars3.githubusercontent.com/u/11448595?v=4","gravatar_id":"","url":"https://api.github.com/users/guptasu","html_url":"https://github.com/guptasu","followers_url":"https://api.github.com/users/guptasu/followers","following_url":"https://api.github.com/users/guptasu/following{/other_user}","gists_url":"https://api.github.com/users/guptasu/gists{/gist_id}","starred_url":"https://api.github.com/users/guptasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guptasu/subscriptions","organizations_url":"https://api.github.com/users/guptasu/orgs","repos_url":"https://api.github.com/users/guptasu/repos","events_url":"https://api.github.com/users/guptasu/events{/privacy}","received_events_url":"https://api.github.com/users/guptasu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guptasu/api","description":"API, config definitions and standard vocabulary definitions for the Istio project","fork":true,"url":"https://api.github.com/repos/guptasu/api","forks_url":"https://api.github.com/repos/guptasu/api/forks","keys_url":"https://api.github.com/repos/guptasu/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guptasu/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guptasu/api/teams","hooks_url":"https://api.github.com/repos/guptasu/api/hooks","issue_events_url":"https://api.github.com/repos/guptasu/api/issues/events{/number}","events_url":"https://api.github.com/repos/guptasu/api/events","assignees_url":"https://api.github.com/repos/guptasu/api/assignees{/user}","branches_url":"https://api.github.com/repos/guptasu/api/branches{/branch}","tags_url":"https://api.github.com/repos/guptasu/api/tags","blobs_url":"https://api.github.com/repos/guptasu/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guptasu/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guptasu/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/guptasu/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guptasu/api/statuses/{sha}","languages_url":"https://api.github.com/repos/guptasu/api/languages","stargazers_url":"https://api.github.com/repos/guptasu/api/stargazers","contributors_url":"https://api.github.com/repos/guptasu/api/contributors","subscribers_url":"https://api.github.com/repos/guptasu/api/subscribers","subscription_url":"https://api.github.com/repos/guptasu/api/subscription","commits_url":"https://api.github.com/repos/guptasu/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/guptasu/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/guptasu/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/guptasu/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/guptasu/api/contents/{+path}","compare_url":"https://api.github.com/repos/guptasu/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guptasu/api/merges","archive_url":"https://api.github.com/repos/guptasu/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guptasu/api/downloads","issues_url":"https://api.github.com/repos/guptasu/api/issues{/number}","pulls_url":"https://api.github.com/repos/guptasu/api/pulls{/number}","milestones_url":"https://api.github.com/repos/guptasu/api/milestones{/number}","notifications_url":"https://api.github.com/repos/guptasu/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guptasu/api/labels{/name}","releases_url":"https://api.github.com/repos/guptasu/api/releases{/id}","deployments_url":"https://api.github.com/repos/guptasu/api/deployments","created_at":"2017-05-20T07:34:55Z","updated_at":"2017-05-20T07:34:57Z","pushed_at":"2018-03-13T20:08:14Z","git_url":"git://github.com/guptasu/api.git","ssh_url":"git@github.com:guptasu/api.git","clone_url":"https://github.com/guptasu/api.git","svn_url":"https://github.com/guptasu/api","homepage":"","size":1457,"stargazers_count":0,"watchers_count":0,"language":"Protocol Buffer","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"istio:master","ref":"master","sha":"dcf2cc8c0e9eeb89be0356f6ed3ff1c3d649a6b8","user":{"login":"istio","id":23534644,"avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"repo":{"id":76586412,"name":"api","full_name":"istio/api","owner":{"login":"istio","id":23534644,"avatar_url":"https://avatars1.githubusercontent.com/u/23534644?v=4","gravatar_id":"","url":"https://api.github.com/users/istio","html_url":"https://github.com/istio","followers_url":"https://api.github.com/users/istio/followers","following_url":"https://api.github.com/users/istio/following{/other_user}","gists_url":"https://api.github.com/users/istio/gists{/gist_id}","starred_url":"https://api.github.com/users/istio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istio/subscriptions","organizations_url":"https://api.github.com/users/istio/orgs","repos_url":"https://api.github.com/users/istio/repos","events_url":"https://api.github.com/users/istio/events{/privacy}","received_events_url":"https://api.github.com/users/istio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/istio/api","description":"API, config and standard vocabulary definitions for the Istio project","fork":false,"url":"https://api.github.com/repos/istio/api","forks_url":"https://api.github.com/repos/istio/api/forks","keys_url":"https://api.github.com/repos/istio/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/istio/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/istio/api/teams","hooks_url":"https://api.github.com/repos/istio/api/hooks","issue_events_url":"https://api.github.com/repos/istio/api/issues/events{/number}","events_url":"https://api.github.com/repos/istio/api/events","assignees_url":"https://api.github.com/repos/istio/api/assignees{/user}","branches_url":"https://api.github.com/repos/istio/api/branches{/branch}","tags_url":"https://api.github.com/repos/istio/api/tags","blobs_url":"https://api.github.com/repos/istio/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/istio/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/istio/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/istio/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/istio/api/statuses/{sha}","languages_url":"https://api.github.com/repos/istio/api/languages","stargazers_url":"https://api.github.com/repos/istio/api/stargazers","contributors_url":"https://api.github.com/repos/istio/api/contributors","subscribers_url":"https://api.github.com/repos/istio/api/subscribers","subscription_url":"https://api.github.com/repos/istio/api/subscription","commits_url":"https://api.github.com/repos/istio/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/istio/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/istio/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/istio/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/istio/api/contents/{+path}","compare_url":"https://api.github.com/repos/istio/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/istio/api/merges","archive_url":"https://api.github.com/repos/istio/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/istio/api/downloads","issues_url":"https://api.github.com/repos/istio/api/issues{/number}","pulls_url":"https://api.github.com/repos/istio/api/pulls{/number}","milestones_url":"https://api.github.com/repos/istio/api/milestones{/number}","notifications_url":"https://api.github.com/repos/istio/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/istio/api/labels{/name}","releases_url":"https://api.github.com/repos/istio/api/releases{/id}","deployments_url":"https://api.github.com/repos/istio/api/deployments","created_at":"2016-12-15T18:47:13Z","updated_at":"2018-03-13T20:17:28Z","pushed_at":"2018-03-13T20:17:25Z","git_url":"git://github.com/istio/api.git","ssh_url":"git@github.com:istio/api.git","clone_url":"https://github.com/istio/api.git","svn_url":"https://github.com/istio/api","homepage":"","size":1528,"stargazers_count":47,"watchers_count":47,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":68,"open_issues":38,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/istio/api/pulls/406"},"html":{"href":"https://github.com/istio/api/pull/406"},"issue":{"href":"https://api.github.com/repos/istio/api/issues/406"},"comments":{"href":"https://api.github.com/repos/istio/api/issues/406/comments"},"review_comments":{"href":"https://api.github.com/repos/istio/api/pulls/406/comments"},"review_comment":{"href":"https://api.github.com/repos/istio/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/istio/api/pulls/406/commits"},"statuses":{"href":"https://api.github.com/repos/istio/api/statuses/420b77a307c81c04fdd0631c5c94191c99994b10"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"geeknoid"}}