istio: istio.io/istio/cni/pkg/install-cni/pkg/util Index | Files

package util

import "istio.io/istio/cni/pkg/install-cni/pkg/util"

Index

Package Files

util.go

func CreateFileWatcher Uses

func CreateFileWatcher(dir string) (watcher *fsnotify.Watcher, fileModified chan bool, errChan chan error, err error)

Creates a file watcher that watches for any changes to the directory

func GetPlugin Uses

func GetPlugin(rawPlugin interface{}) (plugin map[string]interface{}, err error)

Given the raw plugin interface, return the plugin asserted as a map[string]interface{}

func GetPlugins Uses

func GetPlugins(cniConfigMap map[string]interface{}) (plugins []interface{}, err error)

Given an unmarshalled CNI config JSON map, return the plugin list asserted as a []interface{}

func MarshalCNIConfig Uses

func MarshalCNIConfig(cniConfigMap map[string]interface{}) ([]byte, error)

Marshal the CNI config map and append a new line

func ReadCNIConfigMap Uses

func ReadCNIConfigMap(path string) (map[string]interface{}, error)

Read CNI config from file and return the unmarshalled JSON as a map

func WaitForFileMod Uses

func WaitForFileMod(ctx context.Context, fileModified chan bool, errChan chan error) error

Waits until a file is modified (returns nil), the context is cancelled (returns context error), or returns error

Package util imports 5 packages (graph) and is imported by 2 packages. Updated 2020-10-30. Refresh now. Tools for package owners.