-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for merging pulsar-admin-go #1075
Comments
@flowchartsman I outline the subtasks above and will start roughly adding source code the next week. You may propose the refactor ideas and I can help in review. |
Thanks @tisonkun! We might want to open the issue for discussion first before we issue PRs, since the current API and mine are fairly different, and it might help to avoid duplicated effort, but I'm game to do it however you like.I can convert my draft PR to a regular one first? For those interested, I have a refactoring issue and accompanying PR in place for The PR also adds package-level error interfaces along with helper methods to distinguish missing/not found entities from actual errors, as well as "expected" errors which conform to the admin API (i.e. with a Notes on merging
Once integrated, one way to call the adminAPI might be directly from the client, err := pulsar.NewClient(ClientOptions{
URL: serviceURLTLS,
TLSTrustCertsFilePath: caCertsPath,
TLSValidateHostname: true,
Authentication: NewAuthenticationToken(string(token)),
})
err := client.Admin.Functions().CreateFuncWithURL(funcPkgURL, &pulsar.FunctionConfig{
Output: funcResults,
LogTopic: funcLog,
Tenant: funcTenant,
Namespace: funcNamespace,
Name: funcName,
Inputs: []string{funcInput},
Runtime: "GO",
}
if err != nil {
// handle error
} Note the use of |
Thanks for your feedback and participation @flowchartsman! I've submitted a PR #1077 for roughly adding the sources of Your refactoring suggestions can be applied onto that patch. I like this.
As we discussed on Slack, perhaps a parallel interface design for client API and admin API can be better. This is the design of Java APIs and it reflects that admin APIs (control panel) are at the same level of client API (data panel) - client APIs don't "own" admin APIs. Also, this can make the auth model clear - generally, users configure less permission for client APIs while admin APIs requires high trust level.
This is the right direction. We will factor out shared/common configs and the auth package. But how to reduce the impact for current users is a point that needs a second consideration.
This is cool! We definitely need it. |
This refers to #1075. korandoru/hawkeye can auto-format all the incoming files at once. Signed-off-by: tison <[email protected]>
Background
Subtasks
The text was updated successfully, but these errors were encountered: