MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / getBucketClient

Method getBucketClient

storage/s3/storage.go:108–122  ·  view source on GitHub ↗
(bucket string)

Source from the content-addressed store, hash-verified

106}
107
108func (t *Storage) getBucketClient(bucket string) s3Client {
109 var client s3Client
110
111 func() {
112 t.mu.RLock()
113 defer t.mu.RUnlock()
114 client = t.clientsByBucket[bucket]
115 }()
116
117 if client != nil {
118 return client
119 }
120
121 return t.defaultClient
122}
123
124func (t *Storage) createBucketClient(bucket, region string) (s3Client, error) {
125 t.mu.Lock()

Callers 1

callWithClientFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected