Documentation ¶
Overview ¶
Package addressof provides convenient functions for converting implementations of an interface to pointers to implementations of the interface. Tt turns a concrete struct which implements an interface iface cannot be converted to
*iface - go complains about it. This does not work: impl := &interfaceImpl{} var ptr *iface = &cl This also doesn't work: impl := &interfaceImpl{} var ptr *iface = &(cl.(iface)
Index ¶
- func NetworkServiceClient(client networkservice.NetworkServiceClient) *networkservice.NetworkServiceClient
- func NetworkServiceEndpointRegistryClient(client registry.NetworkServiceEndpointRegistryClient) *registry.NetworkServiceEndpointRegistryClient
- func NetworkServiceRegistryClient(client registry.NetworkServiceRegistryClient) *registry.NetworkServiceRegistryClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NetworkServiceClient ¶
func NetworkServiceClient(client networkservice.NetworkServiceClient) *networkservice.NetworkServiceClient
NetworkServiceClient - convenience function to help in converting things from networkservice.NetworkServiceClient to *networkservice.NetworkServiceClient
it turns a concrete struct which implements networkservice.NetworkServiceClient cannot be converted to *networkservice.NetworkServiceClient - go complains about it. This does not work: impl := &clientImpl{} var onHeal *networkservice.NetworkServiceClient = &cl This also doesn't work: impl := &clientImpl{} var ptr *networkservice.NetworkServiceClient = &(cl.(networkservice.NetworkServiceClient) Using this function does: impl := &clientImpl{} var ptr *networkservice.NetworkServiceClient =NetworkServiceClient(cl)
func NetworkServiceEndpointRegistryClient ¶
func NetworkServiceEndpointRegistryClient(client registry.NetworkServiceEndpointRegistryClient) *registry.NetworkServiceEndpointRegistryClient
NetworkServiceEndpointRegistryClient converts client to *registry.NetworkServiceEndpointRegistryClient
func NetworkServiceRegistryClient ¶
func NetworkServiceRegistryClient(client registry.NetworkServiceRegistryClient) *registry.NetworkServiceRegistryClient
NetworkServiceRegistryClient converts client to *registry.NetworkServiceRegistryClient
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.