package main

import (
	"../log"
	"../nt"
	"../zkeeper"
	"github.com/samuel/go-zookeeper/zk"
	"go.uber.org/zap"
)

// zookeeper 节点变化通知。
// 本进程只监视所有 logic 的上下线。
func on_zk_data_changed(c *zkeeper.ZkClient, path string, ev zk.EventType) {
	if path == nt.ZkP.Wallet {
		aesIvDefValue = nt.DynConf.Wallet.Dbdz.AesIv
		aesKeyDefValue = nt.DynConf.Wallet.Dbdz.AesKey
	} else {
		log.Warn("untraced zk event", zap.String("path", path))
	}
}
