discoveryrule

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRegex added in v0.0.47

func ApplyRegex(pattern string, value string) (string, error)

func GnmiPathToXPath added in v0.0.47

func GnmiPathToXPath(p *gnmi.Path, noKeys bool) string

GnmiPathToXPath is absed on gnmic but also strips the json_ietf metadata

func RunStarlark added in v0.0.47

func RunStarlark(key, script, value string) (string, error)

RunStarlark executes a Starlark script with the given value.

Types

type Discoverer added in v0.0.47

type Discoverer struct {
	Provider            string
	DiscoveryParameters invv1alpha1.GnmiDiscoveryVendorProfileParameters
}

func (*Discoverer) Discover added in v0.0.47

func (*Discoverer) GetProvider added in v0.0.47

func (r *Discoverer) GetProvider() string

type DiscoveryProfile

type DiscoveryProfile struct {
	Secret                   string
	SecretResourceVersion    string // used to validate a profile change
	TLSSecret                string
	TLSSecretResourceVersion string // used to validate a profile change
	Connectionprofiles       []*invv1alpha1.TargetConnectionProfile
}

type DiscoveryRule

type DiscoveryRule interface {
	Run(ctx context.Context) error
	Stop(ctx context.Context)
	GetDiscoveryRulConfig() *DiscoveryRuleConfig
}

func New

type DiscoveryRuleConfig

type DiscoveryRuleConfig struct {
	// Discovery defines if discovery is enabled or disabled
	Discovery bool
	// Default Schema is the default schema
	DefaultSchema *invv1alpha1.SchemaKey
	// CR that owns the discovery Rule
	CR invv1alpha1.DiscoveryObject
	// Selector for Pod/SVC
	//Selector labels.Selector
	// Prefixes used to discover/connect to the target
	//Prefixes []invv1alpha1.DiscoveryRulePrefix
	// DiscoveryProfile contains the profile data from the k8s api-server
	DiscoveryProfile *DiscoveryProfile
	// ConnectivityProfile contains the profile data from the k8s api-server
	TargetConnectionProfiles []TargetConnectionProfile
	// TargetTemplate defines the template to expand the target
	TargetTemplate *invv1alpha1.TargetTemplate
}

type Iterator

type Iterator interface {
	Next() (*hostInfo, bool)
}

type Key

type Key struct {
	APIVersion string
	Kind       string
	Namespace  string
	Name       string
}

func GetKey

func GetKey(s string) Key

func (Key) String

func (r Key) String() string

type TargetConnectionProfile

type TargetConnectionProfile struct {
	Secret                   string
	SecretResourceVersion    string // used to validate a profile change + provide the version to the target if provisioned
	TLSSecret                string
	TLSSecretResourceVersion string // used to validate a profile change + provide the version to the target if provisioned
	Connectionprofile        *invv1alpha1.TargetConnectionProfile
	Syncprofile              *invv1alpha1.TargetSyncProfile
}

Jump to

Keyboard shortcuts

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