You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "drivebyer (via GitHub)" <gi...@apache.org> on 2023/08/07 05:43:42 UTC
[GitHub] [rocketmq-operator] drivebyer opened a new issue, #168: got error when import pkg/apis/rocketmq to get broker list
drivebyer opened a new issue, #168:
URL: https://github.com/apache/rocketmq-operator/issues/168
Hello Developers,
I am using the rocketmq-operator to manage multiple rocketmq clusters. I plan to write a management tool in Go to carry out some other operations. My approach is to import the pkg/apis/rocketmq package, then use client-go to get the current broker clusters in k8s. The code looks something like this:
```go
data := &operatorv1alpha1.Broker{
ObjectMeta: metav1.ObjectMeta{
Name: req.Name,
Namespace: req.Namespace,
},
}
err = client.Get(ctx, client.ObjectKeyFromObject(data), data)
if err != nil {
return nil, err
}
```
However, I am getting an error message:
```
Cannot use 'data' (type *operatorv1alpha1.Broker) as the type Object Type does not implement 'Object' as some methods are missing: DeepCopyObject() Object
```
I later realized this is because certain relevant files were ignored during upload. See https://github.com/apache/rocketmq-operator/blob/007810f70d814505a66cfcdb8631e51b52a74df6/.gitignore#L89
I suggest that these files be uploaded to the GitHub repository, so that third-party users can more conveniently refer to this api module.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-operator] caigy closed issue #168: got error when import pkg/apis/rocketmq to get broker list
Posted by "caigy (via GitHub)" <gi...@apache.org>.
caigy closed issue #168: got error when import pkg/apis/rocketmq to get broker list
URL: https://github.com/apache/rocketmq-operator/issues/168
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org