kinvolk-archives / tcd

traffic control daemon
Apache License 2.0
21 stars 8 forks source link

Refactor lib/dbus.go to have the same method names in gRPC and D-Bus #4

Open alban opened 8 years ago

alban commented 8 years ago

The object TCDDBus in lib/dbus.go is exposing the methods Install, ConfigureIngress, ConfigureEgress over D-Bus and gRPC. But the methods for gRPC (protoc) and D-Bus (godbus) cannot have the same name because there is no function overloading in Golang. This has been worked around by using the ugly suffix Method in api/service.proto. So this should be refactored to use two different objects calling the same code internally.