client

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddToScheme = localSchemeBuilder.AddToScheme
View Source
var Scheme = runtime.NewScheme()

Functions

func NewKubeConfigClient

func NewKubeConfigClient() (*rest.Config, *k8s.Clientset, error)

NewKubeConfigClient returns the kubeconfig and the client created from the kubeconfig.

func SetConfigDefaults

func SetConfigDefaults(config *rest.Config) error

Types

type FnClient

type FnClient interface {
	Namespace(ns string) *fnClient
	EnforceNamespace() *fnClient

	Create(ctx context.Context, fn *openfunction.Function, opts metav1.CreateOptions) (result *openfunction.Function, err error)
	Get(ctx context.Context, name string, opts metav1.GetOptions) (result *openfunction.Function, err error)
	List(ctx context.Context, namespaceIfScoped bool, options metav1.ListOptions) (*openfunction.FunctionList, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	Apply(ctx context.Context, fn *openfunction.Function, opts metav1.ApplyOptions) (result *openfunction.Function, err error)

	GetBuilder(ctx context.Context, name string, opts metav1.GetOptions) (result *openfunction.Builder, err error)
	ListBuilder(ctx context.Context, namespaceIfScoped bool, opts metav1.ListOptions) (result *openfunction.BuilderList, err error)

	GetServing(ctx context.Context, name string, opts metav1.GetOptions) (result *openfunction.Serving, err error)
	ListServing(ctx context.Context, namespaceIfScoped bool, opts metav1.ListOptions) (result *openfunction.ServingList, err error)
}

func NewFakeClient

func NewFakeClient() (FnClient, error)

func NewFakeFnClient

func NewFakeFnClient(namespace string, roundTripper func(r *http.Request) (*http.Response, error)) (FnClient, error)

func NewFnClient

func NewFnClient(r util.Getter) (FnClient, error)

NewFnClient new a openFunction rest client from RESTClientGetter

Jump to

Keyboard shortcuts

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