Giter Site home page Giter Site logo

donvito / learngo Goto Github PK

View Code? Open in Web Editor NEW
99.0 99.0 41.0 4.68 MB

This repository contains code which I am using to learn Go. Hoping it can be useful to someone, I've uploaded them here in github.

Home Page: https://www.donvitocodes.com

License: MIT License

Go 92.02% Dockerfile 6.24% HTML 1.75%

learngo's Introduction

LearnGo

This repository contains code which I used to learn Go. Hoping it can be useful to someone, I've uploaded them here in github.

learngo/helloworld

This is a very basic Go application which prints a simple string

learngo/docker/api

This is a Go application which uses the Docker Go SDK and communicates with the Docker API. It outputs lists of containers, images, networks and swarm nodes. Check my blog post about this https://www.melvinvivas.com/learning-go-with-docker-sdk/

learngo/mongo-microservice

This is my first microservice using the Go Language which connects to a MongoDB NoSQL database, compiled using Docker a multi-stage build, and deployed as a Docker container. The microservice exposes 2 HTTP endpoints

  • GET /jobs - this endpoint returns a list of jobs retrieved from a MongoDB database
  • POST /jobs - this endpoint accepts a json string and saves it to a MongoDB database

Check my blog post about this https://www.melvinvivas.com/my-first-go-microservice/

learngo/rest-kafka-mongo-microservice

In this example, I decoupled the saving of data to MongoDB and created another microservice to handle this. I also added Kafka to serve as the messaging layer so the microservices can work on its own concerns asynchrounously.

Microservice 1

The REST microservice which receives data from a /POST http call to it. After receiving the request, it retrieves the data from the http request and saves it to Kafka. After saving, it responds to the caller with the same data sent via /POST

Microservice 2

The microservice which subscribes to a topic in Kafka where Microservice 1 saves the data. Once a message is consumed by the microservice, it then saves the data to MongoDB.

Check my blog post about this https://www.melvinvivas.com/developing-microservices-using-kafka-and-mongodb/

learngo/pointers

I've been studying about pointers in golang and these are the source codes which I used to understand pointers.

learngo's People

Contributors

donvito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

learngo's Issues

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.