genesis

package
v0.0.0-...-9634a1a Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 29 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() map[string]KubernetesInfo

func (*Genesis) GetKubernetesResponse

func (g *Genesis) GetKubernetesResponse(clusterID string) (map[string][]string, 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
	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) 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.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 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
	VtapID    uint32
	Epoch     time.Time
	Entries   []*messagecommon.KubernetesAPIInfo
}

type KubernetesResponse

type KubernetesResponse struct {
	ClusterID string
	ErrorMSG  string
	SyncedAt  time.Time
	Resources map[string][]string
}

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(k8sInfo KubernetesInfo)

func (*KubernetesStorage) Clear

func (k *KubernetesStorage) Clear()

func (*KubernetesStorage) Start

func (k *KubernetesStorage) Start()

func (*KubernetesStorage) Stop

func (k *KubernetesStorage) 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 queue.QueueWriter) *SynchronizerServer

func (*SynchronizerServer) GenesisSharingK8S

func (*SynchronizerServer) GenesisSharingSync

func (*SynchronizerServer) GenesisSync

func (*SynchronizerServer) GetAgentStats

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

func (*SynchronizerServer) KubernetesAPISync

type TridentStats

type TridentStats struct {
	VtapID                          uint32
	IP                              string
	Proxy                           string
	K8sVersion                      uint64
	SyncVersion                     uint64
	K8sLastSeen                     time.Time
	SyncLastSeen                    time.Time
	K8sClusterID                    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