resourceset

package
v0.0.0-...-0a8b275 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSectionName

func FormatSectionName(driverGroupName, name string) string

FormatSectionName returns the resourceset section name for a given driver group name and subset name.

func IsSubsetSection

func IsSubsetSection(s string) bool

func SubsetSectionToName

func SubsetSectionToName(s string) string

Types

type DoFunc

type DoFunc func(context.Context, resource.Driver) error

type L

type L []*T

func NewList

func NewList() L

func (L) Do

func (t L) Do(ctx context.Context, l ResourceLister, barrier, desc string, fn DoFunc) error

func (L) Len

func (t L) Len() int

func (L) Less

func (t L) Less(i, j int) bool

func (L) Reverse

func (t L) Reverse()

func (L) Swap

func (t L) Swap(i, j int)

type ResourceLister

type ResourceLister interface {
	Resources() resource.Drivers
	ReconfigureResource(resource.Driver) error
	IsDesc() bool
}

type T

type T struct {
	Name           string
	SectionName    string
	DriverGroup    driver.Group
	Parallel       bool
	PG             *pg.Config
	ResourceLister ResourceLister
	// contains filtered or unexported fields
}

func Generic

func Generic(driverGroupName string) (*T, error)

Generic allocates and initializes a new resourceset for a given driver group, and return an error if this name is not valid.

func New

func New() *T

New allocates and initializes a new resourceset

func Parse

func Parse(s string) (*T, error)

Parse allocates and initializes new resourceset for a given name, and return an error if the name is not valid.

func (T) Do

func (t T) Do(ctx context.Context, l ResourceLister, barrier, desc string, fn DoFunc) (hasHitBarrier bool, err error)

func (T) Fullname

func (t T) Fullname() string

func (*T) Log

func (t *T) Log() *plog.Logger

Log returns the resource logger

func (T) ReconfigureResource

func (t T) ReconfigureResource(r resource.Driver) error

func (T) Resources

func (t T) Resources() resource.Drivers

Resources returns the list of resources handled by the resourceset. This function make the resourceset a ResourceLister.

func (*T) SetLogger

func (t *T) SetLogger(parent *plog.Logger)

SetLogger configures a logger from a parent logger, adding the "subset" attribute

func (T) String

func (t T) String() string

Jump to

Keyboard shortcuts

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