14 lines
522 B
Go
14 lines
522 B
Go
package lspool
|
|
|
|
import "time"
|
|
|
|
// Backend is the control-plane abstraction used by the HTTP upstream wrapper.
|
|
// It may be backed by a local in-process Pool or by remote LS workers.
|
|
type Backend interface {
|
|
GetOrCreate(accountID, routingKey string, proxyURL ...string) (*Instance, error)
|
|
SetAccountToken(accountID, accessToken, refreshToken string, expiresAt time.Time)
|
|
SetAccountModelCredits(accountID string, useAICredits bool, availableCredits, minimumCreditAmountForUsage *int32)
|
|
Stats() map[string]any
|
|
Close()
|
|
}
|