| 
									
										
										
										
											2023-09-26 06:31:58 +08:00
										 |  |  | package apiregistry | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"context" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-07 02:55:22 +08:00
										 |  |  | 	examplev0alpha1 "github.com/grafana/grafana/pkg/apis/example/v0alpha1" | 
					
						
							| 
									
										
										
										
											2023-11-01 21:44:04 +08:00
										 |  |  | 	"github.com/grafana/grafana/pkg/apis/playlist" | 
					
						
							| 
									
										
										
										
											2023-09-27 05:15:15 +08:00
										 |  |  | 	playlistsv0alpha1 "github.com/grafana/grafana/pkg/apis/playlist/v0alpha1" | 
					
						
							| 
									
										
										
										
											2023-09-26 06:31:58 +08:00
										 |  |  | 	"github.com/grafana/grafana/pkg/registry" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var ( | 
					
						
							|  |  |  | 	_ registry.BackgroundService = (*Service)(nil) | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Service struct{} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-07 02:55:22 +08:00
										 |  |  | // ProvideService is an entry point for each service that will force initialization
 | 
					
						
							|  |  |  | // and give each builder the chance to register itself with the main server
 | 
					
						
							| 
									
										
										
										
											2023-09-26 06:31:58 +08:00
										 |  |  | func ProvideService( | 
					
						
							| 
									
										
										
										
											2023-11-01 21:44:04 +08:00
										 |  |  | 	_ *playlist.PlaylistAPIBuilder, | 
					
						
							| 
									
										
										
										
											2023-09-27 05:15:15 +08:00
										 |  |  | 	_ *playlistsv0alpha1.PlaylistAPIBuilder, | 
					
						
							| 
									
										
										
										
											2023-10-07 02:55:22 +08:00
										 |  |  | 	_ *examplev0alpha1.TestingAPIBuilder, | 
					
						
							| 
									
										
										
										
											2023-09-26 06:31:58 +08:00
										 |  |  | ) *Service { | 
					
						
							|  |  |  | 	return &Service{} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func (s *Service) Run(ctx context.Context) error { | 
					
						
							|  |  |  | 	<-ctx.Done() | 
					
						
							|  |  |  | 	return nil | 
					
						
							|  |  |  | } |