interfaces

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComplianceReport

type ComplianceReport struct {
	ReportID string `json:"reportId"`

	GeneratedAt time.Time `json:"generatedAt"`

	DeploymentID string `json:"deploymentId"`

	SLARequirements *SLARequirements `json:"slaRequirements"`

	ComplianceResult *ComplianceResult `json:"complianceResult"`

	Recommendations []string `json:"recommendations,omitempty"`

	NextReviewDate time.Time `json:"nextReviewDate"`
}

type ComplianceResult

type ComplianceResult struct {
	Overall string `json:"overall"` // Compliant, NonCompliant, Unknown

	Availability float64 `json:"availability"`

	ResponseTime time.Duration `json:"responseTime"`

	Throughput float64 `json:"throughput"`

	ErrorRate float64 `json:"errorRate"`

	Details json.RawMessage `json:"details"`

	Violations []ComplianceViolation `json:"violations,omitempty"`
}

type ComplianceViolation

type ComplianceViolation struct {
	Type string `json:"type"`

	Severity string `json:"severity"`

	Description string `json:"description"`

	Resource string `json:"resource,omitempty"`

	Value interface{} `json:"value"`

	Threshold interface{} `json:"threshold"`

	Timestamp time.Time `json:"timestamp"`
}

type ConfigMapKeySelector

type ConfigMapKeySelector struct {
	Name string `json:"name"`

	Key string `json:"key"`
}

type Controller

type Controller interface{}

Placeholder interfaces for module resolution

type CostComparison

type CostComparison struct {
	OriginalCost float64 `json:"originalCost"`

	OptimizedCost float64 `json:"optimizedCost"`

	SavingsAmount float64 `json:"savingsAmount"`

	SavingsPercent float64 `json:"savingsPercent"`
}

type CostEstimate

type CostEstimate struct {
	TotalCost float64 `json:"totalCost"`

	Currency string `json:"currency"`

	BillingPeriod string `json:"billingPeriod"`

	CostBreakdown map[string]float64 `json:"costBreakdown"`

	EstimationDate time.Time `json:"estimationDate"`
}

type Dependency

type Dependency struct {
	Name string `json:"name"`

	Type string `json:"type"`

	Version string `json:"version,omitempty"`

	Required bool `json:"required"`

	Metadata map[string]string `json:"metadata,omitempty"`
}

type DeploymentProgress

type DeploymentProgress struct {
	Status string `json:"status"`

	Progress float64 `json:"progress"` // 0-100

	DeployedResources []ResourceReference `json:"deployedResources"`

	FailedResources []ResourceReference `json:"failedResources"`

	Messages []string `json:"messages"`

	LastUpdate time.Time `json:"lastUpdate"`
}

type DeploymentReference

type DeploymentReference struct {
	Name string `json:"name"`

	Namespace string `json:"namespace"`

	Labels map[string]string `json:"labels,omitempty"`

	CommitHash string `json:"commitHash"`
}

type DeploymentVerifier

type DeploymentVerifier interface {
	PhaseController

	VerifyDeployment(ctx context.Context, deploymentRef *DeploymentReference) (*VerificationResult, error)

	ValidateResourceHealth(ctx context.Context, resources []ResourceReference) error

	CheckSLACompliance(ctx context.Context, slaRequirements *SLARequirements) (*ComplianceResult, error)

	GenerateComplianceReport(ctx context.Context, deploymentID string) (*ComplianceReport, error)
}

type EnvVar

type EnvVar struct {
	Name string `json:"name"`

	Value string `json:"value,omitempty"`

	ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
}

type EnvVarSource

type EnvVarSource struct {
	ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty"`

	SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"`

	FieldRef *FieldSelector `json:"fieldRef,omitempty"`
}

type FieldSelector

type FieldSelector struct {
	FieldPath string `json:"fieldPath"`
}

type GitCommitResult

type GitCommitResult struct {
	CommitHash string `json:"commitHash"`

	CommitMessage string `json:"commitMessage"`

	Branch string `json:"branch"`

	Repository string `json:"repository"`

	Files []string `json:"files"`

	Metadata json.RawMessage `json:"metadata,omitempty"`
}

type GitConflict

type GitConflict struct {
	File string `json:"file"`

	ConflictType string `json:"conflictType"`

	LocalContent string `json:"localContent"`

	RemoteContent string `json:"remoteContent"`

	Resolution string `json:"resolution,omitempty"`
}

type GitOpsManager

type GitOpsManager interface {
	PhaseController

	CommitManifests(ctx context.Context, manifests map[string]string, metadata map[string]interface{}) (*GitCommitResult, error)

	CreateNephioPackage(ctx context.Context, manifests map[string]string) (*NephioPackage, error)

	ResolveConflicts(ctx context.Context, conflicts []GitConflict) error

	TrackDeployment(ctx context.Context, commitHash string) (*DeploymentProgress, error)
}

type HealthStatus

type HealthStatus struct {
	Status string `json:"status"` // Healthy, Degraded, Unhealthy

	Message string `json:"message"`

	LastChecked time.Time `json:"lastChecked"`

	Metrics json.RawMessage `json:"metrics,omitempty"`
}

type IntentProcessor

type IntentProcessor interface {
	PhaseController

	ProcessIntent(ctx context.Context, intent *nephoranv1.NetworkIntent) (*ProcessingResult, error)

	ValidateIntent(ctx context.Context, intent string) error

	EnhanceWithRAG(ctx context.Context, intent string) (map[string]interface{}, error)

	GetSupportedIntentTypes() []string
}

type ManifestGenerator

type ManifestGenerator interface {
	PhaseController

	GenerateManifests(ctx context.Context, resourcePlan *ResourcePlan) (map[string]string, error)

	ValidateManifests(ctx context.Context, manifests map[string]string) error

	OptimizeManifests(ctx context.Context, manifests map[string]string) (map[string]string, error)

	GetSupportedTemplates() []string
}

type NephioPackage

type NephioPackage struct {
	Name string `json:"name"`

	Version string `json:"version"`

	Dependencies []string `json:"dependencies"`

	Manifests map[string]string `json:"manifests"`

	Metadata json.RawMessage `json:"metadata"`
}

type Optimization

type Optimization struct {
	Type string `json:"type"`

	Description string `json:"description"`

	Impact string `json:"impact"`

	Savings json.RawMessage `json:"savings,omitempty"`
}

type OptimizedPlan

type OptimizedPlan struct {
	OriginalPlan *ResourcePlan `json:"originalPlan"`

	OptimizedPlan *ResourcePlan `json:"optimizedPlan"`

	Optimizations []Optimization `json:"optimizations"`

	CostSavings *CostComparison `json:"costSavings,omitempty"`
}

type PhaseController

type PhaseController interface {
	ProcessPhase(ctx context.Context, intent *nephoranv1.NetworkIntent, phase ProcessingPhase) (ProcessingResult, error)

	GetPhaseStatus(ctx context.Context, intentID string) (*PhaseStatus, error)

	HandlePhaseError(ctx context.Context, intentID string, err error) error

	GetDependencies() []ProcessingPhase

	GetBlockedPhases() []ProcessingPhase

	SetupWithManager(mgr ctrl.Manager) error

	Start(ctx context.Context) error

	Stop(ctx context.Context) error

	GetHealthStatus(ctx context.Context) (HealthStatus, error)

	GetMetrics(ctx context.Context) (map[string]float64, error)
}

type PhaseMetrics

type PhaseMetrics struct {
	Duration time.Duration `json:"duration"`

	CPUUsage float64 `json:"cpuUsage"`

	MemoryUsage int64 `json:"memoryUsage"`

	APICallCount int `json:"apiCallCount"`

	ErrorCount int `json:"errorCount"`

	CustomMetrics map[string]float64 `json:"customMetrics,omitempty"`
}

type PhaseStatus

type PhaseStatus struct {
	Phase ProcessingPhase `json:"phase"`

	Status string `json:"status"` // Pending, InProgress, Completed, Failed

	StartTime *metav1.Time `json:"startTime,omitempty"`

	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	RetryCount int32 `json:"retryCount"`

	LastError string `json:"lastError,omitempty"`

	Metrics map[string]float64 `json:"metrics,omitempty"`

	DependsOn []ProcessingPhase `json:"dependsOn,omitempty"`

	BlockedBy []ProcessingPhase `json:"blockedBy,omitempty"`

	CreatedResources []ResourceReference `json:"createdResources,omitempty"`
}

type PlannedNetworkFunction

type PlannedNetworkFunction struct {
	Name string `json:"name"`

	Type string `json:"type"`

	Image string `json:"image"`

	Version string `json:"version"`

	Resources ResourceSpec `json:"resources"`

	Configuration json.RawMessage `json:"configuration"`

	Replicas int32 `json:"replicas"`

	Ports []PortSpec `json:"ports"`

	Environment []EnvVar `json:"environment,omitempty"`
}

type PortSpec

type PortSpec struct {
	Name string `json:"name"`

	Port int32 `json:"port"`

	TargetPort int32 `json:"targetPort,omitempty"`

	Protocol string `json:"protocol,omitempty"`

	ServiceType string `json:"serviceType,omitempty"`
}

type ProcessingContext

type ProcessingContext struct {
	IntentID string `json:"intentId"`

	CorrelationID string `json:"correlationId"`

	StartTime time.Time `json:"startTime"`

	CurrentPhase ProcessingPhase `json:"currentPhase"`

	IntentType string `json:"intentType"`

	OriginalIntent string `json:"originalIntent"`

	ExtractedEntities json.RawMessage `json:"extractedEntities,omitempty"`

	TelecomContext json.RawMessage `json:"telecomContext,omitempty"`

	LLMResponse json.RawMessage `json:"llmResponse,omitempty"`

	ResourcePlan json.RawMessage `json:"resourcePlan,omitempty"`

	GeneratedManifests map[string]string `json:"generatedManifests,omitempty"`

	GitCommitHash string `json:"gitCommitHash,omitempty"`

	DeploymentStatus json.RawMessage `json:"deploymentStatus,omitempty"`

	PhaseMetrics map[ProcessingPhase]PhaseMetrics `json:"phaseMetrics,omitempty"`

	TotalMetrics map[string]float64 `json:"totalMetrics,omitempty"`
}

type ProcessingEvent

type ProcessingEvent struct {
	Timestamp time.Time `json:"timestamp"`

	EventType string `json:"eventType"`

	Message string `json:"message"`

	Data json.RawMessage `json:"data,omitempty"`

	CorrelationID string `json:"correlationId"`
}

type ProcessingPhase

type ProcessingPhase string
const (
	PhaseIntentReceived ProcessingPhase = "IntentReceived"

	PhaseReceived ProcessingPhase = "Received" // Alias for PhaseIntentReceived

	PhaseLLMProcessing ProcessingPhase = "LLMProcessing"

	PhaseResourcePlanning ProcessingPhase = "ResourcePlanning"

	PhaseManifestGeneration ProcessingPhase = "ManifestGeneration"

	PhaseGitOpsCommit ProcessingPhase = "GitOpsCommit"

	PhaseDeploymentVerification ProcessingPhase = "DeploymentVerification"

	PhaseCompleted ProcessingPhase = "Completed"

	PhaseFailed ProcessingPhase = "Failed"
)

type ProcessingResult

type ProcessingResult struct {
	Success bool `json:"success"`

	NextPhase ProcessingPhase `json:"nextPhase,omitempty"`

	Data json.RawMessage `json:"data,omitempty"`

	Metrics map[string]float64 `json:"metrics,omitempty"`

	Events []ProcessingEvent `json:"events,omitempty"`

	RetryAfter *time.Duration `json:"retryAfter,omitempty"`

	ErrorMessage string `json:"errorMessage,omitempty"`

	ErrorCode string `json:"errorCode,omitempty"`
}

type Reconciler

type Reconciler interface{}

type ResourceConstraint

type ResourceConstraint struct {
	Type string `json:"type"`

	Resource string `json:"resource"`

	Operator string `json:"operator"`

	Value interface{} `json:"value"`

	Message string `json:"message,omitempty"`
}

type ResourcePlan

type ResourcePlan struct {
	NetworkFunctions []PlannedNetworkFunction `json:"networkFunctions"`

	ResourceRequirements ResourceRequirements `json:"resourceRequirements"`

	DeploymentPattern string `json:"deploymentPattern"`

	EstimatedCost *CostEstimate `json:"estimatedCost,omitempty"`

	Constraints []ResourceConstraint `json:"constraints,omitempty"`

	Dependencies []Dependency `json:"dependencies,omitempty"`
}

type ResourcePlanner

type ResourcePlanner interface {
	PhaseController

	PlanResources(ctx context.Context, llmResponse map[string]interface{}) (*ResourcePlan, error)

	OptimizeResourceAllocation(ctx context.Context, requirements *ResourceRequirements) (*OptimizedPlan, error)

	ValidateResourceConstraints(ctx context.Context, plan *ResourcePlan) error

	EstimateResourceCosts(ctx context.Context, plan *ResourcePlan) (*CostEstimate, error)
}

type ResourceReference

type ResourceReference struct {
	APIVersion string `json:"apiVersion"`

	Kind string `json:"kind"`

	Name string `json:"name"`

	Namespace string `json:"namespace,omitempty"`

	UID string `json:"uid,omitempty"`
}

type ResourceRequirements

type ResourceRequirements struct {
	CPU string `json:"cpu"`

	Memory string `json:"memory"`

	Storage string `json:"storage"`

	NetworkBandwidth string `json:"networkBandwidth,omitempty"`
}

type ResourceSpec

type ResourceSpec struct {
	Requests ResourceRequirements `json:"requests"`

	Limits ResourceRequirements `json:"limits"`
}

type SLARequirements

type SLARequirements struct {
	AvailabilityTarget float64 `json:"availabilityTarget"`

	ResponseTimeTarget time.Duration `json:"responseTimeTarget"`

	ThroughputTarget float64 `json:"throughputTarget"`

	ErrorRateTarget float64 `json:"errorRateTarget"`

	CustomMetrics map[string]float64 `json:"customMetrics,omitempty"`
}

type SecretKeySelector

type SecretKeySelector struct {
	Name string `json:"name"`

	Key string `json:"key"`
}

type VerificationResult

type VerificationResult struct {
	Success bool `json:"success"`

	HealthyResources []ResourceReference `json:"healthyResources"`

	UnhealthyResources []ResourceReference `json:"unhealthyResources"`

	Warnings []string `json:"warnings"`

	Errors []string `json:"errors"`

	SLACompliance *ComplianceResult `json:"slaCompliance,omitempty"`

	Timestamp time.Time `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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