messagelayer

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextMessageLayer

type ContextMessageLayer struct {
}

ContextMessageLayer build on context

func (*ContextMessageLayer) Done

func (cml *ContextMessageLayer) Done() <-chan struct{}

Done signals the message layer is done

func (*ContextMessageLayer) ReceiveResourceUpdate

func (cml *ContextMessageLayer) ReceiveResourceUpdate() (*ResourceUpdateSpec, error)

ReceiveResourceUpdate receives and handles the update

func (*ContextMessageLayer) SendResourceObject

func (cml *ContextMessageLayer) SendResourceObject(nodeName string, eventType watch.EventType, obj interface{}) error

SendResourceObject message to the node with resource object and event type

type MessageLayer

type MessageLayer interface {
	SendResourceObject(nodeName string, eventType watch.EventType, obj interface{}) error
	ReceiveResourceUpdate() (*ResourceUpdateSpec, error)
	Done() <-chan struct{}
}

MessageLayer define all functions that message layer must implement

func NewContextMessageLayer

func NewContextMessageLayer() MessageLayer

NewContextMessageLayer create a ContextMessageLayer

type ResourceUpdateSpec

type ResourceUpdateSpec struct {
	Kind      string
	Namespace string
	Name      string
	Operation string
	Content   []byte
}

ResourceUpdateSpec describes the resource update from upstream

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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