Documentation ¶
Index ¶
- type Genesis
- func (g *Genesis) GetGenesisSyncData() GenesisSyncData
- func (g *Genesis) GetGenesisSyncResponse() (GenesisSyncData, error)
- func (g *Genesis) GetKubernetesData(clusterID string) (KubernetesInfo, bool)
- func (g *Genesis) GetKubernetesResponse(clusterID string) (map[string][]string, error)
- func (g *Genesis) GetPrometheusData(clusterID string) (PrometheusInfo, bool)
- func (g *Genesis) GetPrometheusResponse(clusterID string) ([]cloudmodel.PrometheusTarget, error)
- func (g *Genesis) GetStatter() statsd.StatsdStatter
- func (g *Genesis) Start()
- type GenesisSyncData
- type GenesisSyncDataOperation
- type GenesisSyncRpcUpdater
- func (v *GenesisSyncRpcUpdater) ParseHostAsVmPlatformInfo(info VIFRPCMessage, peer, natIP string, vtapID uint32) GenesisSyncDataOperation
- func (v *GenesisSyncRpcUpdater) ParseKVMPlatformInfo(info VIFRPCMessage, peer string, vtapID uint32) GenesisSyncDataOperation
- func (v *GenesisSyncRpcUpdater) ParseProcessInfo(info VIFRPCMessage, vtapID uint32) []model.GenesisProcess
- func (v *GenesisSyncRpcUpdater) ParseVIP(info VIFRPCMessage, vtapID uint32) []model.GenesisVIP
- func (v *GenesisSyncRpcUpdater) ParseVinterfaceInfo(info VIFRPCMessage, peer string, vtapID uint32, ...) []model.GenesisVinterface
- func (v *GenesisSyncRpcUpdater) Start()
- func (v *GenesisSyncRpcUpdater) Stop()
- func (v *GenesisSyncRpcUpdater) UnmarshalKubernetesProtobuf(info VIFRPCMessage) GenesisSyncDataOperation
- func (v *GenesisSyncRpcUpdater) UnmarshalProtobuf(info VIFRPCMessage) GenesisSyncDataOperation
- func (v *GenesisSyncRpcUpdater) UnmarshalWorkloadProtobuf(info VIFRPCMessage, tridentType string) GenesisSyncDataOperation
- type GenesisSyncTypeOperation
- func NewHostPlatformDataOperation(dataList []model.GenesisHost) *GenesisSyncTypeOperation[model.GenesisHost]
- func NewIPLastSeenPlatformDataOperation(dataList []model.GenesisIP) *GenesisSyncTypeOperation[model.GenesisIP]
- func NewLldpInfoPlatformDataOperation(dataList []model.GenesisLldp) *GenesisSyncTypeOperation[model.GenesisLldp]
- func NewNetworkPlatformDataOperation(dataList []model.GenesisNetwork) *GenesisSyncTypeOperation[model.GenesisNetwork]
- func NewPortPlatformDataOperation(dataList []model.GenesisPort) *GenesisSyncTypeOperation[model.GenesisPort]
- func NewProcessPlatformDataOperation(dataList []model.GenesisProcess) *GenesisSyncTypeOperation[model.GenesisProcess]
- func NewVIPPlatformDataOperation(dataList []model.GenesisVIP) *GenesisSyncTypeOperation[model.GenesisVIP]
- func NewVMPlatformDataOperation(dataList []model.GenesisVM) *GenesisSyncTypeOperation[model.GenesisVM]
- func NewVinterfacePlatformDataOperation(dataList []model.GenesisVinterface) *GenesisSyncTypeOperation[model.GenesisVinterface]
- func NewVpcPlatformDataOperation(dataList []model.GenesisVpc) *GenesisSyncTypeOperation[model.GenesisVpc]
- func (g *GenesisSyncTypeOperation[T]) Age(timestamp time.Time, timeout time.Duration) bool
- func (g *GenesisSyncTypeOperation[T]) Fetch() []T
- func (g *GenesisSyncTypeOperation[T]) Load(timestamp time.Time, timeout time.Duration)
- func (g *GenesisSyncTypeOperation[T]) Renew(other []T, timestamp time.Time)
- func (g *GenesisSyncTypeOperation[T]) Save()
- func (g *GenesisSyncTypeOperation[T]) Update(other []T, timestamp time.Time)
- type K8SRPCMessage
- type KubernetesInfo
- type KubernetesRpcUpdater
- type KubernetesStorage
- type PrometheusInfo
- type PrometheusMessage
- type PrometheusRpcUpdater
- type PrometheusStorage
- type SyncStorage
- type SynchronizerServer
- func (g *SynchronizerServer) GenesisSharingK8S(ctx context.Context, request *controller.GenesisSharingK8SRequest) (*controller.GenesisSharingK8SResponse, error)
- func (g *SynchronizerServer) GenesisSharingPrometheus(ctx context.Context, request *controller.GenesisSharingPrometheusRequest) (*controller.GenesisSharingPrometheusResponse, error)
- func (g *SynchronizerServer) GenesisSharingSync(ctx context.Context, request *controller.GenesisSharingSyncRequest) (*controller.GenesisSharingSyncResponse, error)
- func (g *SynchronizerServer) GenesisSync(ctx context.Context, request *trident.GenesisSyncRequest) (*trident.GenesisSyncResponse, error)
- func (g *SynchronizerServer) GetAgentStats(param string) []TridentStats
- func (g *SynchronizerServer) KubernetesAPISync(ctx context.Context, request *trident.KubernetesAPISyncRequest) (*trident.KubernetesAPISyncResponse, error)
- func (g *SynchronizerServer) PrometheusAPISync(ctx context.Context, request *trident.PrometheusAPISyncRequest) (*trident.PrometheusAPISyncResponse, error)
- type TridentStats
- type VIFRPCMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Genesis ¶
type Genesis struct {
// contains filtered or unexported fields
}
var GenesisService *Genesis
func NewGenesis ¶
func NewGenesis(cfg *config.ControllerConfig) *Genesis
func (*Genesis) GetGenesisSyncData ¶
func (g *Genesis) GetGenesisSyncData() GenesisSyncData
func (*Genesis) GetGenesisSyncResponse ¶
func (g *Genesis) GetGenesisSyncResponse() (GenesisSyncData, error)
func (*Genesis) GetKubernetesData ¶
func (g *Genesis) GetKubernetesData(clusterID string) (KubernetesInfo, bool)
func (*Genesis) GetKubernetesResponse ¶
func (*Genesis) GetPrometheusData ¶
func (g *Genesis) GetPrometheusData(clusterID string) (PrometheusInfo, bool)
func (*Genesis) GetPrometheusResponse ¶
func (g *Genesis) GetPrometheusResponse(clusterID string) ([]cloudmodel.PrometheusTarget, error)
func (*Genesis) GetStatter ¶
func (g *Genesis) GetStatter() statsd.StatsdStatter
type GenesisSyncData ¶
type GenesisSyncData struct { IPLastSeens []model.GenesisIP VIPs []model.GenesisVIP VMs []model.GenesisVM VPCs []model.GenesisVpc Hosts []model.GenesisHost Lldps []model.GenesisLldp Ports []model.GenesisPort Networks []model.GenesisNetwork Vinterfaces []model.GenesisVinterface Processes []model.GenesisProcess }
type GenesisSyncDataOperation ¶
type GenesisSyncDataOperation struct { IPlastseens *GenesisSyncTypeOperation[model.GenesisIP] VIPs *GenesisSyncTypeOperation[model.GenesisVIP] VMs *GenesisSyncTypeOperation[model.GenesisVM] VPCs *GenesisSyncTypeOperation[model.GenesisVpc] Hosts *GenesisSyncTypeOperation[model.GenesisHost] Lldps *GenesisSyncTypeOperation[model.GenesisLldp] Ports *GenesisSyncTypeOperation[model.GenesisPort] Networks *GenesisSyncTypeOperation[model.GenesisNetwork] Vinterfaces *GenesisSyncTypeOperation[model.GenesisVinterface] Processes *GenesisSyncTypeOperation[model.GenesisProcess] }
type GenesisSyncRpcUpdater ¶
type GenesisSyncRpcUpdater struct {
// contains filtered or unexported fields
}
func NewGenesisSyncRpcUpdater ¶
func NewGenesisSyncRpcUpdater(storage *SyncStorage, queue queue.QueueReader, cfg config.GenesisConfig, ctx context.Context) *GenesisSyncRpcUpdater
func (*GenesisSyncRpcUpdater) ParseHostAsVmPlatformInfo ¶
func (v *GenesisSyncRpcUpdater) ParseHostAsVmPlatformInfo(info VIFRPCMessage, peer, natIP string, vtapID uint32) GenesisSyncDataOperation
func (*GenesisSyncRpcUpdater) ParseKVMPlatformInfo ¶
func (v *GenesisSyncRpcUpdater) ParseKVMPlatformInfo(info VIFRPCMessage, peer string, vtapID uint32) GenesisSyncDataOperation
func (*GenesisSyncRpcUpdater) ParseProcessInfo ¶
func (v *GenesisSyncRpcUpdater) ParseProcessInfo(info VIFRPCMessage, vtapID uint32) []model.GenesisProcess
func (*GenesisSyncRpcUpdater) ParseVIP ¶
func (v *GenesisSyncRpcUpdater) ParseVIP(info VIFRPCMessage, vtapID uint32) []model.GenesisVIP
func (*GenesisSyncRpcUpdater) ParseVinterfaceInfo ¶
func (v *GenesisSyncRpcUpdater) ParseVinterfaceInfo(info VIFRPCMessage, peer string, vtapID uint32, k8sClusterID, deviceType string) []model.GenesisVinterface
func (*GenesisSyncRpcUpdater) Start ¶
func (v *GenesisSyncRpcUpdater) Start()
func (*GenesisSyncRpcUpdater) Stop ¶
func (v *GenesisSyncRpcUpdater) Stop()
func (*GenesisSyncRpcUpdater) UnmarshalKubernetesProtobuf ¶
func (v *GenesisSyncRpcUpdater) UnmarshalKubernetesProtobuf(info VIFRPCMessage) GenesisSyncDataOperation
func (*GenesisSyncRpcUpdater) UnmarshalProtobuf ¶
func (v *GenesisSyncRpcUpdater) UnmarshalProtobuf(info VIFRPCMessage) GenesisSyncDataOperation
func (*GenesisSyncRpcUpdater) UnmarshalWorkloadProtobuf ¶
func (v *GenesisSyncRpcUpdater) UnmarshalWorkloadProtobuf(info VIFRPCMessage, tridentType string) GenesisSyncDataOperation
type GenesisSyncTypeOperation ¶
type GenesisSyncTypeOperation[T model.GenesisVinterface | model.GenesisVpc | model.GenesisHost | model.GenesisVM | model.GenesisVIP | model.GenesisNetwork | model.GenesisPort | model.GenesisLldp | model.GenesisIP | model.GenesisProcess] struct { // contains filtered or unexported fields }
func NewHostPlatformDataOperation ¶
func NewHostPlatformDataOperation(dataList []model.GenesisHost) *GenesisSyncTypeOperation[model.GenesisHost]
func NewIPLastSeenPlatformDataOperation ¶
func NewIPLastSeenPlatformDataOperation(dataList []model.GenesisIP) *GenesisSyncTypeOperation[model.GenesisIP]
func NewLldpInfoPlatformDataOperation ¶
func NewLldpInfoPlatformDataOperation(dataList []model.GenesisLldp) *GenesisSyncTypeOperation[model.GenesisLldp]
func NewNetworkPlatformDataOperation ¶
func NewNetworkPlatformDataOperation(dataList []model.GenesisNetwork) *GenesisSyncTypeOperation[model.GenesisNetwork]
func NewPortPlatformDataOperation ¶
func NewPortPlatformDataOperation(dataList []model.GenesisPort) *GenesisSyncTypeOperation[model.GenesisPort]
func NewProcessPlatformDataOperation ¶
func NewProcessPlatformDataOperation(dataList []model.GenesisProcess) *GenesisSyncTypeOperation[model.GenesisProcess]
func NewVIPPlatformDataOperation ¶
func NewVIPPlatformDataOperation(dataList []model.GenesisVIP) *GenesisSyncTypeOperation[model.GenesisVIP]
func NewVMPlatformDataOperation ¶
func NewVMPlatformDataOperation(dataList []model.GenesisVM) *GenesisSyncTypeOperation[model.GenesisVM]
func NewVinterfacePlatformDataOperation ¶
func NewVinterfacePlatformDataOperation(dataList []model.GenesisVinterface) *GenesisSyncTypeOperation[model.GenesisVinterface]
func NewVpcPlatformDataOperation ¶
func NewVpcPlatformDataOperation(dataList []model.GenesisVpc) *GenesisSyncTypeOperation[model.GenesisVpc]
func (*GenesisSyncTypeOperation[T]) Fetch ¶
func (g *GenesisSyncTypeOperation[T]) Fetch() []T
func (*GenesisSyncTypeOperation[T]) Load ¶
func (g *GenesisSyncTypeOperation[T]) Load(timestamp time.Time, timeout time.Duration)
func (*GenesisSyncTypeOperation[T]) Renew ¶
func (g *GenesisSyncTypeOperation[T]) Renew(other []T, timestamp time.Time)
func (*GenesisSyncTypeOperation[T]) Save ¶
func (g *GenesisSyncTypeOperation[T]) Save()
func (*GenesisSyncTypeOperation[T]) Update ¶
func (g *GenesisSyncTypeOperation[T]) Update(other []T, timestamp time.Time)
type K8SRPCMessage ¶
type K8SRPCMessage struct {
// contains filtered or unexported fields
}
type KubernetesInfo ¶
type KubernetesInfo struct { ClusterID string ErrorMSG string Version uint64 Epoch time.Time Entries []*messagecommon.KubernetesAPIInfo }
type KubernetesRpcUpdater ¶
type KubernetesRpcUpdater struct {
// contains filtered or unexported fields
}
func NewKubernetesRpcUpdater ¶
func NewKubernetesRpcUpdater(storage *KubernetesStorage, queue queue.QueueReader, ctx context.Context) *KubernetesRpcUpdater
func (*KubernetesRpcUpdater) Start ¶
func (k *KubernetesRpcUpdater) Start()
func (*KubernetesRpcUpdater) Stop ¶
func (k *KubernetesRpcUpdater) Stop()
type KubernetesStorage ¶
type KubernetesStorage struct {
// contains filtered or unexported fields
}
func NewKubernetesStorage ¶
func NewKubernetesStorage(cfg config.GenesisConfig, kChan chan map[string]KubernetesInfo, ctx context.Context) *KubernetesStorage
func (*KubernetesStorage) Add ¶
func (k *KubernetesStorage) Add(newInfo KubernetesInfo)
func (*KubernetesStorage) Clear ¶
func (k *KubernetesStorage) Clear()
func (*KubernetesStorage) Start ¶
func (k *KubernetesStorage) Start()
func (*KubernetesStorage) Stop ¶
func (k *KubernetesStorage) Stop()
type PrometheusInfo ¶
type PrometheusInfo struct { ClusterID string ErrorMSG string Epoch time.Time Entries []cloudmodel.PrometheusTarget }
type PrometheusMessage ¶
type PrometheusMessage struct {
// contains filtered or unexported fields
}
type PrometheusRpcUpdater ¶
type PrometheusRpcUpdater struct {
// contains filtered or unexported fields
}
func NewPrometheuspInfoRpcUpdater ¶
func NewPrometheuspInfoRpcUpdater(storage *PrometheusStorage, queue queue.QueueReader, ctx context.Context) *PrometheusRpcUpdater
func (*PrometheusRpcUpdater) ParsePrometheusEntries ¶
func (p *PrometheusRpcUpdater) ParsePrometheusEntries(info PrometheusMessage) ([]cloudmodel.PrometheusTarget, error)
func (*PrometheusRpcUpdater) Start ¶
func (p *PrometheusRpcUpdater) Start()
func (*PrometheusRpcUpdater) Stop ¶
func (p *PrometheusRpcUpdater) Stop()
type PrometheusStorage ¶
type PrometheusStorage struct {
// contains filtered or unexported fields
}
func NewPrometheusStorage ¶
func NewPrometheusStorage(cfg config.GenesisConfig, pChan chan map[string]PrometheusInfo, ctx context.Context) *PrometheusStorage
func (*PrometheusStorage) Add ¶
func (p *PrometheusStorage) Add(isUpdate bool, newInfo PrometheusInfo)
func (*PrometheusStorage) Clear ¶
func (p *PrometheusStorage) Clear()
func (*PrometheusStorage) Start ¶
func (p *PrometheusStorage) Start()
func (*PrometheusStorage) Stop ¶
func (p *PrometheusStorage) Stop()
type SyncStorage ¶
type SyncStorage struct {
// contains filtered or unexported fields
}
func NewSyncStorage ¶
func NewSyncStorage(cfg config.GenesisConfig, sChan chan GenesisSyncData, ctx context.Context) *SyncStorage
func (*SyncStorage) Renew ¶
func (s *SyncStorage) Renew(data GenesisSyncDataOperation)
func (*SyncStorage) Start ¶
func (s *SyncStorage) Start()
func (*SyncStorage) Stop ¶
func (s *SyncStorage) Stop()
func (*SyncStorage) Update ¶
func (s *SyncStorage) Update(data GenesisSyncDataOperation, vtapID uint32)
type SynchronizerServer ¶
type SynchronizerServer struct {
// contains filtered or unexported fields
}
var Synchronizer *SynchronizerServer
func NewGenesisSynchronizerServer ¶
func NewGenesisSynchronizerServer(cfg config.GenesisConfig, genesisSyncQueue, k8sQueue, prometheusQueue queue.QueueWriter) *SynchronizerServer
func (*SynchronizerServer) GenesisSharingK8S ¶
func (g *SynchronizerServer) GenesisSharingK8S(ctx context.Context, request *controller.GenesisSharingK8SRequest) (*controller.GenesisSharingK8SResponse, error)
func (*SynchronizerServer) GenesisSharingPrometheus ¶
func (g *SynchronizerServer) GenesisSharingPrometheus(ctx context.Context, request *controller.GenesisSharingPrometheusRequest) (*controller.GenesisSharingPrometheusResponse, error)
func (*SynchronizerServer) GenesisSharingSync ¶
func (g *SynchronizerServer) GenesisSharingSync(ctx context.Context, request *controller.GenesisSharingSyncRequest) (*controller.GenesisSharingSyncResponse, error)
func (*SynchronizerServer) GenesisSync ¶
func (g *SynchronizerServer) GenesisSync(ctx context.Context, request *trident.GenesisSyncRequest) (*trident.GenesisSyncResponse, error)
func (*SynchronizerServer) GetAgentStats ¶
func (g *SynchronizerServer) GetAgentStats(param string) []TridentStats
func (*SynchronizerServer) KubernetesAPISync ¶
func (g *SynchronizerServer) KubernetesAPISync(ctx context.Context, request *trident.KubernetesAPISyncRequest) (*trident.KubernetesAPISyncResponse, error)
func (*SynchronizerServer) PrometheusAPISync ¶
func (g *SynchronizerServer) PrometheusAPISync(ctx context.Context, request *trident.PrometheusAPISyncRequest) (*trident.PrometheusAPISyncResponse, error)
type TridentStats ¶
type TridentStats struct { VtapID uint32 IP string Proxy string K8sVersion uint64 SyncVersion uint64 PrometheusVersion uint64 K8sLastSeen time.Time SyncLastSeen time.Time PrometheusLastSeen time.Time K8sClusterID string PrometheusClusterID string SyncTridentType tridentcommon.TridentType GenesisSyncDataOperation *trident.GenesisPlatformData GenesisSyncProcessDataOperation *trident.GenesisProcessData }
type VIFRPCMessage ¶
type VIFRPCMessage struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.