Documentation ¶
Index ¶
- func GetIPFromRequest(r *http.Request) (string, error)
- func NewHandler(typeName string, add api.AddObj, update api.UpdateObj, delete api.DeleteObj, ...) cache.ResourceEventHandlerFuncs
- type Config
- type EventCount
- type K8sResourceHandler
- type MetaDataWrapper
- func (s *MetaDataWrapper) AddFlusher(w *Watcher)
- func (s *MetaDataWrapper) ListAndWatch(w http.ResponseWriter, r *http.Request)
- func (s *MetaDataWrapper) ListWithSemaphore(ctx context.Context, f *ioutil.WriteFlusher, ip string) (*Watcher, error)
- func (s *MetaDataWrapper) RemoveFlusher(w *Watcher)
- func (s *MetaDataWrapper) Shutdown()
- type PodResourceHandler
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { KubeAuthType kubernetes.AuthType KubeConfigDir string // EnableFetchReplicaSet controls whether to fetch ReplicaSet information. // The default value is false. It should be enabled if the ReplicaSet // is used to control pods in the third-party CRD except for Deployment. EnableFetchReplicaSet bool LogInterval int }
type EventCount ¶
func (*EventCount) AddEvent ¶
func (c *EventCount) AddEvent(operation string)
func (*EventCount) String ¶
func (c *EventCount) String() string
type K8sResourceHandler ¶
type K8sResourceHandler struct {
// contains filtered or unexported fields
}
func (*K8sResourceHandler) AddObj ¶
func (m *K8sResourceHandler) AddObj(obj interface{})
func (*K8sResourceHandler) DeleteObj ¶
func (m *K8sResourceHandler) DeleteObj(obj interface{})
func (*K8sResourceHandler) UpdateObj ¶
func (m *K8sResourceHandler) UpdateObj(objOld interface{}, objNew interface{})
type MetaDataWrapper ¶
type MetaDataWrapper struct { ReceivedPodsEventCount EventCount ReceivedRsEventCount EventCount ReceivedServiceEventCount EventCount ReceivedNodesEventCount EventCount // contains filtered or unexported fields }
func NewMetaDataWrapper ¶
func NewMetaDataWrapper(config *Config) (*MetaDataWrapper, error)
func (*MetaDataWrapper) AddFlusher ¶
func (s *MetaDataWrapper) AddFlusher(w *Watcher)
func (*MetaDataWrapper) ListAndWatch ¶
func (s *MetaDataWrapper) ListAndWatch(w http.ResponseWriter, r *http.Request)
func (*MetaDataWrapper) ListWithSemaphore ¶
func (s *MetaDataWrapper) ListWithSemaphore(ctx context.Context, f *ioutil.WriteFlusher, ip string) (*Watcher, error)
func (*MetaDataWrapper) RemoveFlusher ¶
func (s *MetaDataWrapper) RemoveFlusher(w *Watcher)
func (*MetaDataWrapper) Shutdown ¶
func (s *MetaDataWrapper) Shutdown()
type PodResourceHandler ¶
type PodResourceHandler struct {
K8sResourceHandler
}
func (*PodResourceHandler) AddPod ¶
func (prh *PodResourceHandler) AddPod(obj interface{})
func (*PodResourceHandler) DeleteObj ¶
func (prh *PodResourceHandler) DeleteObj(obj interface{})
func (*PodResourceHandler) UpdatePod ¶
func (prh *PodResourceHandler) UpdatePod(objOld interface{}, objNew interface{})
Click to show internal directories.
Click to hide internal directories.