util

package
v3.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServiceAccountWithToken

func CreateServiceAccountWithToken(ctx context.Context, clientset kubernetes.Interface, namespace, name, tokenName string) (*corev1.ServiceAccount, error)

CreateServiceAccountWithToken creates a service account with a given name with a service account token. Need to use this function to simulate the actual behavior of Kubernetes API server with the fake client.

func MustUnmarshalUnstructured

func MustUnmarshalUnstructured(text string) *unstructured.Unstructured

func MustUnmarshalWorkflow

func MustUnmarshalWorkflow(text string) *wfv1.Workflow

Types

type Indexer

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

func NewIndexer

func NewIndexer() *Indexer

func (Indexer) Add

func (i Indexer) Add(interface{}) error

func (Indexer) AddIndexers

func (i Indexer) AddIndexers(cache.Indexers) error

func (Indexer) ByIndex

func (i Indexer) ByIndex(indexName, indexedValue string) ([]interface{}, error)

func (Indexer) Delete

func (i Indexer) Delete(interface{}) error

func (Indexer) Get

func (i Indexer) Get(interface{}) (item interface{}, exists bool, err error)

func (Indexer) GetByKey

func (i Indexer) GetByKey(key string) (item interface{}, exists bool, err error)

func (Indexer) GetIndexers

func (i Indexer) GetIndexers() cache.Indexers

func (Indexer) Index

func (i Indexer) Index(string, interface{}) ([]interface{}, error)

func (Indexer) IndexKeys

func (i Indexer) IndexKeys(string, string) ([]string, error)

func (Indexer) List

func (i Indexer) List() []interface{}

func (Indexer) ListIndexFuncValues

func (i Indexer) ListIndexFuncValues(string) []string

func (Indexer) ListKeys

func (i Indexer) ListKeys() []string

func (Indexer) Replace

func (i Indexer) Replace([]interface{}, string) error

func (Indexer) Resync

func (i Indexer) Resync() error

func (Indexer) SetByIndex

func (i Indexer) SetByIndex(indexName, indexedValue string, objs ...interface{})

func (Indexer) SetByKey

func (i Indexer) SetByKey(key string, item interface{})

func (Indexer) Update

func (i Indexer) Update(interface{}) error

type SharedIndexInformer

type SharedIndexInformer struct {
	Indexer *Indexer
}

func NewSharedIndexInformer

func NewSharedIndexInformer() *SharedIndexInformer

func (*SharedIndexInformer) AddEventHandler

func (s *SharedIndexInformer) AddEventHandler(cache.ResourceEventHandler)

func (*SharedIndexInformer) AddEventHandlerWithResyncPeriod

func (s *SharedIndexInformer) AddEventHandlerWithResyncPeriod(cache.ResourceEventHandler, time.Duration)

func (*SharedIndexInformer) AddIndexers

func (s *SharedIndexInformer) AddIndexers(cache.Indexers) error

func (*SharedIndexInformer) GetController

func (s *SharedIndexInformer) GetController() cache.Controller

func (*SharedIndexInformer) GetIndexer

func (s *SharedIndexInformer) GetIndexer() cache.Indexer

func (*SharedIndexInformer) GetStore

func (s *SharedIndexInformer) GetStore() cache.Store

func (*SharedIndexInformer) HasSynced

func (s *SharedIndexInformer) HasSynced() bool

func (*SharedIndexInformer) LastSyncResourceVersion

func (s *SharedIndexInformer) LastSyncResourceVersion() string

func (*SharedIndexInformer) Run

func (s *SharedIndexInformer) Run(<-chan struct{})

func (*SharedIndexInformer) SetWatchErrorHandler

func (s *SharedIndexInformer) SetWatchErrorHandler(handler cache.WatchErrorHandler) error

Jump to

Keyboard shortcuts

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