Documentation ¶
Index ¶
- func WithExtendRetractApiClientFactory(f func(name string) (traits.ExtendRetractApiClient, error)) router.Option
- func WithExtendRetractInfoClientFactory(f func(name string) (traits.ExtendRetractInfoClient, error)) router.Option
- type ApiRouter
- func (r *ApiRouter) Add(name string, client any) any
- func (r *ApiRouter) AddExtendRetractApiClient(name string, client traits.ExtendRetractApiClient) traits.ExtendRetractApiClient
- func (r *ApiRouter) CreateExtensionPreset(ctx context.Context, request *traits.CreateExtensionPresetRequest) (*traits.ExtensionPreset, error)
- func (r *ApiRouter) GetExtendRetractApiClient(name string) (traits.ExtendRetractApiClient, error)
- func (r *ApiRouter) GetExtension(ctx context.Context, request *traits.GetExtensionRequest) (*traits.Extension, error)
- func (r *ApiRouter) HoldsType(client any) bool
- func (r *ApiRouter) PullExtensions(request *traits.PullExtensionsRequest, ...) error
- func (r *ApiRouter) Register(server grpc.ServiceRegistrar)
- func (r *ApiRouter) RemoveExtendRetractApiClient(name string) traits.ExtendRetractApiClient
- func (r *ApiRouter) Stop(ctx context.Context, request *traits.ExtendRetractStopRequest) (*traits.Extension, error)
- func (r *ApiRouter) UpdateExtension(ctx context.Context, request *traits.UpdateExtensionRequest) (*traits.Extension, error)
- type ApiWrapper
- type InfoRouter
- func (r *InfoRouter) Add(name string, client any) any
- func (r *InfoRouter) AddExtendRetractInfoClient(name string, client traits.ExtendRetractInfoClient) traits.ExtendRetractInfoClient
- func (r *InfoRouter) DescribeExtension(ctx context.Context, request *traits.DescribeExtensionRequest) (*traits.ExtensionSupport, error)
- func (r *InfoRouter) GetExtendRetractInfoClient(name string) (traits.ExtendRetractInfoClient, error)
- func (r *InfoRouter) HoldsType(client any) bool
- func (r *InfoRouter) Register(server grpc.ServiceRegistrar)
- func (r *InfoRouter) RemoveExtendRetractInfoClient(name string) traits.ExtendRetractInfoClient
- type InfoWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithExtendRetractApiClientFactory ¶
func WithExtendRetractApiClientFactory(f func(name string) (traits.ExtendRetractApiClient, error)) router.Option
WithExtendRetractApiClientFactory instructs the router to create a new client the first time Get is called for that name.
func WithExtendRetractInfoClientFactory ¶
func WithExtendRetractInfoClientFactory(f func(name string) (traits.ExtendRetractInfoClient, error)) router.Option
WithExtendRetractInfoClientFactory instructs the router to create a new client the first time Get is called for that name.
Types ¶
type ApiRouter ¶
type ApiRouter struct { traits.UnimplementedExtendRetractApiServer router.Router }
ApiRouter is a traits.ExtendRetractApiServer that allows routing named requests to specific traits.ExtendRetractApiClient
func NewApiRouter ¶
func (*ApiRouter) Add ¶
Add extends Router.Add to panic if client is not of type traits.ExtendRetractApiClient.
func (*ApiRouter) AddExtendRetractApiClient ¶
func (r *ApiRouter) AddExtendRetractApiClient(name string, client traits.ExtendRetractApiClient) traits.ExtendRetractApiClient
func (*ApiRouter) CreateExtensionPreset ¶
func (r *ApiRouter) CreateExtensionPreset(ctx context.Context, request *traits.CreateExtensionPresetRequest) (*traits.ExtensionPreset, error)
func (*ApiRouter) GetExtendRetractApiClient ¶
func (r *ApiRouter) GetExtendRetractApiClient(name string) (traits.ExtendRetractApiClient, error)
func (*ApiRouter) GetExtension ¶
func (*ApiRouter) PullExtensions ¶
func (r *ApiRouter) PullExtensions(request *traits.PullExtensionsRequest, server traits.ExtendRetractApi_PullExtensionsServer) error
func (*ApiRouter) Register ¶
func (r *ApiRouter) Register(server grpc.ServiceRegistrar)
func (*ApiRouter) RemoveExtendRetractApiClient ¶
func (r *ApiRouter) RemoveExtendRetractApiClient(name string) traits.ExtendRetractApiClient
func (*ApiRouter) UpdateExtension ¶
type ApiWrapper ¶
type ApiWrapper struct { traits.ExtendRetractApiClient // contains filtered or unexported fields }
func WrapApi ¶
func WrapApi(server traits.ExtendRetractApiServer) *ApiWrapper
WrapApi adapts a traits.ExtendRetractApiServer and presents it as a traits.ExtendRetractApiClient
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.ExtendRetractApiServer
UnwrapServer returns the underlying server instance.
func (*ApiWrapper) UnwrapService ¶
func (w *ApiWrapper) UnwrapService() (grpc.ClientConnInterface, grpc.ServiceDesc)
type InfoRouter ¶
type InfoRouter struct { traits.UnimplementedExtendRetractInfoServer router.Router }
InfoRouter is a traits.ExtendRetractInfoServer that allows routing named requests to specific traits.ExtendRetractInfoClient
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.ExtendRetractInfoClient.
func (*InfoRouter) AddExtendRetractInfoClient ¶
func (r *InfoRouter) AddExtendRetractInfoClient(name string, client traits.ExtendRetractInfoClient) traits.ExtendRetractInfoClient
func (*InfoRouter) DescribeExtension ¶
func (r *InfoRouter) DescribeExtension(ctx context.Context, request *traits.DescribeExtensionRequest) (*traits.ExtensionSupport, error)
func (*InfoRouter) GetExtendRetractInfoClient ¶
func (r *InfoRouter) GetExtendRetractInfoClient(name string) (traits.ExtendRetractInfoClient, error)
func (*InfoRouter) HoldsType ¶
func (r *InfoRouter) HoldsType(client any) bool
func (*InfoRouter) Register ¶
func (r *InfoRouter) Register(server grpc.ServiceRegistrar)
func (*InfoRouter) RemoveExtendRetractInfoClient ¶
func (r *InfoRouter) RemoveExtendRetractInfoClient(name string) traits.ExtendRetractInfoClient
type InfoWrapper ¶
type InfoWrapper struct { traits.ExtendRetractInfoClient // contains filtered or unexported fields }
func WrapInfo ¶
func WrapInfo(server traits.ExtendRetractInfoServer) *InfoWrapper
WrapInfo adapts a traits.ExtendRetractInfoServer and presents it as a traits.ExtendRetractInfoClient
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.ExtendRetractInfoServer
UnwrapServer returns the underlying server instance.
func (*InfoWrapper) UnwrapService ¶
func (w *InfoWrapper) UnwrapService() (grpc.ClientConnInterface, grpc.ServiceDesc)