An open API service indexing awesome lists of open source software.

https://github.com/librity/ignite_queue

Rocket Seat - Ignite - Elixir - Challenge 15 - Am implementation of queues using GenServers.
https://github.com/librity/ignite_queue

challenge elixir genserver rocketseat-ignite

Last synced: 10 months ago
JSON representation

Rocket Seat - Ignite - Elixir - Challenge 15 - Am implementation of queues using GenServers.

Awesome Lists containing this project

README

          

# Rocket Seat Ignite - Queue Server

## Table of Contents

- [About](#about)
- [Bash Commands](#bash_commands)
- [Elixir Commands](#elixir_commands)
- [Libs](#libs)
- [Docs](#docs)

## About

Am implementation of queues using GenServers.

## Bash Commands

```bash
# Create new Elixir project
$ mix new project_name
# Intall dependencies
$ mix deps.get
# Generate linter config
$ mix credo gen.config
# Run linter
$ mix credo --strict
# Start your project as an Interactive Elixir session
$ iex -S mix
# Run tests
$ mix test
```

## Elixir Commands

```elixir
> {:ok, pid} = Queue.initialize_queue([1, 2, 3])
> Queue.enqueue(pid, 5)
:ok
> Queue.dequeue(pid)
1
> Queue.dequeue(pid)
2
> Queue.dequeue(pid)
3
> Queue.dequeue(pid)
5
> Queue.dequeue(pid)
nil
```

## Libs

- https://github.com/rrrene/credo

## Docs

- https://elixir-lang.org/crash-course.html
- https://hexdocs.pm/elixir/master/GenServer.html