Documentation ¶
Index ¶
- type AdditionalOptions
- type Builder
- func (builder *Builder) CleanObjects(cleanTimeout time.Duration, objects ...schema.GroupVersionResource) error
- func (builder *Builder) Create() (*Builder, error)
- func (builder *Builder) Delete() error
- func (builder *Builder) DeleteAndWait(timeout time.Duration) error
- func (builder *Builder) Exists() bool
- func (builder *Builder) RemoveLabels(labels map[string]string) *Builder
- func (builder *Builder) Update() (*Builder, error)
- func (builder *Builder) WithLabel(key string, value string) *Builder
- func (builder *Builder) WithMultipleLabels(labels map[string]string) *Builder
- func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalOptions ¶
AdditionalOptions additional options for namespace object.
type Builder ¶
type Builder struct { // Namespace definition. Used to create namespace object. Definition *corev1.Namespace // Created namespace object Object *corev1.Namespace // contains filtered or unexported fields }
Builder provides struct for namespace object containing connection to the cluster and the namespace definitions.
func NewBuilder ¶
NewBuilder creates new instance of Builder.
func (*Builder) CleanObjects ¶
func (builder *Builder) CleanObjects(cleanTimeout time.Duration, objects ...schema.GroupVersionResource) error
CleanObjects removes given objects from the namespace.
func (*Builder) Create ¶
Create makes a namespace in the cluster and stores the created object in struct.
func (*Builder) DeleteAndWait ¶
DeleteAndWait deletes a namespace and waits until it is removed from the cluster.
func (*Builder) RemoveLabels ¶
RemoveLabels removes given label from Node metadata.
func (*Builder) Update ¶
Update renovates the existing namespace object with the namespace definition in builder.
func (*Builder) WithMultipleLabels ¶
WithMultipleLabels redefines namespace definition with the given labels.
func (*Builder) WithOptions ¶
func (builder *Builder) WithOptions(options ...AdditionalOptions) *Builder
WithOptions creates namespace with generic mutation options.