Documentation ¶
Index ¶
- func NegotiateInputSerializer(req *http.Request, streaming bool, ns runtime.NegotiatedSerializer) (runtime.SerializerInfo, error)
- func ObjectToFieldLabels(obj metav1.Object) fields.Fields
- type APIStorage
- func (s *APIStorage) Get(key types.NamespacedName) (*unstructured.Unstructured, bool)
- func (s *APIStorage) Insert(obj *unstructured.Unstructured)
- func (s *APIStorage) Items() []unstructured.Unstructured
- func (s *APIStorage) Remove(key types.NamespacedName) (*unstructured.Unstructured, bool)
- func (s *APIStorage) RemoveForNamespace(ns string)
- func (s *APIStorage) RemoveObj(obj *unstructured.Unstructured) (*unstructured.Unstructured, bool)
- type Options
- type Server
- func (s *Server) APIGroup(w http.ResponseWriter, r *http.Request)
- func (s *Server) APIGroupList(w http.ResponseWriter, r *http.Request)
- func (s *Server) APIResourceList(w http.ResponseWriter, r *http.Request)
- func (s *Server) APIRoot(w http.ResponseWriter, r *http.Request)
- func (s *Server) APIVersions(w http.ResponseWriter, r *http.Request)
- func (s *Server) Checkpoint()
- func (s *Server) Create(w http.ResponseWriter, r *http.Request)
- func (s *Server) CreateImpl(store *APIStorage, codec runtime.Codec, r *http.Request) (runtime.Object, error)
- func (s *Server) Delete(w http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteCollection(w http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteCollectionImpl(store *APIStorage, r *http.Request) (runtime.Object, error)
- func (s *Server) DeleteImpl(store *APIStorage, r *http.Request) (*unstructured.Unstructured, error)
- func (s *Server) Export() ([]unstructured.Unstructured, []unstructured.Unstructured)
- func (s *Server) Get(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetImpl(store *APIStorage, r *http.Request) (runtime.Object, error)
- func (s *Server) Healthz(w http.ResponseWriter, r *http.Request)
- func (s *Server) List(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListImpl(store *APIStorage, r *http.Request) (runtime.Object, error)
- func (s *Server) NextResourceVersion() int64
- func (s *Server) Patch(w http.ResponseWriter, r *http.Request)
- func (s *Server) PatchImpl(store *APIStorage, codec runtime.Codec, r *http.Request) (runtime.Object, error)
- func (s *Server) PatchStatus(w http.ResponseWriter, r *http.Request)
- func (s *Server) Register(m chi.Router)
- func (s *Server) RemoveNamespace(ns string)
- func (s *Server) Run() (*http.Server, *rest.Config, error)
- func (s *Server) Store(r *http.Request) *APIStorage
- func (s *Server) StoreForGVR(gvr schema.GroupVersionResource) *APIStorage
- func (s *Server) Update(w http.ResponseWriter, r *http.Request)
- func (s *Server) UpdateImpl(store *APIStorage, codec runtime.Codec, r *http.Request) (runtime.Object, error)
- func (s *Server) UpdateStatus(w http.ResponseWriter, r *http.Request)
- func (s *Server) Version(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NegotiateInputSerializer ¶
func NegotiateInputSerializer(req *http.Request, streaming bool, ns runtime.NegotiatedSerializer) (runtime.SerializerInfo, error)
NegotiateInputSerializer returns the input serializer for the provided request.
Types ¶
type APIStorage ¶
type APIStorage struct { GVR schema.GroupVersionResource GVK schema.GroupVersionKind Namespaced bool Current map[types.NamespacedName]*unstructured.Unstructured Deleted map[types.NamespacedName]*unstructured.Unstructured // contains filtered or unexported fields }
func (*APIStorage) Get ¶
func (s *APIStorage) Get(key types.NamespacedName) (*unstructured.Unstructured, bool)
func (*APIStorage) Insert ¶
func (s *APIStorage) Insert(obj *unstructured.Unstructured)
func (*APIStorage) Items ¶
func (s *APIStorage) Items() []unstructured.Unstructured
func (*APIStorage) Remove ¶
func (s *APIStorage) Remove(key types.NamespacedName) (*unstructured.Unstructured, bool)
func (*APIStorage) RemoveForNamespace ¶
func (s *APIStorage) RemoveForNamespace(ns string)
func (*APIStorage) RemoveObj ¶
func (s *APIStorage) RemoveObj(obj *unstructured.Unstructured) (*unstructured.Unstructured, bool)
type Options ¶
type Options struct { // Scheme includes all of the types used by this group and how to convert between them (or // to convert objects from outside of this group that are accepted in this API). Scheme *runtime.Scheme // NegotiatedSerializer controls how this group encodes and decodes data NegotiatedSerializer runtime.NegotiatedSerializer // ParameterCodec performs conversions for query parameters passed to API calls ParameterCodec runtime.ParameterCodec IncludeAPIGroups sets.String }
func NewOptions ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) APIGroupList ¶
func (s *Server) APIGroupList(w http.ResponseWriter, r *http.Request)
func (*Server) APIResourceList ¶
func (s *Server) APIResourceList(w http.ResponseWriter, r *http.Request)
func (*Server) APIVersions ¶
func (s *Server) APIVersions(w http.ResponseWriter, r *http.Request)
func (*Server) Checkpoint ¶
func (s *Server) Checkpoint()
func (*Server) CreateImpl ¶
func (*Server) DeleteCollection ¶
func (s *Server) DeleteCollection(w http.ResponseWriter, r *http.Request)
func (*Server) DeleteCollectionImpl ¶
func (*Server) DeleteImpl ¶
func (s *Server) DeleteImpl(store *APIStorage, r *http.Request) (*unstructured.Unstructured, error)
func (*Server) Export ¶
func (s *Server) Export() ([]unstructured.Unstructured, []unstructured.Unstructured)
func (*Server) NextResourceVersion ¶
func (*Server) PatchImpl ¶
func (*Server) PatchStatus ¶
func (s *Server) PatchStatus(w http.ResponseWriter, r *http.Request)
func (*Server) RemoveNamespace ¶
func (*Server) Run ¶
https://levelup.gitconnected.com/listening-to-random-available-port-in-go-3541dddbb0c5 https://medium.com/honestbee-tw-engineer/gracefully-shutdown-in-go-http-server-5f5e6b83da5a
func (*Server) StoreForGVR ¶
func (s *Server) StoreForGVR(gvr schema.GroupVersionResource) *APIStorage
func (*Server) UpdateImpl ¶
func (*Server) UpdateStatus ¶
func (s *Server) UpdateStatus(w http.ResponseWriter, r *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.