[#70] Support client cut
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
e61b4867c9
commit
9b34413e17
8 changed files with 44 additions and 1 deletions
|
@ -75,6 +75,7 @@ type (
|
|||
mu sync.RWMutex
|
||||
defaultTimestamp bool
|
||||
zipCompression bool
|
||||
clientCut bool
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -164,6 +165,18 @@ func (s *appSettings) setZipCompression(val bool) {
|
|||
s.mu.Unlock()
|
||||
}
|
||||
|
||||
func (s *appSettings) ClientCut() bool {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
return s.clientCut
|
||||
}
|
||||
|
||||
func (s *appSettings) setClientCut(val bool) {
|
||||
s.mu.Lock()
|
||||
s.clientCut = val
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
||||
func (a *app) initAppSettings() {
|
||||
a.settings = &appSettings{}
|
||||
|
||||
|
@ -448,6 +461,7 @@ func (a *app) configReload(ctx context.Context) {
|
|||
func (a *app) updateSettings() {
|
||||
a.settings.setDefaultTimestamp(a.cfg.GetBool(cfgUploaderHeaderEnableDefaultTimestamp))
|
||||
a.settings.setZipCompression(a.cfg.GetBool(cfgZipCompression))
|
||||
a.settings.setClientCut(a.cfg.GetBool(cfgClientCut))
|
||||
}
|
||||
|
||||
func (a *app) startServices() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue