Documentation ¶
Index ¶
Constants ¶
View Source
const CONFIG_FILE = "/opt/appdynamics/config/cluster-agent-config.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigManager ¶
Simple interface that allows us to switch out both implementations of the Manager
type ConfigWatcher ¶
type ConfigWatcher struct {
// contains filtered or unexported fields
}
Watches a file on a set interval, and preforms de-duplication of write events such that only 1 write event is reported even if multiple writes happened during the specified duration.
func WatchFile ¶
func WatchFile(path string, interval time.Duration, action func()) (*ConfigWatcher, error)
Begin watching a file with a specific interval and action
func (*ConfigWatcher) Close ¶
func (self *ConfigWatcher) Close()
type MutexConfigManager ¶
type MutexConfigManager struct { Conf *m.AppDBag Mutex *sync.Mutex Watch *ConfigWatcher Logger *log.Logger InstrumentCallback func() }
This struct manages the configuration instance by preforming locking around access to the Config struct.
func NewMutexConfigManager ¶
func NewMutexConfigManager(env *m.AppDBag, l *log.Logger) *MutexConfigManager
func (*MutexConfigManager) Close ¶
func (self *MutexConfigManager) Close()
func (*MutexConfigManager) Get ¶
func (self *MutexConfigManager) Get() *m.AppDBag
func (*MutexConfigManager) Set ¶
func (self *MutexConfigManager) Set(conf *m.AppDBag)
func (*MutexConfigManager) SubscribeToInstrumentationUpdates ¶ added in v0.1.12
func (self *MutexConfigManager) SubscribeToInstrumentationUpdates(callback func())
Click to show internal directories.
Click to hide internal directories.