api

package
v0.1.89 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 62 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Scheme              = runtime.NewScheme()
	AllMonitoringScheme = runtime.NewScheme()
	// TODO: Even though an object typer is specified here, serialized objects
	// are not always getting their TypeMeta set unless explicitly initialized
	// on the variable declarations.
	// Investigate https://github.com/kubernetes/cli-runtime/blob/master/pkg/printers/typesetter.go
	// as a possible solution.
	// See also: https://github.com/openshift/hive/blob/master/contrib/pkg/createcluster/create.go#L937-L954
	YamlSerializer = json.NewSerializerWithOptions(
		json.DefaultMetaFactory, Scheme, Scheme,
		json.SerializerOptions{Yaml: true, Pretty: true, Strict: true},
	)
	JsonSerializer = json.NewSerializerWithOptions(
		json.DefaultMetaFactory, Scheme, Scheme,
		json.SerializerOptions{Yaml: false, Pretty: true, Strict: true},
	)
	TolerantYAMLSerializer = json.NewSerializerWithOptions(
		json.DefaultMetaFactory, Scheme, Scheme,
		json.SerializerOptions{Yaml: true, Pretty: true, Strict: false},
	)
	// AllMonitoringYamlSerializer allows decoding monitoring resources
	// from the CoreOS, RHOBS and GMP group versions
	AllMonitoringYamlSerializer = json.NewSerializerWithOptions(
		json.DefaultMetaFactory, AllMonitoringScheme, AllMonitoringScheme,
		json.SerializerOptions{Yaml: true, Pretty: true, Strict: true},
	)
)

Functions

func CompatibleJSONEncode added in v0.1.72

func CompatibleJSONEncode(obj runtime.Object) ([]byte, error)

CompatibleJSONEncode encodes an object to JSON with consistent creationTimestamp handling.

func CompatibleYAMLEncode added in v0.1.72

func CompatibleYAMLEncode(obj runtime.Object, ser *json.Serializer) ([]byte, error)

CompatibleYAMLEncode encodes an object using the provided serializer with consistent creationTimestamp handling.

Types

This section is empty.

Jump to

Keyboard shortcuts

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