utils

package
v0.0.0-...-35294a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelayedDumper

func DelayedDumper(obj interface{}) fmt.Stringer

DelayedDumper delays the dumping of an object. Useful in logging to delay the processing (JSON marshalling) until (or if) the object is actually evaluated.

func Dump

func Dump(obj interface{}) string

Dump dumps an object into YAML textual format

Types

type FsWatcher

type FsWatcher struct {
	*fsnotify.Watcher

	Events chan struct{}
	// contains filtered or unexported fields
}

FsWatcher is a wrapper helper for watching files

func CreateFsWatcher

func CreateFsWatcher(ratelimit time.Duration, names ...string) (*FsWatcher, error)

CreateFsWatcher creates a new FsWatcher

type JsonPatch

type JsonPatch struct {
	Op    string `json:"op"`
	Path  string `json:"path"`
	Value string `json:"value,omitempty"`
}

JsonPatch is a json marshaling helper used for patching API objects

func NewJsonPatch

func NewJsonPatch(verb string, jsonpath string, key string, value string) JsonPatch

NewJsonPatch returns a new JsonPatch object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL