service: config load only on start, not init phase

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-03-30 15:37:02 +03:00
parent c10f29ee74
commit 575af66ddc
8 changed files with 11 additions and 18 deletions

View File

@@ -10,16 +10,16 @@ import (
// Buffer is ring buffer
type Buffer struct {
sync.RWMutex
streams map[string]*Stream
vals []*Entry
size int
sync.RWMutex
}
// Entry is ring buffer data entry
type Entry struct {
Value interface{}
Timestamp time.Time
Value interface{}
}
// Stream is used to stream the buffer

View File

@@ -6,8 +6,8 @@ import (
// Pool holds the socket pool
type Pool struct {
pool map[string]*Socket
sync.RWMutex
pool map[string]*Socket
}
// Get socket from pool

View File

@@ -20,10 +20,10 @@ type Stream interface {
}
type stream struct {
sync.RWMutex
Stream
err error
request *request
sync.RWMutex
}
type request struct {