Commit Graph

7 Commits

Author SHA1 Message Date
kaiyou e9b9239eae Reinstante cluster.LocalNode
This makes for more straightforward calls. Also, generate
the localNode directly in wg.New.
2020-05-13 13:52:54 +02:00
kaiyou a0aa0bcc0e Fix unit tests due to unexported assignOverlayAddr 2020-05-13 13:52:54 +02:00
kaiyou 5b6923c272 Unexporter AssignOverlayAddress
Instead, the overlay address is assigned upon creation.
Also, the wireguard state is responsible for populating
the local node object.
2020-05-13 13:52:54 +02:00
kaiyou 9ddcbb7914 Apply suggestions from code review
Review suggestions in the documentation

Co-authored-by: Leo Antunes <leo@costela.net>
2020-05-13 13:52:54 +02:00
kaiyou b0e41d5c35 Rename WgState to State and NewWgState to New
This also caused renaming local variables to avoid
conflicting with the wg package name itself.
2020-05-13 13:52:54 +02:00
kaiyou 5d1acc1fab Add documentation to public functions and types 2020-05-13 13:52:54 +02:00
kaiyou dadfbee083 Split the application into modules
Splitting into modules will help keep concerns separate,
at the cost of a slightly more verbose code.
2020-05-13 13:52:54 +02:00