istio: istio.io/istio/pkg/config/mesh Index | Files | Directories

package mesh

import "istio.io/istio/pkg/config/mesh"

Index

Package Files

mesh.go networks_watcher.go watcher.go

func ApplyMeshConfig Uses

func ApplyMeshConfig(yaml string, defaultConfig meshconfig.MeshConfig) (*meshconfig.MeshConfig, error)

ApplyMeshConfig returns a new MeshConfig decoded from the input YAML with the provided defaults applied to omitted configuration values.

func ApplyMeshConfigDefaults Uses

func ApplyMeshConfigDefaults(yaml string) (*meshconfig.MeshConfig, error)

ApplyMeshConfigDefaults returns a new MeshConfig decoded from the input YAML with defaults applied to omitted configuration values.

func ApplyProxyConfig Uses

func ApplyProxyConfig(yaml string, meshConfig meshconfig.MeshConfig) (*meshconfig.MeshConfig, error)

ApplyProxyConfig applies the give proxy config yaml to a mesh config object. The passed in mesh config will not be modified.

func DeepCopyMeshConfig Uses

func DeepCopyMeshConfig(mc *meshconfig.MeshConfig) (*meshconfig.MeshConfig, error)

func DefaultMeshConfig Uses

func DefaultMeshConfig() meshconfig.MeshConfig

DefaultMeshConfig returns the default mesh config. This is merged with values from the mesh config map.

func DefaultProxyConfig Uses

func DefaultProxyConfig() meshconfig.ProxyConfig

DefaultProxyConfig for individual proxies

func EmptyMeshNetworks Uses

func EmptyMeshNetworks() meshconfig.MeshNetworks

EmptyMeshNetworks configuration with no networks

func ParseMeshNetworks Uses

func ParseMeshNetworks(yaml string) (*meshconfig.MeshNetworks, error)

ParseMeshNetworks returns a new MeshNetworks decoded from the input YAML.

func ReadMeshConfig Uses

func ReadMeshConfig(filename string) (*meshconfig.MeshConfig, error)

ReadMeshConfig gets mesh configuration from a config file

func ReadMeshNetworks Uses

func ReadMeshNetworks(filename string) (*meshconfig.MeshNetworks, error)

ReadMeshNetworks gets mesh networks configuration from a config file

func ResolveHostsInNetworksConfig Uses

func ResolveHostsInNetworksConfig(config *meshconfig.MeshNetworks)

ResolveHostsInNetworksConfig will go through the Gateways addresses for all networks in the config and if it's not an IP address it will try to lookup that hostname and replace it with the IP address in the config

type Holder Uses

type Holder interface {
    Mesh() *meshconfig.MeshConfig
}

Holder of a mesh configuration.

type InternalWatcher Uses

type InternalWatcher struct {
    MeshConfig *meshconfig.MeshConfig
    // contains filtered or unexported fields
}

func (*InternalWatcher) AddMeshHandler Uses

func (w *InternalWatcher) AddMeshHandler(h func())

AddMeshHandler registers a callback handler for changes to the mesh config.

func (*InternalWatcher) HandleMeshConfig Uses

func (w *InternalWatcher) HandleMeshConfig(meshConfig *meshconfig.MeshConfig)

func (*InternalWatcher) Mesh Uses

func (w *InternalWatcher) Mesh() *meshconfig.MeshConfig

Mesh returns the latest mesh config.

type NetworksHolder Uses

type NetworksHolder interface {
    SetNetworks(*meshconfig.MeshNetworks)
    Networks() *meshconfig.MeshNetworks
}

NetworksHolder is a holder of a mesh networks configuration.

type NetworksWatcher Uses

type NetworksWatcher interface {
    NetworksHolder

    AddNetworksHandler(func())
}

NetworkWatcher watches changes to the mesh networks config.

func NewFixedNetworksWatcher Uses

func NewFixedNetworksWatcher(networks *meshconfig.MeshNetworks) NetworksWatcher

NewFixedNetworksWatcher creates a new NetworksWatcher that always returns the given config. It will never fire any events, since the config never changes.

func NewNetworksWatcher Uses

func NewNetworksWatcher(fileWatcher filewatcher.FileWatcher, filename string) (NetworksWatcher, error)

NewNetworksWatcher creates a new watcher for changes to the given networks config file.

type Watcher Uses

type Watcher interface {
    Holder

    // AddMeshHandler registers a callback handler for changes to the mesh config.
    AddMeshHandler(func())
}

Watcher is a Holder whose mesh config can be updated asynchronously.

func NewFileWatcher Uses

func NewFileWatcher(fileWatcher filewatcher.FileWatcher, filename string) (Watcher, error)

NewFileWatcher creates a new Watcher for changes to the given mesh config file. Returns an error if the given file does not exist or failed during parsing.

func NewFixedWatcher Uses

func NewFixedWatcher(mesh *meshconfig.MeshConfig) Watcher

NewFixedWatcher creates a new Watcher that always returns the given mesh config. It will never fire any events, since the config never changes.

Directories

PathSynopsis
kubemesh

Package mesh imports 20 packages (graph) and is imported by 27 packages. Updated 2021-01-14. Refresh now. Tools for package owners.