genesis

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: 33 Imported by: 0

Documentation

Index

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 (g *Genesis) GetKubernetesResponse(clusterID string) (map[string][]string, error)

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

func (*Genesis) Start

func (g *Genesis) Start()

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 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 (*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 NewVpcPlatformDataOperation

func NewVpcPlatformDataOperation(dataList []model.GenesisVpc) *GenesisSyncTypeOperation[model.GenesisVpc]

func (*GenesisSyncTypeOperation[T]) Age

func (g *GenesisSyncTypeOperation[T]) Age(timestamp time.Time, timeout time.Duration) bool

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 (*SynchronizerServer) GenesisSharingSync

func (*SynchronizerServer) GenesisSync

func (*SynchronizerServer) GetAgentStats

func (g *SynchronizerServer) GetAgentStats(param string) []TridentStats

func (*SynchronizerServer) KubernetesAPISync

func (*SynchronizerServer) PrometheusAPISync

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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