motionsensor

package
v0.0.0-...-3a0ac50 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMotionSensorApiClientFactory

func WithMotionSensorApiClientFactory(f func(name string) (traits.MotionSensorApiClient, error)) router.Option

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

func WithMotionSensorSensorInfoClientFactory

func WithMotionSensorSensorInfoClientFactory(f func(name string) (traits.MotionSensorSensorInfoClient, error)) router.Option

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

func WrapApi

WrapApi adapts a traits.MotionSensorApiServer and presents it as a traits.MotionSensorApiClient

func WrapSensorInfo

WrapSensorInfo adapts a traits.MotionSensorSensorInfoServer and presents it as a traits.MotionSensorSensorInfoClient

Types

type ApiRouter

ApiRouter is a traits.MotionSensorApiServer that allows routing named requests to specific traits.MotionSensorApiClient

func NewApiRouter

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

func (*ApiRouter) Add

func (r *ApiRouter) Add(name string, client interface{}) interface{}

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

func (*ApiRouter) AddMotionSensorApiClient

func (r *ApiRouter) AddMotionSensorApiClient(name string, client traits.MotionSensorApiClient) traits.MotionSensorApiClient

func (*ApiRouter) GetMotionDetection

func (r *ApiRouter) GetMotionDetection(ctx context.Context, request *traits.GetMotionDetectionRequest) (*traits.MotionDetection, error)

func (*ApiRouter) GetMotionSensorApiClient

func (r *ApiRouter) GetMotionSensorApiClient(name string) (traits.MotionSensorApiClient, error)

func (*ApiRouter) HoldsType

func (r *ApiRouter) HoldsType(client interface{}) bool

func (*ApiRouter) Register

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

func (*ApiRouter) RemoveMotionSensorApiClient

func (r *ApiRouter) RemoveMotionSensorApiClient(name string) traits.MotionSensorApiClient

type SensorInfoRouter

SensorInfoRouter is a traits.MotionSensorSensorInfoServer that allows routing named requests to specific traits.MotionSensorSensorInfoClient

func NewSensorInfoRouter

func NewSensorInfoRouter(opts ...router.Option) *SensorInfoRouter

func (*SensorInfoRouter) Add

func (r *SensorInfoRouter) Add(name string, client interface{}) interface{}

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

func (*SensorInfoRouter) AddMotionSensorSensorInfoClient

func (r *SensorInfoRouter) AddMotionSensorSensorInfoClient(name string, client traits.MotionSensorSensorInfoClient) traits.MotionSensorSensorInfoClient

func (*SensorInfoRouter) DescribeMotionDetection

func (*SensorInfoRouter) GetMotionSensorSensorInfoClient

func (r *SensorInfoRouter) GetMotionSensorSensorInfoClient(name string) (traits.MotionSensorSensorInfoClient, error)

func (*SensorInfoRouter) HoldsType

func (r *SensorInfoRouter) HoldsType(client interface{}) bool

func (*SensorInfoRouter) Register

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

func (*SensorInfoRouter) RemoveMotionSensorSensorInfoClient

func (r *SensorInfoRouter) RemoveMotionSensorSensorInfoClient(name string) traits.MotionSensorSensorInfoClient

Jump to

Keyboard shortcuts

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