example: Add BGP EVPN example
This commit is contained in:
parent
97b957742f
commit
830d17ba27
9 changed files with 155 additions and 0 deletions
18
examples/evpn_router/lib/evpn_router.ex
Normal file
18
examples/evpn_router/lib/evpn_router.ex
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
defmodule EvpnRouter do
|
||||
@moduledoc """
|
||||
Documentation for EvpnRouter.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Hello world.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> EvpnRouter.hello()
|
||||
:world
|
||||
|
||||
"""
|
||||
def hello do
|
||||
:world
|
||||
end
|
||||
end
|
||||
20
examples/evpn_router/lib/evpn_router/application.ex
Normal file
20
examples/evpn_router/lib/evpn_router/application.ex
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
defmodule EvpnRouter.Application do
|
||||
# See https://hexdocs.pm/elixir/Application.html
|
||||
# for more information on OTP Applications
|
||||
@moduledoc false
|
||||
|
||||
use Application
|
||||
|
||||
def start(_type, _args) do
|
||||
# List all child processes to be supervised
|
||||
children = [
|
||||
# Starts a worker by calling: EvpnRouter.Worker.start_link(arg)
|
||||
# {EvpnRouter.Worker, arg},
|
||||
]
|
||||
|
||||
# See https://hexdocs.pm/elixir/Supervisor.html
|
||||
# for other strategies and supported options
|
||||
opts = [strategy: :one_for_one, name: EvpnRouter.Supervisor]
|
||||
Supervisor.start_link(children, opts)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue