Documentation
¶
Index ¶
- type CpuFmt
- type Gvc
- type GvcConfig
- type GvcConfigCapacityAi
- type GvcConfigClusterEntry
- type GvcConfigClusters
- type GvcConfigPreferredClusterEntry
- type GvcConfigPreferredClusters
- type GvcConfigProxy
- type GvcLoadBalancerConfig
- type GvcLoadBalancerProbe
- type GvcSpec
- type GvcSpecEndpointNamingFormat
- type GvcSpecKeda
- type GvcSpecLoadBalancer
- type GvcSpecLoadBalancerMultiZone
- type GvcSpecLoadBalancerRedirect
- type GvcSpecLoadBalancerRedirectClass
- type GvcSpecSidecar
- type GvcStatus
- type GvcTags
- type IdentityLink
- type IpSetLink
- type LocationLink
- type LocationLinkSet
- type LocationOptions
- type LocationOptionsItem
- type MemFmt
- type SecretLink
- type SecretLinkSet
- type StaticPlacement
- type WorkloadLink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CpuFmt ¶
type CpuFmt string
CpuFmt is a cpu-quantity string (pattern=cpuFmt). The field's max/default tags apply on top.
func (CpuFmt) ValidationRule ¶
type Gvc ¶
type Gvc struct {
Id string `json:"id,omitzero" validate:"uuid,readOnly"`
Name base.Name `json:"name,omitzero"`
Kind base.Kind `json:"kind,omitzero"`
Version *float64 `json:"version,omitzero" validate:"positive,integer,readOnly"`
Description string `json:"description,omitzero" validate:"trim,max=250,allow="`
Tags GvcTags `json:"tags,omitzero" validate:"default={}"`
Created string `json:"created,omitzero" validate:"date,readOnly"`
LastModified string `json:"lastModified,omitzero" validate:"date,readOnly"`
Links base.Links `json:"links,omitzero" validate:"readOnly"`
Alias string `json:"alias,omitzero" validate:"optional,readOnly"`
Spec *GvcSpec `json:"spec,omitzero"`
Status *GvcStatus `json:"status,omitzero"`
}
type GvcConfig ¶
type GvcConfig struct {
Clusters GvcConfigClusters `json:"clusters,omitzero"`
PreferredClusters GvcConfigPreferredClusters `json:"preferredClusters,omitzero"`
Proxy *GvcConfigProxy `json:"proxy,omitzero" validate:"optional"`
LoadBalancer *GvcLoadBalancerConfig `json:"loadBalancer,omitzero" validate:"optional"`
ThinProvision *float64 `json:"thinProvision,omitzero" validate:"min=0.01,max=1.0"`
LargeDiskSize MemFmt `json:"largeDiskSize,omitzero" validate:"max=20"`
CapacityAI *GvcConfigCapacityAi `json:"capacityAI,omitzero"`
Spire *bool `json:"spire,omitzero"`
}
func (GvcConfig) ValidationRule ¶
ValidationRule reflects GvcConfig and layers the POST-only `spire` default (gvc.ts:242).
type GvcConfigCapacityAi ¶
type GvcConfigCapacityAi struct {
MemToCpuRatio *float64 `json:"memToCpuRatio,omitzero" validate:"integer,min=1,max=10"`
}
type GvcConfigClusterEntry ¶
type GvcConfigClusters ¶
type GvcConfigClusters map[string]GvcConfigClusterEntry
type GvcConfigPreferredClusterEntry ¶
type GvcConfigPreferredClusterEntry struct {
ClusterId string `json:"clusterId,omitzero"`
}
type GvcConfigPreferredClusters ¶
type GvcConfigPreferredClusters map[string]GvcConfigPreferredClusterEntry
type GvcConfigProxy ¶
type GvcConfigProxy struct {
MinCpu *float64 `json:"minCpu,omitzero" validate:"min=0,max=1000,optional"`
}
type GvcLoadBalancerConfig ¶
type GvcLoadBalancerConfig struct {
// Retired (master 54353d516): still validated, then stripped, so stored configs keep
// validating and the key is never written back or echoed.
DistributedIngress *bool `json:"distributedIngress,omitzero" validate:"strip"`
DeploymentCount *float64 `json:"deploymentCount,omitzero" validate:"integer,min=1,max=10,optional"`
MinScale *float64 `json:"minScale,omitzero" validate:"integer,min=2,default=2"`
MaxScale *float64 `json:"maxScale,omitzero" validate:"integer,min=2,default=10"`
MinCpu CpuFmt `json:"minCpu,omitzero" validate:"max=20,default=100m"`
MinMemory MemFmt `json:"minMemory,omitzero" validate:"max=20,default=500Mi"`
ReadinessProbe *GvcLoadBalancerProbe `json:"readinessProbe,omitzero" validate:"optional"`
LivenessProbe *GvcLoadBalancerProbe `json:"livenessProbe,omitzero" validate:"optional"`
}
GvcLoadBalancerConfig ports gvc.ts:190. gvcLbScaleRefine enforces minScale<=maxScale.
func (GvcLoadBalancerConfig) ValidationRule ¶
func (GvcLoadBalancerConfig) ValidationRule() *validate.Rule
ValidationRule reflects GvcLoadBalancerConfig and layers the minScale<=maxScale cross-field check (gvc.ts:190 .custom).
type GvcLoadBalancerProbe ¶
type GvcLoadBalancerProbe struct {
TimeoutSeconds *float64 `json:"timeoutSeconds,omitzero" validate:"integer,min=1,max=60"`
FailureThreshold *float64 `json:"failureThreshold,omitzero" validate:"integer,min=1,max=10"`
SuccessThreshold *float64 `json:"successThreshold,omitzero" validate:"integer,min=1,max=10"`
}
type GvcSpec ¶
type GvcSpec struct {
StaticPlacement *StaticPlacement `json:"staticPlacement,omitzero"`
PullSecretLinks SecretLinkSet `json:"pullSecretLinks,omitzero" validate:"sort"`
Domain string `json:"domain,omitzero" validate:"domaintlds,optional"`
EndpointNamingFormat GvcSpecEndpointNamingFormat `json:"endpointNamingFormat,omitzero" validate:"valid=default|legacy|org"`
AliasWorkloadLink WorkloadLink `json:"aliasWorkloadLink,omitzero" validate:"optional"`
Tracing *tracing.Tracing `json:"tracing,omitzero"`
Sidecar *GvcSpecSidecar `json:"sidecar,omitzero"`
Env env.EnvCollection `json:"env,omitzero" validate:"optional"`
LoadBalancer *GvcSpecLoadBalancer `json:"loadBalancer,omitzero"`
Keda *GvcSpecKeda `json:"keda,omitzero"`
}
func (GvcSpec) ValidationRule ¶
ValidationRule reflects GvcSpec and layers the endpointNamingFormat POST default (gvc.ts:98 — on POST, if unset, default to 'org').
type GvcSpecEndpointNamingFormat ¶
type GvcSpecEndpointNamingFormat string
const ( GvcSpecEndpointNamingFormatDefault GvcSpecEndpointNamingFormat = "default" GvcSpecEndpointNamingFormatLegacy GvcSpecEndpointNamingFormat = "legacy" GvcSpecEndpointNamingFormatOrg GvcSpecEndpointNamingFormat = "org" )
type GvcSpecKeda ¶
type GvcSpecKeda struct {
Enabled *bool `json:"enabled,omitzero" validate:"default=false"`
IdentityLink IdentityLink `json:"identityLink,omitzero" validate:"optional"`
Secrets SecretLinkSet `json:"secrets,omitzero" validate:"sort"`
}
type GvcSpecLoadBalancer ¶
type GvcSpecLoadBalancer struct {
Dedicated *bool `json:"dedicated,omitzero"`
MultiZone *GvcSpecLoadBalancerMultiZone `json:"multiZone,omitzero" validate:"optional"`
TrustedProxies *float64 `json:"trustedProxies,omitzero" validate:"integer,min=0,max=2,default=0"`
Redirect *GvcSpecLoadBalancerRedirect `json:"redirect,omitzero" validate:"optional"`
IpSet IpSetLink `json:"ipSet,omitzero" validate:"optional"`
}
type GvcSpecLoadBalancerMultiZone ¶
type GvcSpecLoadBalancerMultiZone struct {
Enabled *bool `json:"enabled,omitzero" validate:"default=false,optional"`
}
type GvcSpecLoadBalancerRedirect ¶
type GvcSpecLoadBalancerRedirect struct {
Class *GvcSpecLoadBalancerRedirectClass `json:"class,omitzero" validate:"optional"`
}
type GvcSpecSidecar ¶
type GvcSpecSidecar struct {
Envoy *envoy.EnvoyFilters `json:"envoy,omitzero"`
}
type IdentityLink ¶
type IdentityLink string
func (IdentityLink) ValidationRule ¶
func (IdentityLink) ValidationRule() *validate.Rule
ValidationRule ports LocalLink().custom(toKind("identity")): a localLink pointing to a resource of kind identity.
type IpSetLink ¶
type IpSetLink string
IpSetLink / IdentityLink / WorkloadLink are localLink leaf types carrying their kind check via the Validator interface (were localLink field tags).
func (IpSetLink) ValidationRule ¶
ValidationRule ports LocalLink().custom(toKind("ipset")): a localLink pointing to a resource of kind ipset.
type LocationLink ¶
type LocationLink string
LocationLink / SecretLink are localLink leaf types (validate.go) so they can appear as slice elements (which cannot carry field tags).
func (LocationLink) ValidationRule ¶
func (LocationLink) ValidationRule() *validate.Rule
ValidationRule ports LocalLink().custom(toKind("location")): a localLink pointing to a resource of kind location.
type LocationLinkSet ¶
type LocationLinkSet []LocationLink
LocationLinkSet is a slice of location links deduplicated by value (was custom=dedupeEmpty). The `sort` tag on the field applies on top.
func (LocationLinkSet) ValidationRule ¶
func (LocationLinkSet) ValidationRule() *validate.Rule
type LocationOptions ¶ added in v1.1.9
type LocationOptions []LocationOptionsItem //ts:export
func (LocationOptions) ValidationRule ¶
func (LocationOptions) ValidationRule() *validate.Rule
ValidationRule ports LocationOptionsRule (gvc.ts:40): the array deduplicated by each item's locationLink field (was custom=dedupeLocationLink).
type LocationOptionsItem ¶ added in v1.1.9
type LocationOptionsItem struct {
LocationLink LocationLink `json:"locationLink" validate:"required"`
RoutingTier *float64 `json:"routingTier,omitzero" validate:"integer,min=0,optional"`
LatencyOffsetMs *float64 `json:"latencyOffsetMs,omitzero" validate:"integer,optional"`
LatencyToleranceMs *float64 `json:"latencyToleranceMs,omitzero" validate:"integer,min=0,optional"`
}
type MemFmt ¶
type MemFmt string
MemFmt is a memory-quantity string (pattern=memFmt) whose unit casing is normalised (custom=memNormalize). The field's max/default tags apply on top.
func (MemFmt) ValidationRule ¶
type SecretLink ¶
type SecretLink string
func (SecretLink) ValidationRule ¶
func (SecretLink) ValidationRule() *validate.Rule
ValidationRule ports LocalLink().custom(toKind("secret")): a localLink pointing to a resource of kind secret.
type SecretLinkSet ¶
type SecretLinkSet []SecretLink
SecretLinkSet is a slice of secret links deduplicated by value (was custom=dedupeEmpty). The `sort` tag on the field applies on top.
func (SecretLinkSet) ValidationRule ¶
func (SecretLinkSet) ValidationRule() *validate.Rule
type StaticPlacement ¶
type StaticPlacement struct {
LocationLinks LocationLinkSet `json:"locationLinks,omitzero" validate:"sort"`
LocationQuery *query.Query `json:"locationQuery,omitzero"`
LocationOptions LocationOptions `json:"locationOptions,omitzero" validate:"optional"`
}
type WorkloadLink ¶
type WorkloadLink string
func (WorkloadLink) ValidationRule ¶
func (WorkloadLink) ValidationRule() *validate.Rule
ValidationRule ports LocalLink().custom(toKind("workload")): a localLink pointing to a resource of kind workload.