brightnesssensor

package
v0.0.0-...-0f67f6e Latest Latest
Warning

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

Go to latest
Published: Oct 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.

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.ServiceRegistrar)

func (*ApiRouter) RemoveBrightnessSensorApiClient

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

type ApiWrapper

type ApiWrapper struct {
	traits.BrightnessSensorApiClient
	// contains filtered or unexported fields
}

func WrapApi

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

func (*ApiWrapper) Unwrap

func (w *ApiWrapper) Unwrap() any

Unwrap implements wrap.Unwrapper and returns the underlying server instance as an unknown type.

func (*ApiWrapper) UnwrapServer

func (w *ApiWrapper) UnwrapServer() traits.BrightnessSensorApiServer

UnwrapServer returns the underlying server instance.

func (*ApiWrapper) UnwrapService

func (w *ApiWrapper) UnwrapService() (grpc.ClientConnInterface, grpc.ServiceDesc)

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.ServiceRegistrar)

func (*InfoRouter) RemoveBrightnessSensorInfoClient

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

type InfoWrapper

type InfoWrapper struct {
	traits.BrightnessSensorInfoClient
	// contains filtered or unexported fields
}

func WrapInfo

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

func (*InfoWrapper) Unwrap

func (w *InfoWrapper) Unwrap() any

Unwrap implements wrap.Unwrapper and returns the underlying server instance as an unknown type.

func (*InfoWrapper) UnwrapServer

func (w *InfoWrapper) UnwrapServer() traits.BrightnessSensorInfoServer

UnwrapServer returns the underlying server instance.

func (*InfoWrapper) UnwrapService

func (w *InfoWrapper) UnwrapService() (grpc.ClientConnInterface, grpc.ServiceDesc)

Jump to

Keyboard shortcuts

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