api

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	NetworkTopologySourceLabelKey = "volcano.sh/network-topology-source"
	DefaultDiscoveryInterval      = time.Hour
)

Variables

This section is empty.

Functions

func RegisterDiscoverer

func RegisterDiscoverer(source string, constructor DiscovererConstructor)

RegisterDiscoverer registers a discoverer constructor for a given source

func RegisterDiscovererWithOptions added in v1.16.0

func RegisterDiscovererWithOptions(source string, constructor DiscovererOptionsConstructor)

RegisterDiscovererWithOptions registers a discoverer that reuses process-provided dependencies such as shared informers.

Types

type Credentials

type Credentials struct {
	SecretRef *SecretRef `json:"secretRef" yaml:"secretRef"`
}

Credentials specifies how to retrieve credentials

type Discoverer

type Discoverer interface {
	// Start begins the discovery process, sending discovered nodes through the provided channel
	Start() (chan []*topologyv1alpha1.HyperNode, error)

	// Stop halts the discovery process
	Stop() error

	// Name returns the discoverer identifier, this is used for labeling discovered hyperNodes for distinction.
	Name() string

	// ResultSynced the manager must call this method to notice the topology discovery results have been processed
	ResultSynced()
}

Discoverer is the interface for network topology discovery, every discoverer should implement this interface and return the discovered hyperNodes

func NewDiscoverer

func NewDiscoverer(cfg DiscoveryConfig, kubeClient clientset.Interface, vcClient vcclientset.Interface) (Discoverer, error)

NewDiscoverer creates a discoverer using the legacy client-only contract.

func NewDiscovererWithOptions added in v1.16.0

func NewDiscovererWithOptions(cfg DiscoveryConfig, options DiscovererOptions) (Discoverer, error)

NewDiscovererWithOptions creates a discoverer using process-provided dependencies.

type DiscovererConstructor

type DiscovererConstructor func(cfg DiscoveryConfig, kubeClient clientset.Interface, vcClient vcclientset.Interface) Discoverer

DiscovererConstructor creates a discoverer from configuration and clients. It is retained for compatibility with existing out-of-tree discoverers.

type DiscovererOptions added in v1.16.0

type DiscovererOptions struct {
	KubeClient        clientset.Interface
	VolcanoClient     vcclientset.Interface
	NodeInformer      coreinformerv1.NodeInformer
	HyperNodeInformer topologyinformerv1alpha1.HyperNodeInformer
}

DiscovererOptions contains the process-provided dependencies available to discoverers.

type DiscovererOptionsConstructor added in v1.16.0

type DiscovererOptionsConstructor func(cfg DiscoveryConfig, options DiscovererOptions) (Discoverer, error)

DiscovererOptionsConstructor creates a discoverer from configuration and process-provided dependencies, including shared informers.

type DiscoveryConfig

type DiscoveryConfig struct {
	// Source specifies the discover source (e.g., "ufm", "roce", etc.)
	Source string `json:"source" yaml:"source"`

	// Enabled determines if discovery for this source is active
	Enabled bool `json:"enabled" yaml:"enabled"`

	// Interval is the period between topology discovery operations
	// If not specified, DefaultDiscoveryInterval will be used
	Interval time.Duration `json:"interval" yaml:"interval"`

	// Credentials specifies the username/password to access the discovery source
	Credentials *Credentials `json:"credentials" yaml:"credentials"`

	// Config contains specific configuration parameters for each discovery source
	Config map[string]interface{} `json:"config" yaml:"config"`
}

DiscoveryConfig contains configuration for a specific discovery source

type NetworkTopologyConfig

type NetworkTopologyConfig struct {
	// NetworkTopologyDiscovery specifies the network topology to discover,
	// each discovery source has its own specific configuration
	NetworkTopologyDiscovery []DiscoveryConfig `json:"networkTopologyDiscovery" yaml:"networkTopologyDiscovery"`
}

NetworkTopologyConfig represents the configuration for network topology

func (*NetworkTopologyConfig) GetDiscoveryConfig

func (c *NetworkTopologyConfig) GetDiscoveryConfig(source string) *DiscoveryConfig

GetDiscoveryConfig returns the configuration for a specific discovery source Returns nil if the discovery source is not found or not enabled

func (*NetworkTopologyConfig) GetEnabledDiscoverySources

func (c *NetworkTopologyConfig) GetEnabledDiscoverySources() []string

GetEnabledDiscoverySources returns a list of enabled discovery sources

type SecretRef

type SecretRef struct {
	Name      string `json:"name" yaml:"name"`
	Namespace string `json:"namespace" yaml:"namespace"`
}

SecretRef refers to a secret containing sensitive information

Jump to

Keyboard shortcuts

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