router

package
v0.381.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type R

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

R manages the routing table of models to engines.

func New

func New() *R

New creates a new router.

func (*R) AddOrUpdateEngine

func (r *R) AddOrUpdateEngine(engineID, tenantID string, modelIDs []string)

AddOrUpdateEngine adds or updates the engine with the given model IDs.

func (*R) DeleteEngine

func (r *R) DeleteEngine(engineID, tenantID string)

DeleteEngine deletes the engine.

func (*R) GetEnginesForModel

func (r *R) GetEnginesForModel(ctx context.Context, modelID, tenantID string) ([]string, error)

GetEnginesForModel returns the engine IDs for the given model.

Jump to

Keyboard shortcuts

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