minerset

package
v0.2.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package minerset contains an admission controller that modifies and validation every new MinerSet.

Index

Constants

View Source
const PluginName = "MinerSet"

PluginName indicates name of admission plugin.

Variables

This section is empty.

Functions

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin

Types

type Plugin

type Plugin struct {
	*admission.Handler
	// contains filtered or unexported fields
}

Plugin is an implementation of admission.Interface. It is validation and mutation plugin for MinerSet resource.

func NewPlugin

func NewPlugin() *Plugin

NewPlugin creates a new always minerset admission control handler.

func (*Plugin) Admit

func (p *Plugin) Admit(ctx context.Context, attributes admission.Attributes, o admission.ObjectInterfaces) (err error)

Admit makes an admission decision based on the request attributes

func (*Plugin) SetExternalClientSet

func (p *Plugin) SetExternalClientSet(client clientset.Interface)

SetExternalClientSet implements the WantsExternalClientSet interface.

func (*Plugin) SetExternalInformerFactory

func (p *Plugin) SetExternalInformerFactory(f informers.SharedInformerFactory)

SetExternalInformerFactory gets Lister from SharedInformerFactory. The lister knows how to lists MinerSets.

func (*Plugin) Validate

func (p *Plugin) Validate(ctx context.Context, attributes admission.Attributes, o admission.ObjectInterfaces) (err error)

Validate do some validation on MinerSet.

func (*Plugin) ValidateInitialization

func (p *Plugin) ValidateInitialization() error

ValidateInitialization checks whether the plugin was correctly initialized.

Jump to

Keyboard shortcuts

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