MCPcopy Create free account
hub / github.com/aws/aws-cli / CLISessionGenerator

Class CLISessionGenerator

awscli/telemetry.py:202–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201
202class CLISessionGenerator:
203 def generate_session_id(self, host_id, tty, timestamp):
204 return self._generate_checksum(host_id, tty, timestamp)
205
206 def generate_cache_key(self, host_id, tty):
207 return self._generate_checksum(host_id, tty)
208
209 def _generate_checksum(self, *args):
210 checksum = _get_checksum()
211 str_to_hash = ""
212 for arg in args:
213 if arg is not None:
214 str_to_hash += str(arg)
215 checksum.update(str_to_hash.encode('utf-8'))
216 return checksum.hexdigest()[:_SESSION_ID_LENGTH]
217
218
219class CLISessionOrchestrator:

Callers 2

session_generatorFunction · 0.90

Calls

no outgoing calls

Tested by 1

session_generatorFunction · 0.72