Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

abh
Copy link

@abh abh commented Nov 29, 2021

No description provided.

abh added 3 commits November 28, 2021 21:44
(on macOS and/or newer Go versions the error changed)
On linux inotify is tied to the inode, so if the files are
replaced (rather than re-written in place) the previous code
wouldn't be watching the new files.

The fix instead watches the diretory and then reloads when
filenames matching the original names are modified.

Another issue I ran into was the vault agent having a small
window between updating the certificate and key, so the
reloading would always have a noisy "key and cert don't match"
error. Fix this by always waiting 2 seconds after a change
to do the reload.
@ts3ng ts3ng mentioned this pull request Feb 17, 2022
dyson and others added 4 commits May 28, 2023 23:44
Bump go and use go modules.
Logs were prefixed with "certman: " however this imposes an odd format
on the logging. The injected logger is a better place to do any
prefixing if desired or to perform structured logging, etc.

The "certman: " prefix has been removed from all log lines.
Use shields.io for version badge in README.
BREAKING CHANGES:
- Replace custom logger interface with standard log/slog
- Remove public Logger() method in favor of WithLogger() option
- Change constructor to accept functional options
- Require Go 1.21+ for slog support

Features:
- Add WithLogger() and WithContext() functional options
- Use context.Context for graceful shutdown
- Structured logging with Info, Error, and Debug levels
- Add comprehensive CLAUDE.md for AI-assisted development

This modernizes the API to use Go's standard structured logging
and provides a cleaner, more extensible interface through functional
options pattern.
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.

2 participants