Documentation
¶
Index ¶
- func BirdBrowser(ypath source.Opener, json string) (*node.Browser, map[string]*Bird)
- func BirdDevice(ypath source.Opener, json string) (*device.Local, map[string]*Bird)
- func BirdModule(ypath source.Opener) *meta.Module
- func BirdNode(birds map[string]*Bird) node.Node
- func Manage(c *Car) node.Node
- type Bird
- type Car
- type CarListener
- type Species
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BirdBrowser ¶
func BirdDevice ¶
Types ¶
type Car ¶
type Car struct {
Tire []*tire
// Not everything has to be structs, using a map may be useful
// in early prototyping
Specs map[string]interface{}
Miles int64
Running bool
// When the tires were last rotated
LastRotation int64
// Default speed value is in yang model file and free's your code
// from hardcoded values, even if they are only default values
// units milliseconds/mile
Speed int
// contains filtered or unexported fields
}
//////////////////////// C A R Your application code.
Notice there are no reference to C2Stack in this file. This means your code remains: - unit test-able - Not auto-generated from model files - free of golang source code annotations/tags.
func (*Car) OnUpdate ¶
func (c *Car) OnUpdate(l CarListener) nodeutil.Subscription
type CarListener ¶
type CarListener func(c *Car)
Click to show internal directories.
Click to hide internal directories.