GithubHelp home page GithubHelp logo

channelstest's Introduction

channelsTest

Simple project to handle processing multiple lines from a log file using go routines and channels. Each entry from the log file represents an HTTP request. Following is an example of different entries:

213.30.63.110 - - [14/Jan/2020:14:17:07 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 116 "https://meujornal.pt/wp-admin/post.php?post=3635570&action=edit" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
95.92.237.182 - - [14/Jan/2020:14:17:07 +0000] "GET /wp-json/obs_api/v4/news/widget HTTP/1.1" 301 178 "-" "Today/201908022200 CFNetwork/978.0.7 Darwin/18.7.0"

Run

$ go build -o channels
$ ./channels  log/file/path

Makefile

A simple makefile can also be used instead of go commands. If you use only make or make all, passing the log file path in the log variable is required.

$ make LOG=files/golang.log

Files

The log files used during tests can be found in files/golang.log

Important

This project is inspired by a practical test for a senior job position. The full details can be accessed here: https://www.youtube.com/watch?v=u3GAYK8hvTI&ab_channel=Filhodanuvem (Language: Portuguese)

channelstest's People

Contributors

rodrigopmello avatar

Watchers

 avatar

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.