Documentation ¶
Index ¶
- type LobbyHandler
- type LobbyMongoHandler
- func (l *LobbyMongoHandler) ClearExpiredServers(ctx context.Context, ttl time.Duration) (int64, int64, error)
- func (l *LobbyMongoHandler) GetAllServersFromLobby(ctx context.Context, limit int, ts int64) ([]repo.LobbyServer, error)
- func (l *LobbyMongoHandler) GetServerDetails(ctx context.Context, region, rowId string) (types.QueryLobbyServerDetailResp, error)
- func (l *LobbyMongoHandler) GetServersByPage(ctx context.Context, options types.QueryLobbyServersOptions) (types.PageResult[types.QueryLobbyServersResp], error)
- func (l *LobbyMongoHandler) GetStatisticInfo(ctx context.Context, before, until, tail int64, duration time.Duration) ([]repo.LobbyStatisticInfo, error)
- func (l *LobbyMongoHandler) StatisticServers(ctx context.Context, ts int64, servers []repo.LobbyServer) error
- func (l *LobbyMongoHandler) SyncLocalServers(ctx context.Context, limit int) (int, error)
- type ModHandler
- type WorkShopModHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LobbyHandler ¶
type LobbyHandler interface { // GetServersByPage returns server list from database by given queryOptions GetServersByPage(ctx context.Context, queryOptions types.QueryLobbyServersOptions) (types.PageResult[types.QueryLobbyServersResp], error) // ClearExpiredServers remove expired servers from database ClearExpiredServers(ctx context.Context, ttl time.Duration) (int64, int64, error) // GetServerDetails returns details information for specific server GetServerDetails(ctx context.Context, region, rowId string) (types.QueryLobbyServerDetailResp, error) // GetStatisticInfo returns statistics information for specific period GetStatisticInfo(ctx context.Context, before, until, tail int64, duration time.Duration) ([]repo.LobbyStatisticInfo, error) // GetAllServersFromLobby collects and returns server information from klei lobby server GetAllServersFromLobby(ctx context.Context, limit int, ts int64) ([]repo.LobbyServer, error) // SyncLocalServers collects server information from klei, process and store them into database, // then return how many records has been stored SyncLocalServers(ctx context.Context, limit int) (int, error) }
type LobbyMongoHandler ¶
type LobbyMongoHandler struct {
// contains filtered or unexported fields
}
func NewLobbyMongoHandler ¶
func NewLobbyMongoHandler(lobbyRepo *repo.LobbyRepo, statisticRepo *repo.LobbyStatisticRepo, lobby *lobbyapi.Client, geoip *geoip2.Reader) *LobbyMongoHandler
func (*LobbyMongoHandler) ClearExpiredServers ¶
func (*LobbyMongoHandler) GetAllServersFromLobby ¶
func (l *LobbyMongoHandler) GetAllServersFromLobby(ctx context.Context, limit int, ts int64) ([]repo.LobbyServer, error)
GetAllServersFromLobby returns all lobby servers in parallel. Using limit params to limit the number of goroutine
func (*LobbyMongoHandler) GetServerDetails ¶
func (l *LobbyMongoHandler) GetServerDetails(ctx context.Context, region, rowId string) (types.QueryLobbyServerDetailResp, error)
func (*LobbyMongoHandler) GetServersByPage ¶
func (l *LobbyMongoHandler) GetServersByPage(ctx context.Context, options types.QueryLobbyServersOptions) (types.PageResult[types.QueryLobbyServersResp], error)
func (*LobbyMongoHandler) GetStatisticInfo ¶
func (l *LobbyMongoHandler) GetStatisticInfo(ctx context.Context, before, until, tail int64, duration time.Duration) ([]repo.LobbyStatisticInfo, error)
func (*LobbyMongoHandler) StatisticServers ¶
func (l *LobbyMongoHandler) StatisticServers(ctx context.Context, ts int64, servers []repo.LobbyServer) error
func (*LobbyMongoHandler) SyncLocalServers ¶
type ModHandler ¶
type ModHandler interface {
SearchModList(ctx context.Context, queryOption types.SearchModsOption) (publishedfile.FileList, error)
}
type WorkShopModHandler ¶
type WorkShopModHandler struct {
// contains filtered or unexported fields
}
func NewWorkShopHandler ¶
func NewWorkShopHandler(steamCLI *steamapi.Client) *WorkShopModHandler
func (*WorkShopModHandler) SearchModList ¶
func (w *WorkShopModHandler) SearchModList(ctx context.Context, queryOption types.SearchModsOption) (publishedfile.FileList, error)
Click to show internal directories.
Click to hide internal directories.