cms

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskUuidPrefix = "maintenance-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CMS

type CMS interface {
	Tenants() ([]string, error)
	Nodes() ([]*Ydb_Maintenance.Node, error)
}

type Client

type Client interface {
	CMS
	Maintenance

	Close() error
}

func NewCMSClient

func NewCMSClient(
	connectionsFactory connectionsfactory.Factory,
	logger *zap.SugaredLogger,
	cp credentials.Provider,
) Client

type CreateTaskParams

type CreateTaskParams struct {
	HostFQDNs                  []string
	MaintenanceDurationSeconds int
	AvailabilityMode           string
}

type Maintenance

type Maintenance interface {
	CompleteAction([]*Ydb_Maintenance.ActionUid) (*Ydb_Maintenance.ManageActionResult, error)
	CompleteActions(string, []string) (*Ydb_Maintenance.ManageActionResult, error)
	CreateMaintenanceTask(MaintenanceTaskParams) (MaintenanceTask, error)
	DropMaintenanceTask(string) (string, error)
	DropTask(string) error
	GetMaintenanceTask(string) (MaintenanceTask, error)
	ListTasksForUser(string) ([]MaintenanceTask, error)
	MaintenanceTasks(string) ([]MaintenanceTask, error)
	RefreshMaintenanceTask(string) (MaintenanceTask, error)
	RefreshTask(string) (MaintenanceTask, error)
}

type MaintenanceScopeType

type MaintenanceScopeType int
const (
	NodeScope MaintenanceScopeType = 1
	HostScope MaintenanceScopeType = 2
)

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

	ScopeType MaintenanceScopeType

	Nodes []*Ydb_Maintenance.Node
	Hosts []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL