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

Method __init__

awscli/s3transfer/bandwidth.py:62–74  ·  view source on GitHub ↗

Limits bandwidth for shared S3 transfers :type leaky_bucket: LeakyBucket :param leaky_bucket: The leaky bucket to use limit bandwidth :type time_utils: TimeUtils :param time_utils: Time utility to use for interacting with time.

(self, leaky_bucket, time_utils=None)

Source from the content-addressed store, hash-verified

60
61class BandwidthLimiter:
62 def __init__(self, leaky_bucket, time_utils=None):
63 """Limits bandwidth for shared S3 transfers
64
65 :type leaky_bucket: LeakyBucket
66 :param leaky_bucket: The leaky bucket to use limit bandwidth
67
68 :type time_utils: TimeUtils
69 :param time_utils: Time utility to use for interacting with time.
70 """
71 self._leaky_bucket = leaky_bucket
72 self._time_utils = time_utils
73 if time_utils is None:
74 self._time_utils = TimeUtils()
75
76 def get_bandwith_limited_stream(
77 self, fileobj, transfer_coordinator, enabled=True

Callers

nothing calls this directly

Calls 1

TimeUtilsClass · 0.85

Tested by

no test coverage detected