Documentation
¶
Index ¶
Constants ¶
View Source
const ( MatchTypePathPrefix = "PathPrefix" MatchTypeExact = "Exact" MatchTypeRegularExpression = "RegularExpression" )
Variables ¶
This section is empty.
Functions ¶
func MatchProbeResponseFromSpec ¶
func MatchProbeResponseFromSpec(specJSON []byte, req *http.Request, logger *zap.Logger) (body string, status int, matched bool)
MatchProbeResponseFromSpec returns the configured response body and HTTP status when spec JSON matches the request using ElastiService CRD probeResponse semantics (path, headers, queryParams, method ANDed). Rules are tried in order; first match wins.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) GetElastiService ¶
func (c *Cache) GetElastiService(namespacedServiceName string) (*messages.ElastiServiceEntry, bool)
GetElastiService returns the cached entry for "namespace/service-name".
func (*Cache) ListCachedServices ¶
func (c *Cache) ListCachedServices() []CachedService
ListCachedServices returns a stable snapshot of cached ElastiService entries.
func (*Cache) Start ¶
func (c *Cache) Start()
Start begins polling the operator for CRD cache updates.
func (*Cache) StartBackground ¶
func (c *Cache) StartBackground()
type CachedService ¶
type CachedService struct {
NamespacedName string `json:"namespacedName"`
messages.ElastiServiceEntry
}
CachedService is one ElastiService in the resolver's local cache (key is namespace/service-name).
Click to show internal directories.
Click to hide internal directories.