// NewClient - create client instance to be use to communicate with KubeMQ server
create client instance to be use to communicate with KubeMQ server
// NewClient - create client instance to be use to communicate with KubeMQ server
func NewClient(ctx context.Context, op ...Option) (*Client, error) {
	opts := GetDefaultOptions()
	for _, o := range op {
		o.apply(opts)
	}
	client := &Client{
		opts: opts,
	}
	var err error
	switch opts.transportType {
	case TransportTypeGRPC:
		client.transport, err = newGRPCTransport(ctx, opts)
	}
	if err != nil {
		return nil, err
	}
	return client, nil
}
func NewClient ( ctx context . Context , op ... Option ) ( * Client , error ) { opts := GetDefaultOptions ( ) for _ , o := range op { o . apply ( opts ) } client := & Client { opts : opts , } var err error switch opts . transportType { case TransportTypeGRPC : client . transport , err = newGRPCTransport ( ctx , opts ) } if err != nil { return nil , err } return client , nil }
create client instance to be use to communicate with KubeMQ server
create client instance to be use to communicate with KubeMQ server