Private
Public Access
CI / rust (push) Successful in 3m6s
CI / go (push) Successful in 33s
CI / js (push) Successful in 34s
Standalone clients that resolve a machine unique ID (OS machine ID first, falling back to a generated UUID persisted to disk), detect hostname/IP/ container/orchestrator, and register+re-ping origin.warky.dev's public service-checkin endpoint on a daily interval. Ported from icy2's internal origincheckin package but extended to the full check-in contract and made dependency-light for external reuse. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
21 lines
639 B
Go
21 lines
639 B
Go
package originclient
|
|
|
|
// Logger receives non-fatal warnings from the client (encode/build/request
|
|
// failures, machine-id/persistence fallbacks). It intentionally mirrors the
|
|
// smallest common subset of structured loggers so callers can adapt zap,
|
|
// slog, logrus, or anything else with one line.
|
|
type Logger interface {
|
|
Warn(msg string, err error)
|
|
}
|
|
|
|
// LoggerFunc adapts a function to Logger.
|
|
type LoggerFunc func(msg string, err error)
|
|
|
|
// Warn implements Logger.
|
|
func (f LoggerFunc) Warn(msg string, err error) { f(msg, err) }
|
|
|
|
// noopLogger discards every warning.
|
|
type noopLogger struct{}
|
|
|
|
func (noopLogger) Warn(string, error) {}
|