node

package
v0.0.0-...-e06a683 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 12 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) GetStats

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

GetStatus get status TODO: add an error handling middleware like baetyl-cloud @chensheng

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