...

Package physicalmachine

import "github.com/chaos-mesh/chaos-mesh/pkg/selector/physicalmachine"
Overview
Index

Overview ▾

func SelectPhysicalMachines

func SelectPhysicalMachines(ctx context.Context, c client.Client, r client.Reader,
    selector v1alpha1.PhysicalMachineSelectorSpec,
    clusterScoped bool, targetNamespace string, enableFilterNamespace bool, logger logr.Logger) ([]v1alpha1.PhysicalMachine, error)

type Params

type Params struct {
    fx.In

    Client client.Client
    Reader client.Reader `name:"no-cache"`
}

type PhysicalMachine

type PhysicalMachine struct {
    v1alpha1.PhysicalMachine
    Address string
}

func SelectAndFilterPhysicalMachines

func SelectAndFilterPhysicalMachines(ctx context.Context, c client.Client, r client.Reader, spec *v1alpha1.PhysicalMachineSelector, clusterScoped bool, targetNamespace string, enableFilterNamespace bool, logger logr.Logger) ([]*PhysicalMachine, error)

SelectAndFilterPhysicalMachines returns the list of physical machines that filtered by selector and SelectorMode

func (*PhysicalMachine) Id

func (pm *PhysicalMachine) Id() string

type SelectImpl

type SelectImpl struct {
    generic.Option
    // contains filtered or unexported fields
}

func New

func New(params Params, logger logr.Logger) *SelectImpl

func (*SelectImpl) Select

func (impl *SelectImpl) Select(ctx context.Context, physicalMachineSelector *v1alpha1.PhysicalMachineSelector) ([]*PhysicalMachine, error)