Documentation ¶
Index ¶
- func ApplyMeshConfig(yaml string, defaultConfig *meshconfig.MeshConfig) (*meshconfig.MeshConfig, error)
- func ApplyMeshConfigDefaults(yaml string) (*meshconfig.MeshConfig, error)
- func ApplyProxyConfig(yaml string, meshConfig *meshconfig.MeshConfig) (*meshconfig.MeshConfig, error)
- func DeepCopyMeshConfig(mc *meshconfig.MeshConfig) (*meshconfig.MeshConfig, error)
- func DefaultMeshConfig() *meshconfig.MeshConfig
- func DefaultMeshNetworks() *meshconfig.MeshNetworks
- func DefaultProxyConfig() *meshconfig.ProxyConfig
- func EmptyMeshNetworks() meshconfig.MeshNetworks
- func MergeProxyConfig(yaml string, proxyConfig *meshconfig.ProxyConfig) (*meshconfig.ProxyConfig, error)
- func ParseMeshNetworks(yaml string) (*meshconfig.MeshNetworks, error)
- func ReadMeshConfig(filename string) (*meshconfig.MeshConfig, error)
- func ReadMeshConfigData(filename string) (string, error)
- func ReadMeshNetworks(filename string) (*meshconfig.MeshNetworks, error)
- type Holder
- type NetworksWatcher
- type Watcher
- type WatcherHandlerRegistration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyMeshConfig ¶
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 ¶
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 ¶
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 ¶
func DeepCopyMeshConfig(mc *meshconfig.MeshConfig) (*meshconfig.MeshConfig, error)
func DefaultMeshConfig ¶
func DefaultMeshConfig() *meshconfig.MeshConfig
DefaultMeshConfig returns the default mesh config. This is merged with values from the mesh config map.
func DefaultMeshNetworks ¶
func DefaultMeshNetworks() *meshconfig.MeshNetworks
DefaultMeshNetworks returns a default meshnetworks configuration. By default, it is empty.
func DefaultProxyConfig ¶
func DefaultProxyConfig() *meshconfig.ProxyConfig
DefaultProxyConfig for individual proxies
func EmptyMeshNetworks ¶
func EmptyMeshNetworks() meshconfig.MeshNetworks
EmptyMeshNetworks configuration with no networks
func MergeProxyConfig ¶
func MergeProxyConfig(yaml string, proxyConfig *meshconfig.ProxyConfig) (*meshconfig.ProxyConfig, error)
MergeProxyConfig merges the given proxy config yaml with the given proxy config object.
func ParseMeshNetworks ¶
func ParseMeshNetworks(yaml string) (*meshconfig.MeshNetworks, error)
ParseMeshNetworks returns a new MeshNetworks decoded from the input YAML.
func ReadMeshConfig ¶
func ReadMeshConfig(filename string) (*meshconfig.MeshConfig, error)
ReadMeshConfig gets mesh configuration from a config file
func ReadMeshConfigData ¶
ReadMeshConfigData gets mesh configuration yaml from a config file
func ReadMeshNetworks ¶
func ReadMeshNetworks(filename string) (*meshconfig.MeshNetworks, error)
ReadMeshNetworks gets mesh networks configuration from a config file
Types ¶
type NetworksWatcher ¶
type NetworksWatcher interface { Networks() *v1alpha1.MeshNetworks // AddNetworksHandler registers a callback handler for changes to the networks config. AddNetworksHandler(func()) *WatcherHandlerRegistration // DeleteNetworksHandler unregisters a callback handler when remote cluster is removed. DeleteNetworksHandler(registration *WatcherHandlerRegistration) }
NetworksWatcher watches changes to the mesh networks config.
type Watcher ¶
type Watcher interface { Holder // AddMeshHandler registers a callback handler for changes to the mesh config. AddMeshHandler(h func()) *WatcherHandlerRegistration // DeleteMeshHandler unregisters a callback handler when remote cluster is removed. DeleteMeshHandler(registration *WatcherHandlerRegistration) }
Watcher is a Holder whose mesh config can be updated asynchronously.
type WatcherHandlerRegistration ¶
type WatcherHandlerRegistration struct {
// contains filtered or unexported fields
}
WatcherHandlerRegistration will be returned to caller to remove the handler later.
func NewWatcherHandlerRegistration ¶
func NewWatcherHandlerRegistration(f func()) *WatcherHandlerRegistration
func (*WatcherHandlerRegistration) Remove ¶
func (r *WatcherHandlerRegistration) Remove()