Documentation ¶
Index ¶
- Constants
- func InitConnectionFactory(rootOpts options.RootOptions, logger *zap.SugaredLogger, retryNumber int) error
- func LogOperation(logger *zap.SugaredLogger, op *Ydb_Operations.Operation)
- func WrapWithRetries(maxAttempts int, f func() (*Ydb_Operations.Operation, error)) (*Ydb_Operations.Operation, error)
- type Auth
- type Cms
- func (c *Cms) CompleteAction(actionIds []*Ydb_Maintenance.ActionUid) (*Ydb_Maintenance.ManageActionResult, error)
- func (c *Cms) CreateMaintenanceTask(params MaintenanceTaskParams) (MaintenanceTask, error)
- func (c *Cms) DropMaintenanceTask(taskID string) (string, error)
- func (c *Cms) ExecuteCMSMethod(out proto.Message, ...) (*Ydb_Operations.Operation, error)
- func (c *Cms) ExecuteMaintenanceMethod(out proto.Message, ...) (*Ydb_Operations.Operation, error)
- func (c *Cms) GetMaintenanceTask(taskID string) (MaintenanceTask, error)
- func (c *Cms) MaintenanceTasks(userSID string) ([]string, error)
- func (c *Cms) Nodes() ([]*Ydb_Maintenance.Node, error)
- func (c *Cms) RefreshMaintenanceTask(taskID string) (MaintenanceTask, error)
- func (c *Cms) Tenants() ([]string, error)
- type Discovery
- type Factory
- func (f *Factory) Connection() (*grpc.ClientConn, error)
- func (f *Factory) ContextWithAuth() (context.Context, context.CancelFunc, error)
- func (f *Factory) ContextWithoutAuth() (context.Context, context.CancelFunc)
- func (f *Factory) GetRetryNumber() int
- func (f *Factory) OperationParams() *Ydb_Operations.OperationParams
- type MaintenanceTask
- type MaintenanceTaskParams
- type OperationResponse
Constants ¶
View Source
const (
BufferSize = 32 << 20
)
Variables ¶
This section is empty.
Functions ¶
func InitConnectionFactory ¶
func InitConnectionFactory( rootOpts options.RootOptions, logger *zap.SugaredLogger, retryNumber int, ) error
func LogOperation ¶
func LogOperation(logger *zap.SugaredLogger, op *Ydb_Operations.Operation)
func WrapWithRetries ¶
func WrapWithRetries( maxAttempts int, f func() (*Ydb_Operations.Operation, error), ) (*Ydb_Operations.Operation, error)
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func NewAuthClient ¶
func NewAuthClient(logger *zap.SugaredLogger, f *Factory) *Auth
func (*Auth) ExecuteAuthMethod ¶
func (c *Auth) ExecuteAuthMethod( out proto.Message, method func(context.Context, Ydb_Auth_V1.AuthServiceClient) (OperationResponse, error), grpcOpts options.GRPC, ) (*Ydb_Operations.Operation, error)
type Cms ¶
type Cms struct {
// contains filtered or unexported fields
}
func GetCmsClient ¶
func GetCmsClient() *Cms
func NewCMSClient ¶
func NewCMSClient(f *Factory, logger *zap.SugaredLogger) *Cms
func (*Cms) CompleteAction ¶
func (c *Cms) CompleteAction(actionIds []*Ydb_Maintenance.ActionUid) (*Ydb_Maintenance.ManageActionResult, error)
func (*Cms) CreateMaintenanceTask ¶
func (c *Cms) CreateMaintenanceTask(params MaintenanceTaskParams) (MaintenanceTask, error)
func (*Cms) ExecuteCMSMethod ¶
func (c *Cms) ExecuteCMSMethod( out proto.Message, method func(context.Context, Ydb_Cms_V1.CmsServiceClient) (OperationResponse, error), ) (*Ydb_Operations.Operation, error)
func (*Cms) ExecuteMaintenanceMethod ¶
func (c *Cms) ExecuteMaintenanceMethod( out proto.Message, method func(context.Context, Ydb_Maintenance_V1.MaintenanceServiceClient) (OperationResponse, error), ) (*Ydb_Operations.Operation, error)
func (*Cms) GetMaintenanceTask ¶
func (c *Cms) GetMaintenanceTask(taskID string) (MaintenanceTask, error)
func (*Cms) RefreshMaintenanceTask ¶
func (c *Cms) RefreshMaintenanceTask(taskID string) (MaintenanceTask, error)
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
func GetDiscoveryClient ¶
func GetDiscoveryClient() *Discovery
func NewDiscoveryClient ¶
func NewDiscoveryClient(f *Factory, logger *zap.SugaredLogger) *Discovery
func (*Discovery) ExecuteDiscoveryMethod ¶
func (c *Discovery) ExecuteDiscoveryMethod( out proto.Message, method func(context.Context, Ydb_Discovery_V1.DiscoveryServiceClient) (OperationResponse, error), ) (*Ydb_Operations.Operation, error)
func (*Discovery) ListEndpoints ¶
func (c *Discovery) ListEndpoints(database string) ([]*Ydb_Discovery.EndpointInfo, error)
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func (*Factory) Connection ¶
func (f *Factory) Connection() (*grpc.ClientConn, error)
func (*Factory) ContextWithAuth ¶
func (*Factory) ContextWithoutAuth ¶
func (f *Factory) ContextWithoutAuth() (context.Context, context.CancelFunc)
func (*Factory) GetRetryNumber ¶
func (*Factory) OperationParams ¶
func (f *Factory) OperationParams() *Ydb_Operations.OperationParams
type MaintenanceTask ¶
type MaintenanceTask interface { GetRetryAfter() *timestamppb.Timestamp GetActionGroupStates() []*Ydb_Maintenance.ActionGroupStates GetTaskUid() string }
type MaintenanceTaskParams ¶
type MaintenanceTaskParams struct { TaskUID string AvailabilityMode Ydb_Maintenance.AvailabilityMode Duration *durationpb.Duration Nodes []*Ydb_Maintenance.Node }
type OperationResponse ¶
type OperationResponse interface {
GetOperation() *Ydb_Operations.Operation
}
Click to show internal directories.
Click to hide internal directories.