go-systemd icon indicating copy to clipboard operation
go-systemd copied to clipboard

Rename login1.Conn to login1.Client or similar

Open invidian opened this issue 3 years ago • 0 comments

I think login1.Conn name is not very accurate, as it leaks the abstraction on how login1 methods are called underneath (via some kind of connection).

Also, right now login1 package is responsible for connecting and authenticating to D-Bus, which seems like both possible waste of resources, as multiple clients can't share the connection and it also affects testability of code, as no mock D-Bus connection can be given to a login1 client. It seems like responsibility to proxy connections to D-Bus should be out of scope for this package/struct.

invidian avatar Jan 10 '22 09:01 invidian