alltraits

package
v0.0.0-test-multiarch Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func AddSupport(n node.Supporter)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL