support runtime.ServeMux opts for grpc-gateway
All checks were successful
Build and Publish / release (push) Has been skipped
Build and Publish / check-chart (push) Successful in 10s
Build and Publish / helm-release (push) Has been skipped

This commit is contained in:
2025-03-25 17:05:59 -04:00
parent 1e481627e3
commit f201ac1fca
10 changed files with 78 additions and 6 deletions

View File

@ -29,6 +29,10 @@ type Opts struct {
KeepLast int
}
func (r *WeatherRecorder) Ping(ctx context.Context) error {
return r.recorder.Ping(ctx)
}
func MustNewWeatherRecorder(opts *Opts) *WeatherRecorder {
if opts.KeepLast < 1 {
opts.KeepLast = 1