[MM-53156] Remove Multi-Product architecture (#25669)

Этот коммит содержится в:
Ben Schumacher
2024-02-15 13:01:44 +01:00
коммит произвёл GitHub
родитель d3b799eaa5
Коммит de3e5aab25
42 изменённых файлов: 86 добавлений и 2240 удалений

Просмотреть файл

@@ -13,7 +13,6 @@ import (
"github.com/mattermost/mattermost/server/public/model"
"github.com/mattermost/mattermost/server/public/shared/mlog"
"github.com/mattermost/mattermost/server/public/shared/request"
"github.com/mattermost/mattermost/server/v8/channels/product"
)
type StoreResult[T any] struct {
@@ -74,7 +73,7 @@ type Store interface {
GetAppliedMigrations() ([]model.AppliedMigration, error)
GetDbVersion(numerical bool) (string, error)
// GetInternalMasterDB allows access to the raw master DB
// handle for the multi-product architecture.
// handle for plugins.
GetInternalMasterDB() *sql.DB
GetInternalReplicaDB() *sql.DB
TotalMasterDbConnections() int
@@ -1117,21 +1116,3 @@ type SidebarCategorySearchOpts struct {
ExcludeTeam bool
Type model.SidebarCategoryType
}
// Ensure store service adapter implements `product.StoreService`
var _ product.StoreService = (*StoreServiceAdapter)(nil)
// StoreServiceAdapter provides a simple Store wrapper for use with products.
type StoreServiceAdapter struct {
store Store
}
func NewStoreServiceAdapter(store Store) *StoreServiceAdapter {
return &StoreServiceAdapter{
store: store,
}
}
func (a *StoreServiceAdapter) GetMasterDB() *sql.DB {
return a.store.GetInternalMasterDB()
}