Class: Google::Cloud::Debugger::Debuggee
- Inherits:
-
Object
- Object
- Google::Cloud::Debugger::Debuggee
- Defined in:
- lib/google/cloud/debugger/debuggee.rb,
lib/google/cloud/debugger/debuggee/app_uniquifier_generator.rb
Overview
Debuggee
Represent a debuggee application. Contains information that identifies debuggee applications from each other. Maps to gRPC struct Devtools::Clouddebugger::V2::Debuggee.
It also automatically loads source context information generated from Cloud SDK. See Stackdriver Debugger doc for more information on how to generate this source context information when used on Google Container Engine and Google Compute engine. This step is taken care of if debuggee application is hosted on Google App Engine Flexibile.
To ensure the multiple instances of the application are indeed the same application, the debuggee also compute a "uniquifier" generated from source context or application source code.
Defined Under Namespace
Modules: AppUniquifierGenerator
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
Registered Debuggee ID.
-
#module_name ⇒ String
readonly
Name for the debuggee application.
-
#module_version ⇒ String
readonly
Version identifier for the debuggee application.
Instance Method Summary collapse
-
#register ⇒ Boolean
Register the current application as a debuggee with Stackdriver Debuggee service.
-
#registered? ⇒ Boolean
Check whether this debuggee is currently registered or not.
-
#revoke_registration ⇒ Object
Revoke the registration of this debuggee.
-
#to_grpc ⇒ Object
Convert this debuggee into a gRPC Google::Devtools::Clouddebugger::V2::Debuggee struct.
Instance Attribute Details
#id ⇒ String (readonly)
Registered Debuggee ID. Set by Stackdriver Debugger service when a debuggee application is sucessfully registered.
62 63 64 |
# File 'lib/google/cloud/debugger/debuggee.rb', line 62 def id @id end |
#module_name ⇒ String (readonly)
Name for the debuggee application
51 52 53 |
# File 'lib/google/cloud/debugger/debuggee.rb', line 51 def module_name @module_name end |
#module_version ⇒ String (readonly)
Version identifier for the debuggee application
56 57 58 |
# File 'lib/google/cloud/debugger/debuggee.rb', line 56 def module_version @module_version end |
Instance Method Details
#register ⇒ Boolean
Register the current application as a debuggee with Stackdriver Debuggee service.
78 79 80 81 82 83 84 85 86 |
# File 'lib/google/cloud/debugger/debuggee.rb', line 78 def register begin response = service.register_debuggee to_grpc @id = response.debuggee.id rescue revoke_registration end registered? end |
#registered? ⇒ Boolean
Check whether this debuggee is currently registered or not
91 92 93 |
# File 'lib/google/cloud/debugger/debuggee.rb', line 91 def registered? !id.nil? end |
#revoke_registration ⇒ Object
Revoke the registration of this debuggee
97 98 99 |
# File 'lib/google/cloud/debugger/debuggee.rb', line 97 def revoke_registration @id = nil end |
#to_grpc ⇒ Object
Convert this debuggee into a gRPC Google::Devtools::Clouddebugger::V2::Debuggee struct.
104 105 106 107 108 109 |
# File 'lib/google/cloud/debugger/debuggee.rb', line 104 def to_grpc debuggee_args = build_request_arg Google::Devtools::Clouddebugger::V2::Debuggee.decode_json \ debuggee_args.to_json end |