client

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 15

Documentation

Overview

Package client provides a simple wrapper for building a NetworkServiceMeshClient

Index

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

func WithClientURL(clientURL *url.URL) Option

WithClientURL sets name for the client.

func WithDialOptions

func WithDialOptions(dialOptions ...grpc.DialOption) Option

WithDialOptions sets dial options

func WithDialTimeout

func WithDialTimeout(dialTimeout time.Duration) Option

WithDialTimeout sets dial timeout

func WithHealClient added in v1.1.0

func WithHealClient(healClient networkservice.NetworkServiceClient) Option

WithHealClient sets healClient for the client chain.

func WithName

func WithName(name string) Option

WithName sets name for the client.

func WithoutRefresh added in v1.1.0

func WithoutRefresh() Option

WithoutRefresh disables refresh

Jump to

Keyboard shortcuts

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