functionres

package
v0.0.0-...-09e6e34 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerHTTPPortName = "http"
)

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)
}

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