17 lines
436 B
Go
17 lines
436 B
Go
// Copyright 2022 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
|
//go:build plus
|
|
|
|
package configs
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeCommon/pkg/dnsconfigs"
|
|
"sync/atomic"
|
|
)
|
|
|
|
var SharedNodeConfig atomic.Pointer[dnsconfigs.NSNodeConfig]
|
|
|
|
// LoadSharedNodeConfig 返回当前节点配置(并发安全)
|
|
func LoadSharedNodeConfig() *dnsconfigs.NSNodeConfig {
|
|
return SharedNodeConfig.Load()
|
|
}
|