Coder Social home page Coder Social logo

Comments (7)

stripecodahale avatar stripecodahale commented on May 18, 2024

This isn't currently possible, but it would be a welcome change.

from aws-sdk-go.

marceldegraaf avatar marceldegraaf commented on May 18, 2024

Thanks, we'll look into submitting a PR for this.

from aws-sdk-go.

marceldegraaf avatar marceldegraaf commented on May 18, 2024

Hi @stripecodahale, my colleague @mrdg and I have discussed a possible implementation for this feature. We want to quickly run that by you before we start hacking on it :-).

So, our proposal is to add an overrides map to the endpoints package, containing tuples of service name (e.g. "ec2") and endpoint (e.g. "http://localhost:1234"). This overrides map has precedence over the existing code in endpoints.Lookup(), allowing one to override one or more service endpoints for local testing.

If you're OK with this, we'll submit the PR as soon as possible.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on May 18, 2024

As long as the overrides are for specific regions β€” e.g. endpoints.Add("test1", etc)β€”it sounds good.

from aws-sdk-go.

marceldegraaf avatar marceldegraaf commented on May 18, 2024

I'm not sure I understand what you mean. Can you elaborate on what the region specifier should do in the context of a local service endpoint override? Thanks πŸ˜„

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on May 18, 2024

Sorry, that was vague. I'm going through email before having coffee. :)

I mean, I'd want to provide the ability to add test regions with specific endpoints rather than redefine the behavior of existing regions. Essentially, just add a region name to the (service, endpoint) tuple.

This way, test code could e.g. safely depend on a test-1 region instead of modifying the behavior of an existing region.

from aws-sdk-go.

marceldegraaf avatar marceldegraaf commented on May 18, 2024

Heh, no problem!

Alright, sounds good. We'll probably have a PR for this in the coming days.

from aws-sdk-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.