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 WithActivityTracker ¶
func WithActivityTracker(service Service, tracker libtracker.ActivityTracker) Service
Click to show internal directories.
Click to hide internal directories.