functionres

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 46 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {

	// List returns the current existing function resources, populating the "deployment" sub-resource
	List(context.Context, string) ([]Resources, error)

	// Get returns the resources named by name, populating the "deployment" sub-resource
	Get(context.Context, string, string) (Resources, error)

	// CreateOrUpdate creates or updates existing resources
	CreateOrUpdate(context.Context, *nuclioio.NuclioFunction, string) (Resources, error)

	// WaitAvailable waits until the resources are ready
	WaitAvailable(context.Context, *nuclioio.NuclioFunction, time.Time) (error, functionconfig.FunctionState)

	// Delete deletes resources
	Delete(context.Context, string, string) error

	// SetPlatformConfigurationProvider sets the provider of the platform configuration for any future access
	SetPlatformConfigurationProvider(PlatformConfigurationProvider)

	// UpdatedServiceSelectorWhenScaledFromZero updates node selector when scaling from zero when function is ready
	UpdatedServiceSelectorWhenScaledFromZero(ctx context.Context, function *nuclioio.NuclioFunction) error
}

func NewLazyClient

func NewLazyClient(parentLogger logger.Logger,
	kubeClientSet kubernetes.Interface,
	nuclioClientSet nuclioioclient.Interface) (Client, error)

type MockedFunctionRes

type MockedFunctionRes struct {
	mock.Mock
}

func (*MockedFunctionRes) CreateOrUpdate

func (mfr *MockedFunctionRes) CreateOrUpdate(ctx context.Context, function *nuclioio.NuclioFunction, s string) (Resources, error)

func (*MockedFunctionRes) Delete

func (mfr *MockedFunctionRes) Delete(ctx context.Context, s string, s2 string) error

func (*MockedFunctionRes) Get

func (mfr *MockedFunctionRes) Get(ctx context.Context, s string, s2 string) (Resources, error)

func (*MockedFunctionRes) List

func (mfr *MockedFunctionRes) List(ctx context.Context, s string) ([]Resources, error)

func (*MockedFunctionRes) SetPlatformConfigurationProvider

func (mfr *MockedFunctionRes) SetPlatformConfigurationProvider(provider PlatformConfigurationProvider)

func (*MockedFunctionRes) WaitAvailable

func (mfr *MockedFunctionRes) WaitAvailable(ctx context.Context, s string, s2 string) error

type PlatformConfigurationProvider

type PlatformConfigurationProvider interface {

	// GetPlatformConfiguration returns a platform configuration
	GetPlatformConfiguration() *platformconfig.Config

	// GetPlatformConfigurationName returns platform configuration resource name
	GetPlatformConfigurationName() string
}

type Resources

type Resources interface {

	// Deployment returns the deployment
	Deployment() (*appsv1.Deployment, error)

	// ConfigMap returns the configmap
	ConfigMap() (*v1.ConfigMap, error)

	// Service returns the service
	Service() (*v1.Service, error)

	// HorizontalPodAutoscaler returns the hpa
	HorizontalPodAutoscaler() (*autosv2.HorizontalPodAutoscaler, error)

	// Ingress returns the ingress
	Ingress() (*networkingv1.Ingress, error)

	// CronJobs returns the cron job
	CronJobs() ([]*batchv1.CronJob, error)
}

Resources holds the resources a functionres holds

Jump to

Keyboard shortcuts

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