Versions in this module Expand all Collapse all v0 v0.0.5 Oct 12, 2022 v0.0.4 May 25, 2022 Changes in this version + const MetadataDeviceType + const MetadataRealism + const MetadataRealismModel + const MetadataRealismVirtual + var AutoTraitMetadata = map[string]string + var MetadataTraitNotSupported = errors.New("metadata is not supported") + type Announcer interface + Announce func(name string, features ...Feature) + type ClientFactory func(conn *grpc.ClientConn) interface + type Feature interface + func HasClient(clients ...interface{}) Feature + func HasSimulation(s scrub.Scrubber) Feature + func HasTrait(name trait.Name, opt ...TraitOption) Feature + type Node struct + func New(name string) *Node + func (n *Node) AddClientFactory(traitName trait.Name, f ClientFactory) + func (n *Node) AddRouter(r ...router.Router) + func (n *Node) AddTraitFactory(traitName trait.Name, f TraitFactory) + func (n *Node) Announce(name string, features ...Feature) + func (n *Node) AnnounceOnRouterChange(name trait.Name, opts ...TraitOption) router.Option + func (n *Node) CreateDeviceTrait(deviceName string, traitName trait.Name, config proto.Message) error + func (n *Node) CreateTraitClient(traitName trait.Name, conn *grpc.ClientConn) (interface{}, error) + func (n *Node) Name() string + func (n *Node) Register(s *grpc.Server) + func (n *Node) ResolveRemoteConn(ctx context.Context, endpoint string, opts ...RemoteOption) (*grpc.ClientConn, error) + func (n *Node) Scrub(t time.Time) error + func (n *Node) SupportedDeviceTraits() []trait.Name + func (n *Node) SupportedRemoteTraits() []trait.Name + type RemoteOption func(n *remoteNode) + func WithRemoteInsecure() RemoteOption + func WithRemoteServerCA(ca []byte) RemoteOption + type TraitFactory func(name string, config proto.Message) error + type TraitOption func(t *traitFeature) + func NoAddChildTrait() TraitOption + func NoAddMetadata() TraitOption + func WithClients(client ...interface{}) TraitOption + func WithTraitMetadata(md map[string]string) TraitOption