Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with system service managers #34

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Integrate with system service managers #34

wants to merge 1 commit into from

Conversation

djdv
Copy link
Owner

@djdv djdv commented Jul 11, 2023

Closes: #21
This is a port of the code mentioned in #21.
It works, but I'm likely going to make a fork of the service pkg.
Some fixes need to be incorporated, and the API could benefit from change.

Particularly, the handling of system specific options is done via a map[string]interface{}, where the map keys are not exported and the values circumvent the type system. I think this could be changed so that the Config struct simply has different struct members based on which OS is being built for. This would eliminate the chance of using the wrong key or value type at compile time, rather than depending on reflection and possibly having unexpected behaviour.

In addition, some of the service files are generated from text templates. Like the launchd plist and systemd unit files.
It would be better if these utilized libraries which generated those files for us, through some standard and maintained API built specifically for those systems. This would make it easy to stay in sync with any changes, while also bolstering assurance that the files generated are well formed and standard compliant.

@djdv djdv marked this pull request as draft July 11, 2023 15:26
@djdv djdv force-pushed the j/service branch 2 times, most recently from e234943 to a96850f Compare July 11, 2023 16:26
@djdv djdv force-pushed the j/api-refactoring branch 2 times, most recently from bbe92d4 to 78a26a5 Compare July 11, 2023 20:07
Base automatically changed from j/api-refactoring to staging/refactor July 11, 2023 20:30
@djdv djdv changed the base branch from staging/refactor to master July 11, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrations with OS services
1 participant