controllerstub

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func (*ControllerStub) Group

func (*ControllerStub) Group() string

Return module group

func (*ControllerStub) Name

func (*ControllerStub) Name() string

Return module name

func (*ControllerStub) Start

func (cs *ControllerStub) Start()

Start controller hub

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 NewPodManager

func NewPodManager() (*PodManager, error)

NewPodManager creates pod manger

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL