Documentation ¶
Index ¶
- type ControllerStub
- type DownstreamController
- type PodManager
- func (pm *PodManager) AddPod(k string, v types.FakePod)
- func (pm *PodManager) DeletePod(k string)
- func (pm *PodManager) GetEvent() chan *model.Message
- func (pm *PodManager) GetPod(key string) types.FakePod
- func (pm *PodManager) ListPods() []types.FakePod
- func (pm *PodManager) PodHandlerFunc(w http.ResponseWriter, req *http.Request)
- func (pm *PodManager) UpdatePodStatus(k string, s string)
- type UpstreamController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerStub ¶
type ControllerStub struct { }
HandlerStub definition
func (*ControllerStub) Enable ¶ added in v1.6.1
func (*ControllerStub) Enable() bool
type DownstreamController ¶
type DownstreamController struct {
// contains filtered or unexported fields
}
DownstreamController receives http request and send to cloudhub
func NewDownstreamController ¶
func NewDownstreamController(pm *PodManager) (*DownstreamController, error)
NewDownstreamController creates a downstream controller
func (*DownstreamController) Start ¶
func (dc *DownstreamController) Start() error
Start DownstreamController
func (*DownstreamController) SyncPods ¶
func (dc *DownstreamController) SyncPods()
SyncPods is used to send message to cloudhub
type PodManager ¶
type PodManager struct {
// contains filtered or unexported fields
}
PodManager is a manager watch pod change event
func (*PodManager) AddPod ¶
func (pm *PodManager) AddPod(k string, v types.FakePod)
AddPod adds pod in cache
func (*PodManager) DeletePod ¶
func (pm *PodManager) DeletePod(k string)
DeletePod deletes pod in cache
func (*PodManager) GetEvent ¶
func (pm *PodManager) GetEvent() chan *model.Message
GetEvent return a channel which receives event
func (*PodManager) GetPod ¶
func (pm *PodManager) GetPod(key string) types.FakePod
GetPod gets pod from cache
func (*PodManager) ListPods ¶
func (pm *PodManager) ListPods() []types.FakePod
ListPods lists all pods in cache
func (*PodManager) PodHandlerFunc ¶
func (pm *PodManager) PodHandlerFunc(w http.ResponseWriter, req *http.Request)
PodHandlerFunc is used to receive and process message
func (*PodManager) UpdatePodStatus ¶
func (pm *PodManager) UpdatePodStatus(k string, s string)
UpdatePodStatus update pod status in cache
type UpstreamController ¶
type UpstreamController struct {
// contains filtered or unexported fields
}
UpstreamController subscribe messages from edge
func NewUpstreamController ¶
func NewUpstreamController(pm *PodManager) (*UpstreamController, error)
NewUpstreamController creates a upstream controller
func (*UpstreamController) Start ¶
func (uc *UpstreamController) Start() error
Start UpstreamController
func (*UpstreamController) UpdatePodStatus ¶
func (uc *UpstreamController) UpdatePodStatus()
UpdatePodStatus is used to update pod status in cache map
func (*UpstreamController) WaitforMessage ¶
func (uc *UpstreamController) WaitforMessage()
WaitforMessage from cloudhub