mirror of
https://github.com/rancher/steve.git
synced 2025-09-16 15:29:04 +00:00
SQLite backed cache (#223)
This uses SQLite-backed informers provided by Lasso with https://github.com/rancher/lasso/pull/65 to implement Steve API (/v1/) functionality. This new functionality is available behind a feature flag to be specified at Steve startup See https://confluence.suse.com/pages/viewpage.action?pageId=1359086083 Co-authored-by: Ricardo Weir <ricardo.weir@suse.com> Co-authored-by: Michael Bolot <michael.bolot@suse.com> Co-authored-by: Silvio Moioli <silvio@moioli.net> Signed-off-by: Silvio Moioli <silvio@moioli.net>
This commit is contained in:
@@ -31,8 +31,10 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
type SchemasHandler interface {
|
||||
OnSchemas(schemas *schema2.Collection) error
|
||||
type SchemasHandlerFunc func(schemas *schema2.Collection) error
|
||||
|
||||
func (s SchemasHandlerFunc) OnSchemas(schemas *schema2.Collection) error {
|
||||
return s(schemas)
|
||||
}
|
||||
|
||||
type handler struct {
|
||||
@@ -45,7 +47,7 @@ type handler struct {
|
||||
cols *common.DynamicColumns
|
||||
crd apiextcontrollerv1.CustomResourceDefinitionClient
|
||||
ssar authorizationv1client.SelfSubjectAccessReviewInterface
|
||||
handler SchemasHandler
|
||||
handler SchemasHandlerFunc
|
||||
}
|
||||
|
||||
func Register(ctx context.Context,
|
||||
@@ -54,7 +56,7 @@ func Register(ctx context.Context,
|
||||
crd apiextcontrollerv1.CustomResourceDefinitionController,
|
||||
apiService v1.APIServiceController,
|
||||
ssar authorizationv1client.SelfSubjectAccessReviewInterface,
|
||||
schemasHandler SchemasHandler,
|
||||
schemasHandler SchemasHandlerFunc,
|
||||
schemas *schema2.Collection) {
|
||||
|
||||
h := &handler{
|
||||
|
Reference in New Issue
Block a user