Giter Club home page Giter Club logo

Comments (11)

pushrax avatar pushrax commented on July 17, 2024

What's the plan for ensuring the toxic has finished sending output after being interrupted, and before the connections are changed? Wait for Pipe() to return?

Also 👍 for the API. Have you thought about allowing control of the toxic ordering? That might be useful in some cases, but maybe not enough to be worth the extra complexity.

from toxiproxy.

xthexder avatar xthexder commented on July 17, 2024

stub.Interrupt() will not return until Pipe() has returned now, so we are guaranteed that either the data is sent or it won't be until we resume.

Another thing for the implementation:
I'd like to wrap toxics in a struct with some extra fields (like name) so that we can simplify the Toxic interface to just the Pipe() function.
This means much less boilerplate code in the toxic definitions.

from toxiproxy.

pushrax avatar pushrax commented on July 17, 2024

🆒

from toxiproxy.

sirupsen avatar sirupsen commented on July 17, 2024

Wouldn't it be more restful to do:

POST /proxies/{proxy}/{up|down}stream/toxics

But only allow certain names?

from toxiproxy.

xthexder avatar xthexder commented on July 17, 2024

👍 @sirupsen That means it also exactly matches how proxies are created.

from toxiproxy.

eapache avatar eapache commented on July 17, 2024

👍 to the API and design

from toxiproxy.

sirupsen avatar sirupsen commented on July 17, 2024

Another interpretation to the API would be that all the toxics are created on the resource by default, and you have to do a PUT to update them. Would that make more sense?

from toxiproxy.

xthexder avatar xthexder commented on July 17, 2024

Missed this before (maybe because it was edited in after): toxic order is determined by the order toxics are created in, since we'll always append to the end of the chain. In the general use case, this works well since I don't see a need to reorder toxics without removing them all first.

I think the idea of adding/removing toxics vs enabling/disabling is what we want. It seems to be what people are expecting, and it will scale better if/when we have many types of toxics (I expect there will end up being many protocol-aware toxics)

from toxiproxy.

pushrax avatar pushrax commented on July 17, 2024

@sirupsen PUT semantics are to replace the whole object, while in this case it would be more convenient to do an incremental update.

from toxiproxy.

ihsw avatar ihsw commented on July 17, 2024

👍

from toxiproxy.

sirupsen avatar sirupsen commented on July 17, 2024

We need to remember to remove the toxiproxy binary that doesn't have a -server suffix.

from toxiproxy.

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.