handlerstub

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 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) Cleanup

func (hs *HandlerStub) Cleanup()

Cleanup resources

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

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

Send2Cloud sends message to cloudhub by edgehub

func (*HandlerStub) Start

func (hs *HandlerStub) Start(c *context.Context)

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 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) 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(context *context.Context, pm *PodManager) (*UpstreamController, error)

NewUpstreamController creates a upstream controller

func (*UpstreamController) Start

func (dc *UpstreamController) Start() error

Start upstream

func (*UpstreamController) Stop

func (dc *UpstreamController) Stop() error

Stop UpstreamController

func (*UpstreamController) SyncPods

func (dc *UpstreamController) SyncPods(stop chan struct{})

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