Skip to content

Commit

Permalink
chore: convert endpoint from module to function
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Nov 10, 2021
1 parent 5a58fb9 commit 936bde0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 0 additions & 6 deletions lib/metadata_service/endpoint.js

This file was deleted.

8 changes: 8 additions & 0 deletions lib/metadata_service/get_endpoint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var getEndpoint = function() {
return {
IPv4: 'http://169.254.169.254',
IPv6: 'http://[fd00:ec2::254]',
};
};

module.exports = getEndpoint;
2 changes: 1 addition & 1 deletion lib/metadata_service/get_metadata_service_endpoint.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var AWS = require('../core');

var Endpoint = require('./endpoint');
var Endpoint = require('./get_endpoint')();
var EndpointMode = require('./endpoint_mode');

var ENDPOINT_CONFIG_OPTIONS = require('./endpoint_config_options').ENDPOINT_CONFIG_OPTIONS;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var helpers = require('./../helpers');
var getMetadataServiceEndpoint = require('../../lib/metadata_service/get_metadata_service_endpoint');

var Endpoint = require('../../lib/metadata_service/endpoint');
var Endpoint = require('../../lib/metadata_service/get_endpoint')();
var EndpointMode = require('../../lib/metadata_service/endpoint_mode');
var ENDPOINT_CONFIG_OPTIONS = require('../../lib/metadata_service/endpoint_config_options').ENDPOINT_CONFIG_OPTIONS;

Expand Down

0 comments on commit 936bde0

Please sign in to comment.