istio: istio.io/istio/galley/pkg/config/analysis Index | Files | Directories

package analysis

import "istio.io/istio/galley/pkg/config/analysis"

Index

Package Files

analyzer.go context.go metadata.go

type Analyzer Uses

type Analyzer interface {
    Metadata() Metadata
    Analyze(c Context)
}

Analyzer is an interface for analyzing configuration.

type CombinedAnalyzer Uses

type CombinedAnalyzer struct {
    // contains filtered or unexported fields
}

CombinedAnalyzer is a special Analyzer that combines multiple analyzers into one

func Combine Uses

func Combine(name string, analyzers ...Analyzer) *CombinedAnalyzer

Combine multiple analyzers into a single one. For input metadata, use the union of the component analyzers

func (*CombinedAnalyzer) Analyze Uses

func (c *CombinedAnalyzer) Analyze(ctx Context)

Analyze implements Analyzer

func (*CombinedAnalyzer) Metadata Uses

func (c *CombinedAnalyzer) Metadata() Metadata

Metadata implements Analyzer

func (*CombinedAnalyzer) WithDisabled Uses

func (c *CombinedAnalyzer) WithDisabled(disabledInputs collection.Names, xformProviders transformer.Providers) *CombinedAnalyzer

WithDisabled returns a new CombinedAnalyzer that marks the specified input collections as disabled. Transformer information is used to determine, based on the disabled input collections, which output collections should be disabled. Any analyzers that require those output collections will be skipped.

type Context Uses

type Context interface {
    // Report a diagnostic message
    Report(c collection.Name, t diag.Message)

    // Find a resource in the collection. If not found, nil is returned
    Find(c collection.Name, name resource.Name) *resource.Entry

    // Exists returns true if the specified resource exists in the context, false otherwise
    Exists(c collection.Name, name resource.Name) bool

    // ForEach iterates over all the entries of a given collection.
    ForEach(c collection.Name, fn IteratorFn)

    // Canceled indicates that the context has been canceled. The analyzer should stop executing as soon as possible.
    Canceled() bool
}

Context is an analysis context that is passed to individual analyzers.

type IteratorFn Uses

type IteratorFn func(r *resource.Entry) bool

IteratorFn is used to iterate over a set of collection entries. It must return true to keep iterating.

type Metadata Uses

type Metadata struct {
    Name   string
    Inputs collection.Names
}

Metadata represents metadata for an analyzer

Directories

PathSynopsis
analyzers
diag
local
msg

Package analysis imports 5 packages (graph) and is imported by 3 packages. Updated 2019-10-17. Refresh now. Tools for package owners.