Documentation ¶
Overview ¶
Package client provides a simple wrapper for building a NetworkServiceMeshClient
Index ¶
- func NewClient(ctx context.Context, clientOpts ...Option) networkservice.NetworkServiceClient
- type Option
- func WithAdditionalFunctionality(additionalFunctionality ...networkservice.NetworkServiceClient) Option
- func WithAuthorizeClient(authorizeClient networkservice.NetworkServiceClient) Option
- func WithClientConn(cc grpc.ClientConnInterface) Option
- func WithClientURL(clientURL *url.URL) Option
- func WithDialOptions(dialOptions ...grpc.DialOption) Option
- func WithDialTimeout(dialTimeout time.Duration) Option
- func WithHealClient(healClient networkservice.NetworkServiceClient) Option
- func WithName(name string) Option
- func WithoutRefresh() Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(ctx context.Context, clientOpts ...Option) networkservice.NetworkServiceClient
NewClient - returns case NSM client.
- ctx - context for the lifecycle of the *Client* itself. Cancel when discarding the client.
Types ¶
type Option ¶
type Option func(c *clientOptions)
Option modifies default client chain values.
func WithAdditionalFunctionality ¶
func WithAdditionalFunctionality(additionalFunctionality ...networkservice.NetworkServiceClient) Option
WithAdditionalFunctionality sets additionalFunctionality for the client. Note: this adds into tail of the client chain.
func WithAuthorizeClient ¶
func WithAuthorizeClient(authorizeClient networkservice.NetworkServiceClient) Option
WithAuthorizeClient sets authorizeClient for the client chain.
func WithClientConn ¶ added in v1.1.0
func WithClientConn(cc grpc.ClientConnInterface) Option
WithClientConn sets name for the client.
func WithClientURL ¶ added in v1.1.0
WithClientURL sets name for the client.
func WithDialOptions ¶
func WithDialOptions(dialOptions ...grpc.DialOption) Option
WithDialOptions sets dial options
func WithDialTimeout ¶
WithDialTimeout sets dial timeout
func WithHealClient ¶ added in v1.1.0
func WithHealClient(healClient networkservice.NetworkServiceClient) Option
WithHealClient sets healClient for the client chain.
Click to show internal directories.
Click to hide internal directories.