1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-29 21:47:44 +02:00

fix: struct field alignment (#2632)

This commit is contained in:
Lukasz Raczylo
2023-04-26 00:16:34 +00:00
committed by GitHub
parent 0f9b2f00c9
commit a7522e7d6c
113 changed files with 694 additions and 637 deletions

View File

@@ -23,20 +23,23 @@ type Cache interface {
}
type Options struct {
Logger log.Logger
// TTL is the cache TTL
TTL time.Duration
Logger log.Logger
}
type Option func(o *Options)
type cache struct {
registry.Registry
opts Options
// registry cache
sync.RWMutex
registry.Registry
// status of the registry
// used to hold onto the cache
// in failure state
status error
// used to prevent cache breakdwon
sg singleflight.Group
cache map[string][]*registry.Service
ttls map[string]time.Time
watched map[string]bool
@@ -46,12 +49,9 @@ type cache struct {
// indicate whether its running
watchedRunning map[string]bool
// status of the registry
// used to hold onto the cache
// in failure state
status error
// used to prevent cache breakdwon
sg singleflight.Group
// registry cache
sync.RWMutex
}
var (