poolservice

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPool = errors.New("invalid pool data")
	ErrNotFound    = libdb.ErrNotFound
)

Functions

This section is empty.

Types

type Service

type Service interface {
	Create(ctx context.Context, pool *runtimetypes.Pool) error
	GetByID(ctx context.Context, id string) (*runtimetypes.Pool, error)
	GetByName(ctx context.Context, name string) (*runtimetypes.Pool, error)
	Update(ctx context.Context, pool *runtimetypes.Pool) error
	Delete(ctx context.Context, id string) error
	ListAll(ctx context.Context) ([]*runtimetypes.Pool, error)
	ListByPurpose(ctx context.Context, purpose string, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Pool, error)
	AssignBackend(ctx context.Context, poolID, backendID string) error
	RemoveBackend(ctx context.Context, poolID, backendID string) error
	ListBackends(ctx context.Context, poolID string) ([]*runtimetypes.Backend, error)
	ListPoolsForBackend(ctx context.Context, backendID string) ([]*runtimetypes.Pool, error)
	AssignModel(ctx context.Context, poolID, modelID string) error
	RemoveModel(ctx context.Context, poolID, modelID string) error
	ListModels(ctx context.Context, poolID string) ([]*runtimetypes.Model, error)
	ListPoolsForModel(ctx context.Context, modelID string) ([]*runtimetypes.Pool, error)
}

func New

func New(db libdb.DBManager) Service

func WithActivityTracker

func WithActivityTracker(service Service, tracker activitytracker.ActivityTracker) Service

Jump to

Keyboard shortcuts

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