• carnage.sh

    carnage.sh

    • blog

    • github
    • lang
      • english
      • français
    blog
    pexels.com
    lambda, Go and websocket
    April 17, 2021
    The AWS API Gateway provides a programming model to interact with client through websockets. This article describes a sample application that provides 2 Go lambda: one to interact with the websocket and maintain its state in dynamodb; the other to send a message to all the clients using a websocket on a channel. It also provides the terraform manifests to create the dynamodb table, the 2 lambdas, the gateways as well as the logs, roles, and permissions...
    pexels.com
    Go net/http
    April 10, 2021
    net/http is a very popular standard library with Go. It starts simple and comes with a rich set of features so that you can build, test and scale without even thinking about it. This article explains how pieces fit together. What is the difference between HandleFunc and HandlerFunc? How to write a middleware? If you are starting or still do not fully understand everything... That is very easy; check for yourself.
    pexels.com
    inject Go dependencies
    April 07, 2021
    Dependency injection is the ability to change types and methods at runtime. It can be used to provide a logger or a connection pool to a library or a module. It can be used to manage the configuration of a service and choose between different implementations. It is also used to mock a service and make unit test easy and decoupled. This article digs into dependency injections with Go.
    pexels.com
    the //go:embed directive
    March 13, 2021
    New with Go 1.16, the //go:embed directive allows to embed files into your go artifacts. Templates for mails, websites, scripts can be added added more easily than ever
    pexels.com
    no more operators!
    December 05, 2020
    A very interesting topic that has come up lately is the fact that kubernetes operators come with a number of difficulties that make them hard to code and use. This article summarizes some of those concerns. You will find when and how to avoid them as well as the alternatives approaches you can use. Afterall, the best operator may be no operator.
    © 2021 carnage.sh