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.
- Host: GitHub
- URL: https://github.com/librity/ignite_queue
- Owner: librity
- Created: 2021-04-08T00:09:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T12:00:45.000Z (almost 4 years ago)
- Last Synced: 2025-01-08T07:39:00.841Z (12 months ago)
- Topics: challenge, elixir, genserver, rocketseat-ignite
- Language: Elixir
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)
Am implementation of queues using GenServers.
```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
> {: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
```
- https://github.com/rrrene/credo
- https://elixir-lang.org/crash-course.html
- https://hexdocs.pm/elixir/master/GenServer.html