service

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IMAGE_MAX_COUNT = 20
)
View Source
const VTAP_GROUP_SHORT_UUID_PREFIX = "g-"
View Source
const (
	VTAP_LICENSE_CHECK_EXCEPTION = "采集器(%s)不支持修改为指定授权类型"
)

Variables

View Source
var DEFAULT_DATA_SOURCE_DISPLAY_NAMES = []string{
	"网络-指标(秒级)", "网络-指标(分钟级)",
	"网络-流日志",
	"应用-指标(秒级)", "应用-指标(分钟级)",
	"应用-调用日志",
	"网络-TCP 时序数据",
	"网络-PCAP 数据",
	"系统监控数据",
	"外部指标数据",
	"Prometheus 数据",
	"事件-资源变更事件",
	"事件-IO 事件",
	"事件-告警事件",
	"应用-性能剖析",
}
View Source
var DecapTypeData = map[int]string{
	0: "无",
	1: "VXLAN",
	2: "IPIP",
	3: "GRE",
}

Functions

func BatchDeleteVtap

func BatchDeleteVtap(deleteMap []map[string]string) (resp map[string][]string, err error)

func BatchUpdateVtap

func BatchUpdateVtap(updateMap []map[string]interface{}) (resp map[string][]string, err error)

func BatchUpdateVtapLicenseType

func BatchUpdateVtapLicenseType(updateMap []map[string]interface{}) (resp map[string][]string, err error)

func BatchUpdateVtapTapMode

func BatchUpdateVtapTapMode(vtapUpdate *model.VtapUpdateTapMode) (interface{}, error)

func CallIngesterAPIAddRP

func CallIngesterAPIAddRP(ip string, dataSource, baseDataSource mysql.DataSource, ingesterApiPort int) error

func CallIngesterAPIDelRP

func CallIngesterAPIDelRP(ip string, dataSource mysql.DataSource, ingesterApiPort int) error

func CallIngesterAPIModRP

func CallIngesterAPIModRP(ip string, dataSource mysql.DataSource, ingesterApiPort int) error

func ConfigAnalyzerDataSource

func ConfigAnalyzerDataSource(ip string) error

func CreateDataSource

func CreateDataSource(dataSourceCreate *model.DataSourceCreate, cfg *config.ControllerConfig) (model.DataSource, error)

func CreateMailServer

func CreateMailServer(mailCreate model.MailServerCreate) (model.MailServer, error)

func CreatePlugin

func CreatePlugin(pluginCreate *mysql.Plugin) (*model.Plugin, error)

func CreateVTapGroupAdvancedConfig

func CreateVTapGroupAdvancedConfig(createData *model.VTapGroupConfiguration) (string, error)

func CreateVTapGroupConfig

func CreateVTapGroupConfig(createData *model.VTapGroupConfiguration) (*mysql.VTapGroupConfiguration, error)

func CreateVtap

func CreateVtap(vtapCreate model.VtapCreate) (model.Vtap, error)

func CreateVtapGroup

func CreateVtapGroup(vtapGroupCreate model.VtapGroupCreate, cfg *config.ControllerConfig) (resp model.VtapGroup, err error)

func CreateVtapRepo

func CreateVtapRepo(vtapRepoCreate *mysql.VTapRepo) (*model.VtapRepo, error)

func DeleteAnalyzer

func DeleteAnalyzer(lcuuid string, m *monitor.AnalyzerCheck) (resp map[string]string, err error)

func DeleteController

func DeleteController(lcuuid string, m *monitor.ControllerCheck) (resp map[string]string, err error)

func DeleteDataSource

func DeleteDataSource(lcuuid string, cfg *config.ControllerConfig) (map[string]string, error)

func DeleteMailServer

func DeleteMailServer(lcuuid string) (map[string]string, error)

func DeletePlugin

func DeletePlugin(name string) error

func DeleteVTapGroupConfig

func DeleteVTapGroupConfig(lcuuid string) (*mysql.VTapGroupConfiguration, error)

func DeleteVTapGroupConfigByFilter

func DeleteVTapGroupConfigByFilter(args map[string]string) (string, error)

func DeleteVtap

func DeleteVtap(lcuuid string) (resp map[string]string, err error)

func DeleteVtapGroup

func DeleteVtapGroup(lcuuid string) (resp map[string]string, err error)

func DeleteVtapRepo

func DeleteVtapRepo(name string) error

func GetAgentStats

func GetAgentStats(g *genesis.Genesis, param string) ([]genesis.TridentStats, error)

func GetAnalyzers

func GetAnalyzers(filter map[string]interface{}) (resp []model.Analyzer, err error)

func GetCloudBasicInfos

func GetCloudBasicInfos(filter map[string]string, m *manager.Manager) (resp []cloudmodel.BasicInfo, err error)

func GetCloudResource

func GetCloudResource(lcuuid string, m *manager.Manager) (resp cloudmodel.Resource, err error)

func GetControllers

func GetControllers(filter map[string]string) (resp []model.Controller, err error)

func GetDataSources

func GetDataSources(filter map[string]interface{}, specCfg *config.Specification) (resp []model.DataSource, err error)

func GetGenesisAgentStorage

func GetGenesisAgentStorage(vtapIDString string) (model.GenesisStorage, error)

func GetGenesisData

func GetGenesisData(g *genesis.Genesis) (genesis.GenesisSyncData, error)

func GetGenesisKubernetesData

func GetGenesisKubernetesData(g *genesis.Genesis, clusterID string) (map[string][]string, error)

func GetGenesisPrometheusData

func GetGenesisPrometheusData(g *genesis.Genesis, clusterID string) ([]cloudmodel.PrometheusTarget, error)

func GetGenesisSyncData

func GetGenesisSyncData(g *genesis.Genesis) (genesis.GenesisSyncData, error)

func GetKubernetesGatherBasicInfos

func GetKubernetesGatherBasicInfos(lcuuid string, m *manager.Manager) (resp []kubernetes_gather_model.KubernetesGatherBasicInfo, err error)

func GetKubernetesGatherResources

func GetKubernetesGatherResources(lcuuid string, m *manager.Manager) (resp []kubernetes_gather_model.KubernetesGatherResource, err error)

func GetLeaderInfo

func GetLeaderInfo() (resp map[string]string, err error)

func GetMailServer

func GetMailServer(filter map[string]interface{}) (resp []model.MailServer, err error)

func GetPlugin

func GetPlugin(filter map[string]interface{}) ([]model.Plugin, error)

func GetRecorderCacheDiffBaseDataSet

func GetRecorderCacheDiffBaseDataSet(domainLcuuid, subDomainLcuuid string, m *manager.Manager) (resp diffbase.DataSet, err error)

func GetRecorderCacheToolDataSet

func GetRecorderCacheToolDataSet(domainLcuuid, subDomainLcuuid string, m *manager.Manager) (resp tool.DataSet, err error)

func GetRecorderDiffBaseByResourceLcuuid

func GetRecorderDiffBaseByResourceLcuuid(domainLcuuid, subDomainLcuuid, resourceType string, resourceLcuuid string, m *manager.Manager) (resp interface{}, err error)

func GetRecorderDiffBaseDataSetByResourceType

func GetRecorderDiffBaseDataSetByResourceType(domainLcuuid, subDomainLcuuid, resourceType string, m *manager.Manager) (resp map[string]interface{}, err error)

func GetRecorderDomainCache

func GetRecorderDomainCache(domainLcuuid, subDomainLcuuid string, m *manager.Manager) (resp cache.Cache, err error)

func GetRecorderToolMapByField

func GetRecorderToolMapByField(domainLcuuid, subDomainLcuuid, field string, m *manager.Manager) (resp map[interface{}]interface{}, err error)

func GetVTapGroupAdvancedConfig

func GetVTapGroupAdvancedConfig(lcuuid string) (string, error)

func GetVTapGroupAdvancedConfigs

func GetVTapGroupAdvancedConfigs() ([]string, error)

func GetVTapGroupConfigByFilter

func GetVTapGroupConfigByFilter(args map[string]string) (string, error)

func GetVTapGroupConfigs

func GetVTapGroupConfigs(filter map[string]interface{}) ([]*model.VTapGroupConfigurationResponse, error)

func GetVTapGroupDetailedConfig

func GetVTapGroupDetailedConfig(lcuuid string) (*model.DetailedConfig, error)

func GetVTapGroupExampleConfig

func GetVTapGroupExampleConfig() (string, error)

func GetVTapInterfaces

func GetVTapInterfaces(filter map[string]interface{}) (resp []model.VTapInterface, err error)

func GetVTapPortsCount

func GetVTapPortsCount() (int, error)

GetVTapPortsCount gets the number of virtual network cards covered by the deployed vtap, and virtual network type is VIF_DEVICE_TYPE_VM or VIF_DEVICE_TYPE_POD.

func GetVtapGroups

func GetVtapGroups(filter map[string]interface{}) (resp []model.VtapGroup, err error)

func GetVtapRepo

func GetVtapRepo(filter map[string]interface{}) ([]model.VtapRepo, error)

func GetVtaps

func GetVtaps(filter map[string]interface{}) (resp []model.Vtap, err error)

func IsVtapGroupShortUUID

func IsVtapGroupShortUUID(uuid string) bool

IsVtapGroupShortUUID checks uuid consists of numbers and English letters with g- prefix.

func UpdateAnalyzer

func UpdateAnalyzer(
	lcuuid string, analyzerUpdate map[string]interface{}, m *monitor.AnalyzerCheck,
	cfg *config.ControllerConfig,
) (resp *model.Analyzer, err error)

func UpdateController

func UpdateController(
	lcuuid string, controllerUpdate map[string]interface{}, m *monitor.ControllerCheck,
	cfg *config.ControllerConfig,
) (resp *model.Controller, err error)

func UpdateDataSource

func UpdateDataSource(lcuuid string, dataSourceUpdate model.DataSourceUpdate, cfg *config.ControllerConfig) (model.DataSource, error)

func UpdateMailServer

func UpdateMailServer(lcuuid string, mailServerUpdate map[string]interface{}) (model.MailServer, error)

func UpdateVTapGroupAdvancedConfig

func UpdateVTapGroupAdvancedConfig(lcuuid string, updateData *model.VTapGroupConfiguration) (string, error)

func UpdateVTapGroupConfig

func UpdateVTapGroupConfig(lcuuid string, updateData *model.VTapGroupConfiguration) (*mysql.VTapGroupConfiguration, error)

func UpdateVtap

func UpdateVtap(lcuuid, name string, vtapUpdate map[string]interface{}) (resp model.Vtap, err error)

func UpdateVtapGroup

func UpdateVtapGroup(lcuuid string, vtapGroupUpdate map[string]interface{}, cfg *config.ControllerConfig) (resp model.VtapGroup, err error)

func UpdateVtapLicenseType

func UpdateVtapLicenseType(lcuuid string, vtapUpdate map[string]interface{}) (resp model.Vtap, err error)

func VTapRebalance

func VTapRebalance(args map[string]interface{}, cfg config.IngesterLoadBalancingStrategy) (*model.VTapRebalanceResult, error)

Types

This section is empty.

Directories

Path Synopsis
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL