1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-18 08:26:38 +02:00
go-micro/registry/cache/options.go
2024-06-04 21:40:43 +01:00

22 lines
307 B
Go

package cache
import (
"time"
"go-micro.dev/v5/logger"
)
// WithTTL sets the cache TTL.
func WithTTL(t time.Duration) Option {
return func(o *Options) {
o.TTL = t
}
}
// WithLogger sets the underline logger.
func WithLogger(l logger.Logger) Option {
return func(o *Options) {
o.Logger = l
}
}