fix: Add forceDrop option to DropRole client API (#47071)

issue: #46887

Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
This commit is contained in:
Xiaofan 2026-01-19 21:45:30 +08:00 committed by GitHub
parent f166dd817a
commit 70377ea765
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,12 +220,14 @@ type DropRoleOption interface {
}
type dropDropRoleOption struct {
roleName string
roleName string
forceDrop bool
}
func (opt *dropDropRoleOption) Request() *milvuspb.DropRoleRequest {
return &milvuspb.DropRoleRequest{
RoleName: opt.roleName,
RoleName: opt.roleName,
ForceDrop: opt.forceDrop,
}
}
@ -235,6 +237,11 @@ func NewDropRoleOption(roleName string) *dropDropRoleOption {
}
}
func (opt *dropDropRoleOption) WithForce(force bool) *dropDropRoleOption {
opt.forceDrop = force
return opt
}
type DescribeRoleOption interface {
SelectRoleRequest() *milvuspb.SelectRoleRequest
Request() *milvuspb.SelectGrantRequest