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

              Source Files