]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/server-commands/server/server.ts
Add playback metric endpoint sent to OTEL
[github/Chocobozzz/PeerTube.git] / shared / server-commands / server / server.ts
index da89fd876b6c46628f87289b7ab6a9d62c3824a7..2b4c9c9f83c4091b3ea631117017411ba3db37c9 100644 (file)
@@ -2,7 +2,7 @@ import { ChildProcess, fork } from 'child_process'
 import { copy } from 'fs-extra'
 import { join } from 'path'
 import { parallelTests, randomInt, root } from '@shared/core-utils'
-import { Video, VideoChannel, VideoCreateResult, VideoDetails } from '@shared/models'
+import { Video, VideoChannel, VideoChannelSync, VideoCreateResult, VideoDetails } from '@shared/models'
 import { BulkCommand } from '../bulk'
 import { CLICommand } from '../cli'
 import { CustomPagesCommand } from '../custom-pages'
@@ -19,20 +19,25 @@ import {
   CaptionsCommand,
   ChangeOwnershipCommand,
   ChannelsCommand,
+  ChannelSyncsCommand,
   HistoryCommand,
   ImportsCommand,
   LiveCommand,
   PlaylistsCommand,
   ServicesCommand,
   StreamingPlaylistsCommand,
-  VideosCommand
+  VideosCommand,
+  VideoStudioCommand,
+  ViewsCommand
 } from '../videos'
 import { CommentsCommand } from '../videos/comments-command'
+import { VideoStatsCommand } from '../videos/video-stats-command'
 import { ConfigCommand } from './config-command'
 import { ContactFormCommand } from './contact-form-command'
 import { DebugCommand } from './debug-command'
 import { FollowsCommand } from './follows-command'
 import { JobsCommand } from './jobs-command'
+import { MetricsCommand } from './metrics-command'
 import { ObjectStorageCommand } from './object-storage-command'
 import { PluginsCommand } from './plugins-command'
 import { RedundancyCommand } from './redundancy-command'
@@ -76,6 +81,7 @@ export class PeerTubeServer {
     }
 
     channel?: VideoChannel
+    videoChannelSync?: Partial<VideoChannelSync>
 
     video?: Video
     videoCreated?: VideoCreateResult
@@ -99,6 +105,7 @@ export class PeerTubeServer {
   debug?: DebugCommand
   follows?: FollowsCommand
   jobs?: JobsCommand
+  metrics?: MetricsCommand
   plugins?: PluginsCommand
   redundancy?: RedundancyCommand
   stats?: StatsCommand
@@ -115,6 +122,7 @@ export class PeerTubeServer {
   playlists?: PlaylistsCommand
   history?: HistoryCommand
   imports?: ImportsCommand
+  channelSyncs?: ChannelSyncsCommand
   streamingPlaylists?: StreamingPlaylistsCommand
   channels?: ChannelsCommand
   comments?: CommentsCommand
@@ -124,7 +132,10 @@ export class PeerTubeServer {
   login?: LoginCommand
   users?: UsersCommand
   objectStorage?: ObjectStorageCommand
+  videoStudio?: VideoStudioCommand
   videos?: VideosCommand
+  videoStats?: VideoStatsCommand
+  views?: ViewsCommand
 
   constructor (options: { serverNumber: number } | { url: string }) {
     if ((options as any).url) {
@@ -368,6 +379,7 @@ export class PeerTubeServer {
     this.debug = new DebugCommand(this)
     this.follows = new FollowsCommand(this)
     this.jobs = new JobsCommand(this)
+    this.metrics = new MetricsCommand(this)
     this.plugins = new PluginsCommand(this)
     this.redundancy = new RedundancyCommand(this)
     this.stats = new StatsCommand(this)
@@ -384,6 +396,7 @@ export class PeerTubeServer {
     this.playlists = new PlaylistsCommand(this)
     this.history = new HistoryCommand(this)
     this.imports = new ImportsCommand(this)
+    this.channelSyncs = new ChannelSyncsCommand(this)
     this.streamingPlaylists = new StreamingPlaylistsCommand(this)
     this.channels = new ChannelsCommand(this)
     this.comments = new CommentsCommand(this)
@@ -394,5 +407,8 @@ export class PeerTubeServer {
     this.users = new UsersCommand(this)
     this.videos = new VideosCommand(this)
     this.objectStorage = new ObjectStorageCommand(this)
+    this.videoStudio = new VideoStudioCommand(this)
+    this.videoStats = new VideoStatsCommand(this)
+    this.views = new ViewsCommand(this)
   }
 }