gpic

package
v0.0.0-...-bb2f907 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameClusterSelector  = ClusterSelector("name")
	LabelClusterSelector = ClusterSelector("label")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllOf

type AllOf struct {
	ProviderName     string  `json:"clusterProvider,omitempty"`
	ClusterName      string  `json:"cluster,omitempty"`
	ClusterLabelName string  `json:"clusterLabel,omitempty"`
	AnyOfArray       []AnyOf `json:"anyOf,omitempty"`
}

AllOf consists if ProviderName, ClusterName, ClusterLabelName and AnyOfArray. Any of them can be empty

type AnyOf

type AnyOf struct {
	ProviderName     string `json:"clusterProvider,omitempty"`
	ClusterName      string `json:"cluster,omitempty"`
	ClusterLabelName string `json:"clusterLabel,omitempty"`
}

AnyOf consists of Array of ProviderName & ClusterLabelNames

type ClusterGroup

type ClusterGroup struct {
	Clusters    []ClusterWithName
	GroupNumber string
}

ClusterGroup consists of Clusters and GroupNumber. All the clusters under the same clusterGroup belong to the same groupNumber

type ClusterList

type ClusterList struct {
	MandatoryClusters []ClusterGroup
	OptionalClusters  []ClusterGroup
}

ClusterList consists of mandatoryClusters and OptionalClusters

func IntentResolver

func IntentResolver(intent IntentStruc) (ClusterList, error)

IntentResolver shall help to resolve the given intent into 2 lists of clusters where the app need to be deployed.

type ClusterSelector

type ClusterSelector string

type ClusterWithLabel

type ClusterWithLabel struct {
	ProviderName string
	ClusterLabel string
}

ClusterWithLabel has two fields - ProviderName and ClusterLabel

type ClusterWithName

type ClusterWithName struct {
	ProviderName string
	ClusterName  string
}

ClusterWithName has two fields - ProviderName and ClusterName

type IntentStruc

type IntentStruc struct {
	Selector   ClusterSelector `json:"selector,omitempty"`
	AllOfArray []AllOf         `json:"allOf,omitempty"`
	AnyOfArray []AnyOf         `json:"anyOf,omitempty"`
}

IntentStruc consists of AllOfArray and AnyOfArray

Jump to

Keyboard shortcuts

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