extendretract

package
v0.0.0-...-97303ad Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 7 Imported by: 1

Documentation

Index

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

ApiRouter is a traits.ExtendRetractApiServer that allows routing named requests to specific traits.ExtendRetractApiClient

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.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 (r *ApiRouter) GetExtension(ctx context.Context, request *traits.GetExtensionRequest) (*traits.Extension, error)

func (*ApiRouter) HoldsType

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

func (*ApiRouter) PullExtensions

func (*ApiRouter) Register

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

func (*ApiRouter) RemoveExtendRetractApiClient

func (r *ApiRouter) RemoveExtendRetractApiClient(name string) traits.ExtendRetractApiClient

func (*ApiRouter) Stop

func (*ApiRouter) UpdateExtension

func (r *ApiRouter) UpdateExtension(ctx context.Context, request *traits.UpdateExtensionRequest) (*traits.Extension, error)

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

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)

Jump to

Keyboard shortcuts

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