1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-17 07:48:52 +00:00

docs: Add docs for partition and proxy store

This commit is contained in:
Colleen Murphy
2022-10-14 16:17:32 -07:00
parent ea61c2187a
commit b16d502fc7
6 changed files with 111 additions and 16 deletions

View File

@@ -9,11 +9,13 @@ import (
"k8s.io/apiserver/pkg/endpoints/request"
)
// WatchRefresh implements types.Store with awareness of changes to the requester's access.
type WatchRefresh struct {
types.Store
asl accesscontrol.AccessSetLookup
}
// Watch performs a watch request which halts if the user's access level changes.
func (w *WatchRefresh) Watch(apiOp *types.APIRequest, schema *types.APISchema, wr types.WatchRequest) (chan types.APIEvent, error) {
user, ok := request.UserFrom(apiOp.Context())
if !ok {