MCPcopy
hub / github.com/istio/istio / Environment

Struct Environment

pilot/pkg/model/context.go:107–162  ·  view source on GitHub ↗

Environment provides an aggregate environmental API for Pilot

Source from the content-addressed store, hash-verified

105
106// Environment provides an aggregate environmental API for Pilot
107type Environment struct {
108 // Discovery interface for listing services and instances.
109 ServiceDiscovery
110
111 // Config interface for listing routing rules
112 ConfigStore
113
114 // Watcher is the watcher for the mesh config (to be merged into the config store)
115 Watcher
116
117 // AmbientIndexes provides access to ambient mesh data (workloads, services, policies).
118 AmbientIndexes
119
120 // NetworksWatcher (loaded from a config map) provides information about the
121 // set of networks inside a mesh and how to route to endpoints in each
122 // network. Each network provides information about the endpoints in a
123 // routable L3 network. A single routable L3 network can have one or more
124 // service registries.
125 NetworksWatcher mesh.NetworksWatcher
126
127 NetworkManager *NetworkManager
128
129 // mutex used for protecting Environment.pushContext
130 mutex sync.RWMutex
131 // pushContext holds information during push generation. It is reset on config change, at the beginning
132 // of the pushAll. It will hold all errors and stats and possibly caches needed during the entire cache computation.
133 // DO NOT USE EXCEPT FOR TESTS AND HANDLING OF NEW CONNECTIONS.
134 // ALL USE DURING A PUSH SHOULD USE THE ONE CREATED AT THE
135 // START OF THE PUSH, THE GLOBAL ONE MAY CHANGE AND REFLECT A DIFFERENT
136 // CONFIG AND PUSH
137 pushContext *PushContext
138
139 // DomainSuffix provides a default domain for the Istio server.
140 DomainSuffix string
141
142 // TrustBundle: List of Mesh TrustAnchors
143 TrustBundle *trustbundle.TrustBundle
144
145 clusterLocalServices ClusterLocalProvider
146
147 CredentialsController credentials.MulticlusterController
148
149 GatewayAPIController GatewayController
150
151 // AgentgatewayController is the controller for agentgateway.
152 AgentgatewayController AgentgatewayController
153
154 // EndpointShards for a service. This is a global (per-server) list, built from
155 // incremental updates. This is keyed by service and namespace
156 EndpointIndex *EndpointIndex
157
158 // Cache for XDS resources.
159 Cache XdsCache
160
161 VirtualServiceController *VirtualServiceController
162}
163
164func (e *Environment) Mesh() *meshconfig.MeshConfig {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected