k8s.io/apiserver@v0.31.1/pkg/admission/plugin/policy/internal/generic/doc.go (about)

     1  /*
     2  Copyright 2022 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // Package generic contains a typed wrapper over cache SharedIndexInformer
    18  // and Lister (maybe eventually should have a home there?)
    19  //
    20  // This interface is being experimented with as an easier way to write controllers
    21  // with a bit less boilerplate.
    22  //
    23  // Informer/Lister classes are thin wrappers providing a type-safe interface
    24  // over regular interface{}-based Informers/Listers
    25  //
    26  // Controller[T] provides a reusable way to reconcile objects out of an informer
    27  // using the tried and true controller design pattern found all over k8s
    28  // codebase based upon syncFunc/reconcile
    29  package generic