patcher

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package patcher provides functionality required to patch pods by the FPGA admission webhook.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager added in v0.22.0

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

Manager keeps track of patchers registered for different Kubernetes namespaces.

func NewPatcherManager

func NewPatcherManager(log logr.Logger) *Manager

NewPatcherManager creates a new Manager.

func (*Manager) GetPatcher added in v0.22.0

func (pm *Manager) GetPatcher(namespace string) *Patcher

GetPatcher returns a patcher specific to given namespace.

func (*Manager) GetPodMutator added in v0.22.0

func (pm *Manager) GetPodMutator() func(ctx context.Context, req webhook.AdmissionRequest) webhook.AdmissionResponse

GetPodMutator returns a handler function replacing FPGA resource names with real FPGA resources in pods.

type Patcher added in v0.24.0

type Patcher struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Patcher stores FPGA controller's state.

func (*Patcher) AddAf added in v0.24.0

func (p *Patcher) AddAf(accfunc *fpgav2.AcceleratorFunction) error

func (*Patcher) AddRegion added in v0.24.0

func (p *Patcher) AddRegion(region *fpgav2.FpgaRegion)

func (*Patcher) RemoveAf added in v0.24.0

func (p *Patcher) RemoveAf(name string)

func (*Patcher) RemoveRegion added in v0.24.0

func (p *Patcher) RemoveRegion(name string)

Jump to

Keyboard shortcuts

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