gvc

package
v1.1.68-test Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 8 Imported by: 1 module, 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

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

func (CpuFmt) ValidationRule() *validate.Rule

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"`
}

func (Gvc) ValidationRule

func (Gvc) ValidationRule() *validate.Rule

ValidationRule reflects Gvc.

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

func (GvcConfig) ValidationRule() *validate.Rule

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 GvcConfigClusterEntry struct {
	ClusterId string `json:"clusterId,omitzero"`
	Since     string `json:"since,omitzero" validate:"date"`
}

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

func (GvcSpec) ValidationRule() *validate.Rule

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 GvcSpecLoadBalancerRedirectClass

type GvcSpecLoadBalancerRedirectClass struct {
	Status5xx string `json:"status5xx,omitzero" validate:"uri,optional"`
	Status401 string `json:"status401,omitzero" validate:"optional"`
}

type GvcSpecSidecar

type GvcSpecSidecar struct {
	Envoy *envoy.EnvoyFilters `json:"envoy,omitzero"`
}

type GvcStatus

type GvcStatus map[string]any

type GvcTags

type GvcTags = base.Tags

GvcTags aliases base.Tags for the reflection base-type registry.

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 string

IpSetLink / IdentityLink / WorkloadLink are localLink leaf types carrying their kind check via the Validator interface (were localLink field tags).

func (IpSetLink) ValidationRule

func (IpSetLink) ValidationRule() *validate.Rule

ValidationRule ports LocalLink().custom(toKind("ipset")): a localLink pointing to a resource of kind ipset.

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

func (MemFmt) ValidationRule() *validate.Rule
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 string

func (WorkloadLink) ValidationRule

func (WorkloadLink) ValidationRule() *validate.Rule

ValidationRule ports LocalLink().custom(toKind("workload")): a localLink pointing to a resource of kind workload.

Jump to

Keyboard shortcuts

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