statusutils

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 10

Documentation

Index

Constants

View Source
const PodNamespaceEnvName = "POD_NAMESPACE"

The name of the environment variable used by resource reporters to associate a resource status with the appropriate controller statusReporterNamespace

Variables

This section is empty.

Functions

func GetSingleStatusInNamespacedStatuses

func GetSingleStatusInNamespacedStatuses(resource resources.InputResource) *core.Status

func GetStatusReporterNamespaceFromEnv

func GetStatusReporterNamespaceFromEnv() (string, error)

noinspection GoUnusedExportedFunction

func SetSingleStatusInNamespacedStatuses

func SetSingleStatusInNamespacedStatuses(resource resources.InputResource, status *core.Status)

Types

type NamespacedStatusesClient

type NamespacedStatusesClient struct {
	// contains filtered or unexported fields
}

InputResources support multiple statuses, each set by a particular controller Each controller should only update its own status, so we expose a client with simple Get/Set capabilities. This way, the consumers of this client do not need to be aware of the statusReporterNamespace.

func NewNamespacedStatusesClient

func NewNamespacedStatusesClient(namespace string) *NamespacedStatusesClient

func (*NamespacedStatusesClient) GetStatus

func (*NamespacedStatusesClient) SetStatus

func (s *NamespacedStatusesClient) SetStatus(resource resources.InputResource, status *core.Status)

type NamespacedStatusesUnmarshaler

type NamespacedStatusesUnmarshaler struct {
	// contains filtered or unexported fields
}

func NewNamespacedStatusesUnmarshaler

func NewNamespacedStatusesUnmarshaler(
	unmarshalMapToProto func(m map[string]interface{}, into proto.Message) error) *NamespacedStatusesUnmarshaler

func (*NamespacedStatusesUnmarshaler) UnmarshalStatus

func (n *NamespacedStatusesUnmarshaler) UnmarshalStatus(resourceStatus v1.Status, into resources.InputResource)

type NoOpStatusClient

type NoOpStatusClient struct {
}

func NewNoOpStatusClient

func NewNoOpStatusClient() *NoOpStatusClient

noinspection GoUnusedExportedFunction

func (*NoOpStatusClient) GetStatus

func (n *NoOpStatusClient) GetStatus(resource resources.InputResource) *core.Status

func (*NoOpStatusClient) SetStatus

func (n *NoOpStatusClient) SetStatus(resource resources.InputResource, status *core.Status)

type SingleStatusUnmarshaler added in v0.29.2

type SingleStatusUnmarshaler struct {
	// contains filtered or unexported fields
}

func (*SingleStatusUnmarshaler) UnmarshalStatus added in v0.29.2

func (s *SingleStatusUnmarshaler) UnmarshalStatus(status v1.Status, into resources.InputResource)

Jump to

Keyboard shortcuts

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