settings

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKey = settingsKeyType{}

Functions

func ToContext

func ToContext(ctx context.Context, s *Settings) context.Context

Types

type Settings

type Settings struct {
	ClusterName string `validate:"required"`
}

+k8s:deepcopy-gen=true

func FromContext

func FromContext(ctx context.Context) *Settings

func (*Settings) ConfigMap

func (*Settings) ConfigMap() string

func (Settings) Data

func (s Settings) Data() (map[string]string, error)

func (*Settings) DeepCopy

func (in *Settings) DeepCopy() *Settings

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Settings.

func (*Settings) DeepCopyInto

func (in *Settings) DeepCopyInto(out *Settings)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Settings) Inject

func (*Settings) Inject(ctx context.Context, cm *v1.ConfigMap) (context.Context, error)

Inject creates a Settings from the supplied ConfigMap

func (Settings) Validate

func (s Settings) Validate() error

Jump to

Keyboard shortcuts

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