injection

package
v2.11.26 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithInjection

func WithInjection(ctx context.Context, restCfg *rest.Config) context.Context

WithInjection returns a context for the CLI that has the knative.dev/pkg/injection.Default setup.

Types

type LazyInit

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

LazyInit is used as a uniformed way of lazily setting up clients. This is necessary so that fake packages can use the same type.

func NewLazyInit

func NewLazyInit(f func() interface{}) *LazyInit

NewLazyInit returns a LazyInit that invokes the given function once. Its return value should then be used in the injection package's Get function.

func (*LazyInit) Create

func (li *LazyInit) Create() interface{}

Create invokes the given Init function.

Directories

Path Synopsis
clients

Jump to

Keyboard shortcuts

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