github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/application/applications/logcollection/loggingoperator.go (about) 1 package logcollection 2 3 import ( 4 toolsetslatest "github.com/caos/orbos/internal/operator/boom/api/latest" 5 "github.com/caos/orbos/internal/operator/boom/application/applications/logcollection/info" 6 "github.com/caos/orbos/internal/operator/boom/name" 7 "github.com/caos/orbos/mntr" 8 ) 9 10 type LoggingOperator struct { 11 monitor mntr.Monitor 12 orb string 13 } 14 15 func New(monitor mntr.Monitor, orb string) *LoggingOperator { 16 lo := &LoggingOperator{ 17 monitor: monitor, 18 orb: orb, 19 } 20 21 return lo 22 } 23 func (l *LoggingOperator) GetName() name.Application { 24 return info.GetName() 25 } 26 27 func (lo *LoggingOperator) Deploy(toolsetCRDSpec *toolsetslatest.ToolsetSpec) bool { 28 return toolsetCRDSpec.LogCollection != nil && toolsetCRDSpec.LogCollection.Deploy 29 } 30 31 func (l *LoggingOperator) GetNamespace() string { 32 return info.GetNamespace() 33 }