node

package
v0.0.0-...-bf6c27f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const OfflineDuration = 40 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

Node node

func NewNode

func NewNode(store *bh.Store) (*Node, error)

NewNode create a node with shadow

func (*Node) Desire

func (s *Node) Desire(desired v1.Desire) (delta v1.Desire, err error)

Desire update shadow desired data, then return the delta of desired and reported data

func (*Node) Get

func (s *Node) Get() (m *v1.Node, err error)

Get returns node model

func (*Node) GetStatus

func (s *Node) GetStatus(ctx *routing.Context) error

GetStatus get status

func (*Node) Report

func (s *Node) Report(reported v1.Report) (delta v1.Desire, err error)

Report update shadow reported data, then return the delta of desired and reported data

Jump to

Keyboard shortcuts

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