handlerstub

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerStub

type HandlerStub struct {
	// contains filtered or unexported fields
}

HandlerStub definition

func (*HandlerStub) Enable added in v1.6.1

func (*HandlerStub) Enable() bool

func (*HandlerStub) Group

func (*HandlerStub) Group() string

Return module group

func (*HandlerStub) Name

func (*HandlerStub) Name() string

Return module name

func (*HandlerStub) ProcessDelete

func (hs *HandlerStub) ProcessDelete(msg model.Message)

ProcessDelete message

func (*HandlerStub) ProcessInsert

func (hs *HandlerStub) ProcessInsert(msg model.Message)

ProcessInsert message

func (*HandlerStub) ProcessMessage

func (hs *HandlerStub) ProcessMessage(msg model.Message)

ProcessMessage based on the operation type

func (*HandlerStub) SendToCloud added in v1.6.1

func (hs *HandlerStub) SendToCloud(msg *model.Message)

SendToCloud sends message to cloudhub by edgehub

func (*HandlerStub) Start

func (hs *HandlerStub) Start()

Start handler hub

func (*HandlerStub) WaitforMessage

func (hs *HandlerStub) WaitforMessage()

WaitforMessage is used to receive and process message

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 manager

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) ListPods

func (pm *PodManager) ListPods() []types.FakePod

ListPods lists all pods in cache

type UpstreamController

type UpstreamController struct {
	// contains filtered or unexported fields
}

UpstreamController sends message to edghub

func NewUpstreamController

func NewUpstreamController(pm *PodManager) (*UpstreamController, error)

NewUpstreamController creates a upstream controller

func (*UpstreamController) Start

func (dc *UpstreamController) Start() error

Start upstream

func (*UpstreamController) SyncPods

func (dc *UpstreamController) SyncPods()

SyncPods is used to send simulation messages to edgehub periodically

Jump to

Keyboard shortcuts

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