The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/registry/corecrd/registry.go

27 lines
744 B

package corecrd
import (
"github.com/grafana/kindsys/k8ssys"
"github.com/grafana/thema"
"github.com/grafana/grafana/pkg/registry/corekind"
)
// New constructs a new [Registry].
//
// All calling code within grafana/grafana is expected to use Grafana's
// singleton [thema.Runtime], returned from [cuectx.GrafanaThemaRuntime]. If nil
// is passed, the singleton will be used.
func New(rt *thema.Runtime) *Registry {
breg := corekind.NewBase(rt)
return doNewRegistry(breg)
}
// All returns a slice of all core Grafana CRDs in the registry.
//
// The returned slice is guaranteed to be alphabetically sorted by kind name.
func (r *Registry) All() []k8ssys.Kind {
all := make([]k8ssys.Kind, len(r.all))
copy(all, r.all[:])
return all
}