Documentation ¶
Index ¶
- Variables
- func APIClient(conn grpc.ClientConnInterface, t trait.Name) any
- func AddSupport(n node.Supporter)
- func HistoryClient(conn grpc.ClientConnInterface, t trait.Name) any
- func InfoClient(conn grpc.ClientConnInterface, t trait.Name) any
- func RegisterAPIClientFactory(t trait.Name, f ClientFactory)
- func RegisterHistoryClientFactory(t trait.Name, f ClientFactory)
- func RegisterInfoClientFactory(t trait.Name, f ClientFactory)
- type ClientFactory
Constants ¶
This section is empty.
Variables ¶
var LightingTestHolder = &lighttest.Holder{}
Functions ¶
func APIClient ¶
func APIClient(conn grpc.ClientConnInterface, t trait.Name) any
APIClient returns the {trait}ApiClient implementation for the named trait. For example passing trait.OnOff would return traits.NewOnOffApiClient. Returns nil if the trait is not known.
func AddSupport ¶
AddSupport adds support to n for all known traits.
func HistoryClient ¶
func HistoryClient(conn grpc.ClientConnInterface, t trait.Name) any
HistoryClient returns the {trait}HistoryClient implementation for the named trait. For example passing trait.Meter would return traits.NewMeterHistoryClient. Returns nil if the trait is not known.
func InfoClient ¶
func InfoClient(conn grpc.ClientConnInterface, t trait.Name) any
InfoClient returns the {trait}InfoClient implementation for the named trait. For example passing trait.Meter would return traits.NewMeterInfoClient. Returns nil if the trait is not known or has no info aspect.
func RegisterAPIClientFactory ¶
func RegisterAPIClientFactory(t trait.Name, f ClientFactory)
RegisterAPIClientFactory registers a {trait}ApiClient factory for the named trait. This factory will take president over the default generated factory. Should be called before any call to APIClient, typically in init().
func RegisterHistoryClientFactory ¶
func RegisterHistoryClientFactory(t trait.Name, f ClientFactory)
RegisterHistoryClientFactory registers a {trait}HistoryClient factory for the named trait. This factory will take president over the default generated factory. Should be called before any call to HistoryClient, typically in init().
func RegisterInfoClientFactory ¶
func RegisterInfoClientFactory(t trait.Name, f ClientFactory)
RegisterInfoClientFactory registers a {trait}InfoClient factory for the named trait. This factory will take president over the default generated factory. Should be called before any call to InfoClient, typically in init().
Types ¶
type ClientFactory ¶
type ClientFactory func(conn grpc.ClientConnInterface) any