affinitygroupservice

package
v0.0.76 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 10 Imported by: 0 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

View Source
var (
	ErrInvalidAffinityGroup = errors.New("invalid affinity group data")
	ErrNotFound             = libdb.ErrNotFound
)

Functions

This section is empty.

Types

type Service

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

func New

func New(db libdb.DBManager) Service

func WithActivityTracker

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

Jump to

Keyboard shortcuts

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