grafana/pkg/registry/apis/apis.go

32 lines
772 B
Go
Raw Normal View History

package apiregistry
import (
"context"
2023-10-07 02:55:22 +08:00
examplev0alpha1 "github.com/grafana/grafana/pkg/apis/example/v0alpha1"
"github.com/grafana/grafana/pkg/apis/playlist"
2023-09-27 05:15:15 +08:00
playlistsv0alpha1 "github.com/grafana/grafana/pkg/apis/playlist/v0alpha1"
"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
func ProvideService(
_ *playlist.PlaylistAPIBuilder,
2023-09-27 05:15:15 +08:00
_ *playlistsv0alpha1.PlaylistAPIBuilder,
2023-10-07 02:55:22 +08:00
_ *examplev0alpha1.TestingAPIBuilder,
) *Service {
return &Service{}
}
func (s *Service) Run(ctx context.Context) error {
<-ctx.Done()
return nil
}