affinitygroupservice

package
v0.0.68 Latest Latest
Warning

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

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

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