fieldalignment of all structs to save memory
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -7,23 +7,22 @@ import (
|
||||
|
||||
type memorySync struct {
|
||||
options Options
|
||||
|
||||
mtx gosync.RWMutex
|
||||
locks map[string]*memoryLock
|
||||
locks map[string]*memoryLock
|
||||
mtx gosync.RWMutex
|
||||
}
|
||||
|
||||
type memoryLock struct {
|
||||
id string
|
||||
time time.Time
|
||||
ttl time.Duration
|
||||
release chan bool
|
||||
id string
|
||||
ttl time.Duration
|
||||
}
|
||||
|
||||
type memoryLeader struct {
|
||||
opts LeaderOptions
|
||||
id string
|
||||
resign func(id string) error
|
||||
status chan bool
|
||||
id string
|
||||
}
|
||||
|
||||
func (m *memoryLeader) Resign() error {
|
||||
|
||||
@@ -10,11 +10,17 @@ import (
|
||||
|
||||
// Options holds the sync options
|
||||
type Options struct {
|
||||
Nodes []string
|
||||
Prefix string
|
||||
// Logger used for logging
|
||||
Logger logger.Logger
|
||||
// Tracer used for tracing
|
||||
Tracer tracer.Tracer
|
||||
Meter meter.Meter
|
||||
// Meter used for merics
|
||||
Meter meter.Meter
|
||||
// Prefix holds prefix?
|
||||
Prefix string
|
||||
// Nodes holds the nodes
|
||||
// TODO: change to Addrs ?
|
||||
Nodes []string
|
||||
}
|
||||
|
||||
// Option func signature
|
||||
|
||||
Reference in New Issue
Block a user