Ejemplo n.º 1
0
func (factory *ecrFactory) newClient(region, endpointOverride string) ECRSDK {
	var ecrConfig aws.Config
	ecrConfig.Region = &region
	ecrConfig.HTTPClient = factory.httpClient
	if endpointOverride != "" {
		ecrConfig.Endpoint = &endpointOverride
	}
	return ecrapi.New(&ecrConfig)
}
Ejemplo n.º 2
0
func (factory *ecrFactory) newClient(region, endpointOverride string) ECRClient {
	var ecrConfig aws.Config
	ecrConfig.Region = &region
	ecrConfig.HTTPClient = factory.httpClient
	if endpointOverride != "" {
		ecrConfig.Endpoint = &endpointOverride
	}
	sdkClient := ecrapi.New(session.New(&ecrConfig))
	tokenCache := async.NewLRUCache(tokenCacheSize, tokenCacheTTL)
	return NewECRClient(sdkClient, tokenCache)
}