Documentation
¶
Index ¶
- func WithMicrophoneApiClientFactory(f func(name string) (traits.MicrophoneApiClient, error)) router.Option
- func WithMicrophoneInfoClientFactory(f func(name string) (traits.MicrophoneInfoClient, error)) router.Option
- type ApiRouter
- func (r *ApiRouter) Add(name string, client any) any
- func (r *ApiRouter) AddMicrophoneApiClient(name string, client traits.MicrophoneApiClient) traits.MicrophoneApiClient
- func (r *ApiRouter) GetGain(ctx context.Context, request *traits.GetMicrophoneGainRequest) (*types.AudioLevel, error)
- func (r *ApiRouter) GetMicrophoneApiClient(name string) (traits.MicrophoneApiClient, error)
- func (r *ApiRouter) HoldsType(client any) bool
- func (r *ApiRouter) PullGain(request *traits.PullMicrophoneGainRequest, ...) error
- func (r *ApiRouter) Register(server grpc.ServiceRegistrar)
- func (r *ApiRouter) RemoveMicrophoneApiClient(name string) traits.MicrophoneApiClient
- func (r *ApiRouter) UpdateGain(ctx context.Context, request *traits.UpdateMicrophoneGainRequest) (*types.AudioLevel, error)
- type ApiWrapper
- type InfoRouter
- func (r *InfoRouter) Add(name string, client any) any
- func (r *InfoRouter) AddMicrophoneInfoClient(name string, client traits.MicrophoneInfoClient) traits.MicrophoneInfoClient
- func (r *InfoRouter) DescribeGain(ctx context.Context, request *traits.DescribeGainRequest) (*traits.GainSupport, error)
- func (r *InfoRouter) GetMicrophoneInfoClient(name string) (traits.MicrophoneInfoClient, error)
- func (r *InfoRouter) HoldsType(client any) bool
- func (r *InfoRouter) Register(server grpc.ServiceRegistrar)
- func (r *InfoRouter) RemoveMicrophoneInfoClient(name string) traits.MicrophoneInfoClient
- type InfoWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithMicrophoneApiClientFactory ¶
func WithMicrophoneApiClientFactory(f func(name string) (traits.MicrophoneApiClient, error)) router.Option
WithMicrophoneApiClientFactory instructs the router to create a new client the first time Get is called for that name.
func WithMicrophoneInfoClientFactory ¶
func WithMicrophoneInfoClientFactory(f func(name string) (traits.MicrophoneInfoClient, error)) router.Option
WithMicrophoneInfoClientFactory instructs the router to create a new client the first time Get is called for that name.
Types ¶
type ApiRouter ¶
type ApiRouter struct {
traits.UnimplementedMicrophoneApiServer
router.Router
}
ApiRouter is a traits.MicrophoneApiServer that allows routing named requests to specific traits.MicrophoneApiClient
func NewApiRouter ¶
func (*ApiRouter) Add ¶
Add extends Router.Add to panic if client is not of type traits.MicrophoneApiClient.
func (*ApiRouter) AddMicrophoneApiClient ¶
func (r *ApiRouter) AddMicrophoneApiClient(name string, client traits.MicrophoneApiClient) traits.MicrophoneApiClient
func (*ApiRouter) GetGain ¶
func (r *ApiRouter) GetGain(ctx context.Context, request *traits.GetMicrophoneGainRequest) (*types.AudioLevel, error)
func (*ApiRouter) GetMicrophoneApiClient ¶
func (r *ApiRouter) GetMicrophoneApiClient(name string) (traits.MicrophoneApiClient, error)
func (*ApiRouter) PullGain ¶
func (r *ApiRouter) PullGain(request *traits.PullMicrophoneGainRequest, server traits.MicrophoneApi_PullGainServer) error
func (*ApiRouter) Register ¶
func (r *ApiRouter) Register(server grpc.ServiceRegistrar)
func (*ApiRouter) RemoveMicrophoneApiClient ¶
func (r *ApiRouter) RemoveMicrophoneApiClient(name string) traits.MicrophoneApiClient
func (*ApiRouter) UpdateGain ¶
func (r *ApiRouter) UpdateGain(ctx context.Context, request *traits.UpdateMicrophoneGainRequest) (*types.AudioLevel, error)
type ApiWrapper ¶
type ApiWrapper struct {
traits.MicrophoneApiClient
// contains filtered or unexported fields
}
func WrapApi ¶
func WrapApi(server traits.MicrophoneApiServer) *ApiWrapper
WrapApi adapts a traits.MicrophoneApiServer and presents it as a traits.MicrophoneApiClient
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.MicrophoneApiServer
UnwrapServer returns the underlying server instance.
func (*ApiWrapper) UnwrapService ¶
func (w *ApiWrapper) UnwrapService() (grpc.ClientConnInterface, grpc.ServiceDesc)
type InfoRouter ¶
type InfoRouter struct {
traits.UnimplementedMicrophoneInfoServer
router.Router
}
InfoRouter is a traits.MicrophoneInfoServer that allows routing named requests to specific traits.MicrophoneInfoClient
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.MicrophoneInfoClient.
func (*InfoRouter) AddMicrophoneInfoClient ¶
func (r *InfoRouter) AddMicrophoneInfoClient(name string, client traits.MicrophoneInfoClient) traits.MicrophoneInfoClient
func (*InfoRouter) DescribeGain ¶
func (r *InfoRouter) DescribeGain(ctx context.Context, request *traits.DescribeGainRequest) (*traits.GainSupport, error)
func (*InfoRouter) GetMicrophoneInfoClient ¶
func (r *InfoRouter) GetMicrophoneInfoClient(name string) (traits.MicrophoneInfoClient, error)
func (*InfoRouter) HoldsType ¶
func (r *InfoRouter) HoldsType(client any) bool
func (*InfoRouter) Register ¶
func (r *InfoRouter) Register(server grpc.ServiceRegistrar)
func (*InfoRouter) RemoveMicrophoneInfoClient ¶
func (r *InfoRouter) RemoveMicrophoneInfoClient(name string) traits.MicrophoneInfoClient
type InfoWrapper ¶
type InfoWrapper struct {
traits.MicrophoneInfoClient
// contains filtered or unexported fields
}
func WrapInfo ¶
func WrapInfo(server traits.MicrophoneInfoServer) *InfoWrapper
WrapInfo adapts a traits.MicrophoneInfoServer and presents it as a traits.MicrophoneInfoClient
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.MicrophoneInfoServer
UnwrapServer returns the underlying server instance.
func (*InfoWrapper) UnwrapService ¶
func (w *InfoWrapper) UnwrapService() (grpc.ClientConnInterface, grpc.ServiceDesc)