nodece commented on code in PR #1471: URL: https://github.com/apache/pulsar-client-go/pull/1471#discussion_r2972592350
########## pulsaradmin/pkg/admin/topic_policies.go: ########## @@ -0,0 +1,1358 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package admin + +import ( + "context" + "encoding/json" + "fmt" + "strconv" + "strings" + + "github.com/apache/pulsar-client-go/pulsaradmin/pkg/utils" +) + +// TopicPolicies is the scoped admin interface for topic-level policies. +type TopicPolicies interface { Review Comment: Simplify the interface by removing the non-context variant and standardizing on a single context-aware method, so like: `GetMessageTTLWithContext` is renamed to `GetMessageTTL`, and the original `GetMessageTTL` is removed to enforce consistent context usage (e.g., cancellation and timeouts). ```go GetMessageTTL(context.Context, utils.TopicName, bool) (*int, error) ``` @freeznet Does this approach look good to you? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
