brightnesssensor

package
v0.0.0-...-fb4a7ab Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBrightnessSensorApiClientFactory

func WithBrightnessSensorApiClientFactory(f func(name string) (traits.BrightnessSensorApiClient, error)) router.Option

WithBrightnessSensorApiClientFactory instructs the router to create a new client the first time Get is called for that name.

func WithBrightnessSensorInfoClientFactory

func WithBrightnessSensorInfoClientFactory(f func(name string) (traits.BrightnessSensorInfoClient, error)) router.Option

WithBrightnessSensorInfoClientFactory instructs the router to create a new client the first time Get is called for that name.

func WrapApi

WrapApi adapts a traits.BrightnessSensorApiServer and presents it as a traits.BrightnessSensorApiClient

func WrapInfo

WrapInfo adapts a traits.BrightnessSensorInfoServer and presents it as a traits.BrightnessSensorInfoClient

Types

type ApiRouter

ApiRouter is a traits.BrightnessSensorApiServer that allows routing named requests to specific traits.BrightnessSensorApiClient

func NewApiRouter

func NewApiRouter(opts ...router.Option) *ApiRouter

func (*ApiRouter) Add

func (r *ApiRouter) Add(name string, client any) any

Add extends Router.Add to panic if client is not of type traits.BrightnessSensorApiClient.

func (*ApiRouter) AddBrightnessSensorApiClient

func (r *ApiRouter) AddBrightnessSensorApiClient(name string, client traits.BrightnessSensorApiClient) traits.BrightnessSensorApiClient

func (*ApiRouter) GetAmbientBrightness

func (r *ApiRouter) GetAmbientBrightness(ctx context.Context, request *traits.GetAmbientBrightnessRequest) (*traits.AmbientBrightness, error)

func (*ApiRouter) GetBrightnessSensorApiClient

func (r *ApiRouter) GetBrightnessSensorApiClient(name string) (traits.BrightnessSensorApiClient, error)

func (*ApiRouter) HoldsType

func (r *ApiRouter) HoldsType(client any) bool

func (*ApiRouter) Register

func (r *ApiRouter) Register(server *grpc.Server)

func (*ApiRouter) RemoveBrightnessSensorApiClient

func (r *ApiRouter) RemoveBrightnessSensorApiClient(name string) traits.BrightnessSensorApiClient

type InfoRouter

InfoRouter is a traits.BrightnessSensorInfoServer that allows routing named requests to specific traits.BrightnessSensorInfoClient

func NewInfoRouter

func NewInfoRouter(opts ...router.Option) *InfoRouter

func (*InfoRouter) Add

func (r *InfoRouter) Add(name string, client any) any

Add extends Router.Add to panic if client is not of type traits.BrightnessSensorInfoClient.

func (*InfoRouter) AddBrightnessSensorInfoClient

func (r *InfoRouter) AddBrightnessSensorInfoClient(name string, client traits.BrightnessSensorInfoClient) traits.BrightnessSensorInfoClient

func (*InfoRouter) DescribeAmbientBrightness

func (*InfoRouter) GetBrightnessSensorInfoClient

func (r *InfoRouter) GetBrightnessSensorInfoClient(name string) (traits.BrightnessSensorInfoClient, error)

func (*InfoRouter) HoldsType

func (r *InfoRouter) HoldsType(client any) bool

func (*InfoRouter) Register

func (r *InfoRouter) Register(server *grpc.Server)

func (*InfoRouter) RemoveBrightnessSensorInfoClient

func (r *InfoRouter) RemoveBrightnessSensorInfoClient(name string) traits.BrightnessSensorInfoClient

Jump to

Keyboard shortcuts

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