1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-30 10:10:44 +02:00
go-micro/registry/cache/options.go

22 lines
305 B
Go
Raw Normal View History

2019-05-31 01:22:43 +02:00
package cache
import (
"time"
"go-micro.dev/v4/logger"
2019-05-31 01:22:43 +02:00
)
// 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
}
}