Documentation ¶
Overview ¶
Package next provides a mechanism for chained networkservice.NetworkService{Server,Client}s to call the next element in the chain.
Index ¶
- func Client(ctx context.Context) networkservice.NetworkServiceClient
- func NewNetworkServiceClient(clients ...networkservice.NetworkServiceClient) networkservice.NetworkServiceClient
- func NewNetworkServiceServer(servers ...networkservice.NetworkServiceServer) networkservice.NetworkServiceServer
- func NewWrappedNetworkServiceClient(wrapper ClientWrapper, clients ...networkservice.NetworkServiceClient) networkservice.NetworkServiceClient
- func NewWrappedNetworkServiceServer(wrapper ServerWrapper, servers ...networkservice.NetworkServiceServer) networkservice.NetworkServiceServer
- func Server(ctx context.Context) networkservice.NetworkServiceServer
- type ClientChainer
- type ClientWrapper
- type ServerChainer
- type ServerWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client(ctx context.Context) networkservice.NetworkServiceClient
Client -
Returns the Client networkservice.NetworkServiceClient to be called in the chain from the context.Context
func NewNetworkServiceClient ¶
func NewNetworkServiceClient(clients ...networkservice.NetworkServiceClient) networkservice.NetworkServiceClient
NewNetworkServiceClient - chains together clients into a single networkservice.NetworkServiceClient
func NewNetworkServiceServer ¶
func NewNetworkServiceServer(servers ...networkservice.NetworkServiceServer) networkservice.NetworkServiceServer
NewNetworkServiceServer - chains together servers while providing them with the correct next.Server(ctx) to call to invoke the next element in the chain.
func NewWrappedNetworkServiceClient ¶
func NewWrappedNetworkServiceClient(wrapper ClientWrapper, clients ...networkservice.NetworkServiceClient) networkservice.NetworkServiceClient
NewWrappedNetworkServiceClient chains together clients with wrapper wrapped around each one
func NewWrappedNetworkServiceServer ¶
func NewWrappedNetworkServiceServer(wrapper ServerWrapper, servers ...networkservice.NetworkServiceServer) networkservice.NetworkServiceServer
NewWrappedNetworkServiceServer - chains together the servers provides with the wrapper wrapped around each one in turn.
func Server ¶
func Server(ctx context.Context) networkservice.NetworkServiceServer
Server -
Returns the Server networkservice.NetworkServiceServer to be called in the chain from the context.Context
Types ¶
type ClientChainer ¶
type ClientChainer func(...networkservice.NetworkServiceClient) networkservice.NetworkServiceClient
ClientChainer - a function that chains together a list of networkservice.NetworkServiceClients
type ClientWrapper ¶
type ClientWrapper func(networkservice.NetworkServiceClient) networkservice.NetworkServiceClient
ClientWrapper - a function that wraps around a networkservice.NetworkServiceClient
type ServerChainer ¶
type ServerChainer func(...networkservice.NetworkServiceServer) networkservice.NetworkServiceServer
ServerChainer - A function that chains a list of networkservice.NetworkServiceServers together
type ServerWrapper ¶
type ServerWrapper func(networkservice.NetworkServiceServer) networkservice.NetworkServiceServer
ServerWrapper - A function that wraps a networkservice.NetworkServiceServer