1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-12 21:39:30 +00:00

Merge pull request #61 from KevinJoiner/schema-wather

Updates Schemas watch logic.
This commit is contained in:
Kevin Joiner
2022-12-02 10:29:04 -05:00
committed by GitHub
11 changed files with 760 additions and 56 deletions

View File

@@ -14,18 +14,9 @@ import (
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/cache"
"k8s.io/apiserver/pkg/authentication/user"
"k8s.io/apiserver/pkg/endpoints/request"
)
type Factory interface {
Schemas(user user.Info) (*types.APISchemas, error)
ByGVR(gvr schema.GroupVersionResource) string
ByGVK(gvr schema.GroupVersionKind) string
OnChange(ctx context.Context, cb func())
AddTemplate(template ...Template)
}
type Collection struct {
toSync int32
baseSchema *types.APISchemas