Documentation
¶
Index ¶
- Constants
- func GetNacosRegisterConfig() *vo.RegisterInstanceParam
- func SetDefaultNacosRegisterConfig()
- func SetDefaultPoolConfig()
- type APMConfig
- type DataTransferConfig
- type DataTransferReadWriteConfig
- type DataTransferReceiveConfig
- type DataTransferSendConfig
- type HardwareConfig
- type NacosDiscoverNamesConfig
- type NodeConfig
- type PoolConfig
- type SourceType
- type TopologyConfig
- type VolumeConfig
- type ZoneConfig
Constants ¶
const ( //NacosRegister nacos服务端字段 NacosRegister = "nacosRegisterr" //NacosRegisterServiceIP 向nacos进行服务注册的服务ip地址 NacosRegisterServiceIP = NacosRegister + ".ip" //NacosRegisterServicePort 向nacos进行服务注册的服务端口 NacosRegisterServicePort = NacosRegister + ".port" //NacosRegisterWeight 注册服务的权重 NacosRegisterWeight = NacosRegister + ".weight" //NacosRegisterClusterName 群组的名字 default:DEFAULT NacosRegisterClusterName = NacosRegister + ".clusterName" //NacosRegisterEnable 是否开启 NacosRegisterEnable = NacosRegister + ".enable" //NacosRegisterHealthy 是否健康 NacosRegisterHealthy = NacosRegister + ".healthy" //NacosRegisterEphemeral Ephemeral 可选 NacosRegisterEphemeral = NacosRegister + ".ephemeral" )
const ( // SoftwareSystem is system type and version SoftwareSystem = "system" // SoftwareCaas is docker and containerd version SoftwareCaas = "caas" // SoftwarePlatform is platform version SoftwarePlatform = "platform" // SoftwareBasicBuzz is basical buzz version SoftwareBasicBuzz = "basic-buzz" // SoftwareVisualData is visual data version SoftwareVisualData = "visual-data" // SoftwareProject is project-related objects version SoftwareProject = "project" )
const ( //NacosDiscoverNames 当前程序需要调用服务名称 // //goland:noinspection GoUnusedExportedFunction NacosDiscoverNames = "nacosdiscover.servicenames" )
const ( // SourceTypeFrame means frames from sensors SourceTypeFrame = SourceType("frame") )
Variables ¶
This section is empty.
Functions ¶
func GetNacosRegisterConfig ¶
func GetNacosRegisterConfig() *vo.RegisterInstanceParam
GetNacosRegisterConfig 获取基本配置
func SetDefaultNacosRegisterConfig ¶
func SetDefaultNacosRegisterConfig()
SetDefaultNacosRegisterConfig 设置默认基本配置
Types ¶
type APMConfig ¶
type APMConfig struct { // EnableLog or not EnableLog bool `json:"enable_log,omitempty"` // EnableTrace or not EnableTrace bool `json:"enable_trace,omitempty"` // EnableMetrics or not EnableMetrics bool `json:"enable_metrics,omitempty"` }
APMConfig is the APM(Application Performance Managment) setting of a node
type DataTransferConfig ¶
type DataTransferConfig struct { // EnableDeviceControl or not EnableDeviceControl bool `json:"enable_device_control,omitempty"` //是否控制设备 // EnableReceive or not EnableReceive bool `json:"enable_receive,omitempty"` //是否接收数据 // ReceiveConfig for receive ReceiveConfig *DataTransferReceiveConfig `json:"receive_config,omitempty"` // EnableReadWrite or not EnableReadWrite bool `json:"enable_read_write,omitempty"` //是否存取数据 // ReadWriteConfig for store ReadWriteConfig *DataTransferReadWriteConfig `json:"read_write_config,omitempty"` // EnableSend or not EnableSend bool `json:"enable_send,omitempty"` //是否外发数据 // SendConfig for send SendConfig *DataTransferSendConfig `json:"send_config,omitempty"` }
DataTransferConfig is the data transfer config of a node
type DataTransferReadWriteConfig ¶
type DataTransferReadWriteConfig struct { }
DataTransferReadWriteConfig is the store part of data transfer config
type DataTransferReceiveConfig ¶
type DataTransferReceiveConfig struct { // EnableCalculateTimestamp or not EnableCalculateTimestamp bool `json:"enable_calculate_timestamp,omitempty"` // 是否重新计算时间戳 // EnableCRCCheck or not EnableCRCCheck bool `json:"enable_crc_check,omitempty"` // 是否校验CRC }
DataTransferReceiveConfig is the receive part of data transfer config
type DataTransferSendConfig ¶
type DataTransferSendConfig struct { // RemoteDeviceMgmtAddr - RemoteDeviceMgmtAddr string `json:"remote_device_mgmt_addr"` // 目标device地址 // RemoteReceiverAddr - RemoteReceiverAddr string `json:"remote_receiver_addr"` // 目标receiver地址 }
DataTransferSendConfig is the send part of data transfer config
type HardwareConfig ¶
type HardwareConfig struct { // Model of the hardware Model string `json:"model,omitempty"` //机型 // CPU type CPU string `json:"cpu,omitempty"` // CPUCount of the node CPUCount int `json:"cpu_count,omitempty"` // MemoryGB of the node MemoryGB int `json:"memory_gb,omitempty"` // SystemGB is the space of the system disk SystemGB int `json:"system_gb,omitempty"` // DataGB is the space of the data space DataGB int `json:"data_gb,omitempty"` // DataLvmSetting is lvm settng of the data space DataLvmSetting []VolumeConfig `json:"data_lvm_setting,omitempty"` // NICCount is the count of the NIC NICCount int `json:"nic_count,omitempty"` }
HardwareConfig defines the hardware configuration of the node
type NacosDiscoverNamesConfig ¶
type NacosDiscoverNamesConfig struct {
ServiceNames []string `toml:"servicenames"`
}
NacosDiscoverNamesConfig nacos的配置
func GetNacosDiscoverConfig ¶
func GetNacosDiscoverConfig() *NacosDiscoverNamesConfig
GetNacosDiscoverConfig 获取nacos服务发现配置
type NodeConfig ¶
type NodeConfig struct { // Name of the node Name string `json:"name,omitempty"` // Location of the node Location string `json:"location,omitempty"` // Hardware configuration of the node Hardware *HardwareConfig `json:"hardware,omitempty"` // PublicIPs of the node PublicIPs []string `json:"ips,omitempty"` // OverlayNetwork for the kiga overlay network OverlayNetwork string `json:"overlay_network,omitempty"` // GlobalCluster is a-b from OverlayNetwork a.b.c.0/24 GlobalCluster string `json:"global_cluster,omitempty"` // Software version of every software part Software map[string]string `json:"software,omitempty"` // DataTransfer configuration DataTransfer *DataTransferConfig `json:"data_transfer,omitempty"` // APM configuration APM *APMConfig `json:"apm,omitempty"` }
NodeConfig defines a node
type PoolConfig ¶
type PoolConfig struct { MinActive int `toml:"min"` //连接池中拥有的最小连接数 MaxActive int `toml:"max"` //连接池中拥有的最大的连接数 IdleTimeout int `toml:"idleTimeout"` //连接最大空闲时间,超过该事件则将失效 }
PoolConfig 连接池配置
type TopologyConfig ¶
type TopologyConfig struct { // Version of the config Version string `json:"version,omitempty"` // CreateTime of the config CreateTime time.Time `json:"create_time,omitempty"` // ProjectName of the topology ProjectName string `json:"project_name,omitempty"` // Zones of the project Zones map[string]ZoneConfig `json:"zones"` }
TopologyConfig defines a topology
func GenerateFakeTopology ¶
func GenerateFakeTopology() (*TopologyConfig, error)
GenerateFakeTopology generate a fake topology
type VolumeConfig ¶
type VolumeConfig struct { // TotalUsefulSizeGB is the total size of volume TotalUsefulSizeGB int `json:"total_useful_size_gb,omitempty"` // DiskCount is number of disk in the volume DiskCount int `json:"disk_count,omitempty"` // PerDiskRealSizeGB is the space for each of the data disk PerDiskRealSizeGB int `json:"per_disk_size_gb,omitempty"` // RaidType of the data disks, -1 for none, 1 for raid1, 5 for raid5 RaidType int `json:"raid_type,omitempty"` // -1为非raid }
VolumeConfig defines of volume in lvm
type ZoneConfig ¶
type ZoneConfig struct { // Name of the zone Name string `json:"name,omitempty"` // Nodes definition of the topology Nodes map[string]NodeConfig `json:"nodes"` }
ZoneConfig defines a zone