offloader

package
v0.0.0-...-0514228 Latest Latest
Warning

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

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

Documentation

Overview

Package offloader is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockOffloader

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

MockOffloader is a mock of Offloader interface.

func NewMockOffloader

func NewMockOffloader(ctrl *gomock.Controller) *MockOffloader

NewMockOffloader creates a new mock instance.

func (*MockOffloader) Cleanup

func (m *MockOffloader) Cleanup(ctx context.Context, model *deployment.ModelDeployment) error

Cleanup mocks base method.

func (*MockOffloader) Configure

func (m *MockOffloader) Configure(ctx context.Context, model *deployment.ModelDeployment, localBackend *deployment.ServiceReference, remoteBackend *deployment.RemoteBackend, remoteBackendWeight int) error

Configure mocks base method.

func (*MockOffloader) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockOffloaderMockRecorder

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

MockOffloaderMockRecorder is the mock recorder for MockOffloader.

func (*MockOffloaderMockRecorder) Cleanup

func (mr *MockOffloaderMockRecorder) Cleanup(ctx, model any) *gomock.Call

Cleanup indicates an expected call of Cleanup.

func (*MockOffloaderMockRecorder) Configure

func (mr *MockOffloaderMockRecorder) Configure(ctx, model, localBackend, remoteBackend, remoteBackendWeight any) *gomock.Call

Configure indicates an expected call of Configure.

type Offloader

type Offloader interface {
	// Configure configures the offloader with the given model, backend service reference, remote service reference, and backend weight.
	Configure(ctx context.Context, model *modelv1alpha1.ModelDeployment, localBackend *modelv1alpha1.ServiceReference, remoteBackend *modelv1alpha1.RemoteBackend, remoteBackendWeight int) error
	// Cleanup cleans up the offloader for the given model. It should remove any resources created by the offloader for the given model.
	Cleanup(ctx context.Context, model *modelv1alpha1.ModelDeployment) error
}

Offloader is responsible for configuring the underlying infrastructure to offload the model.

func NewOffloader

func NewOffloader(ctx context.Context, offloaderType OffloaderType, kubeClient kubernetes.Interface, proxyClient *beamlitclientset.ClientSet) (Offloader, error)

NewOffloader creates a new offloader for the given type

type OffloaderType

type OffloaderType string
const (
	GatewayAPIOffloaderType     OffloaderType = "gateway-api"
	BeamlitGatewayOffloaderType OffloaderType = "beamlit-gateway"
)

Jump to

Keyboard shortcuts

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