observability

package
v0.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package observability is the resource module for backups, migrations, and resource synchronization.

Backups: POST /api/v2/tenant/backup/create

GET  /api/v2/tenant/backup/list
POST /api/v2/tenant/backup/restore

Migrations: POST /api/v2/tenant/migrations/plan

POST /api/v2/tenant/migrations/execute

Synchronize:POST /api/v2/tenant/resources/synchronize/batch

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	ID        string                 `json:"id"`
	Name      string                 `json:"name"`
	Status    string                 `json:"status"`
	SizeGB    float64                `json:"size_gb,omitempty"`
	Source    string                 `json:"source,omitempty"`
	CreatedAt string                 `json:"created_at,omitempty"`
	Raw       map[string]interface{} `json:"-"`
}

type Backups

type Backups struct {
	T       *transport.Transport
	NodeURL string
}

func (*Backups) Create

func (b *Backups) Create(ctx context.Context, in CreateBackupInput) (*Backup, error)

Create a snapshot backup of an infrastructure resource.

func (*Backups) List

func (b *Backups) List(ctx context.Context) ([]Backup, error)

List all backups for the current tenant.

func (*Backups) Restore

func (b *Backups) Restore(ctx context.Context, in RestoreBackupInput) (*RestoreResult, error)

Restore a resource from an existing backup snapshot.

type BatchSyncInput

type BatchSyncInput struct {
	Provider string   `json:"provider"`
	Services []string `json:"services"`
}

type Client

type Client struct {
	T       *transport.Transport
	NodeURL string
}

Client is the entry point. Construct via c.Observability().

func (*Client) Backups

func (c *Client) Backups() *Backups

Backups returns the backups sub-module.

func (*Client) Migrations

func (c *Client) Migrations() *Migrations

Migrations returns the migrations sub-module.

func (*Client) Sync

func (c *Client) Sync() *Sync

Sync returns the resource-synchronization sub-module.

type CreateBackupInput

type CreateBackupInput struct {
	ResourceID   string `json:"resource_id"`
	ResourceType string `json:"resource_type"` // database | vm | volume | …
	BackupName   string `json:"backup_name"`
}

type ExecuteMigrationInput

type ExecuteMigrationInput struct {
	SessionID string `json:"session_id"`
	DryRun    bool   `json:"dry_run"`
}

type MigrationPlan

type MigrationPlan struct {
	SessionID                string                 `json:"session_id"`
	Steps                    int                    `json:"steps"`
	EstimatedDowntimeMinutes int                    `json:"estimated_downtime_minutes,omitempty"`
	Raw                      map[string]interface{} `json:"-"`
}

type Migrations

type Migrations struct {
	T       *transport.Transport
	NodeURL string
}

func (*Migrations) Execute

func (m *Migrations) Execute(ctx context.Context, in ExecuteMigrationInput) (map[string]interface{}, error)

Execute a previously-planned migration.

func (*Migrations) Plan

Plan a migration of resources between providers/regions.

type PlanMigrationInput

type PlanMigrationInput struct {
	SourceProvider string   `json:"source_provider"`
	TargetProvider string   `json:"target_provider"`
	Resources      []string `json:"resources"`
}

type RestoreBackupInput

type RestoreBackupInput struct {
	BackupID     string `json:"backup_id"`
	TargetRegion string `json:"target_region,omitempty"`
}

type RestoreResult

type RestoreResult struct {
	Restored      bool                   `json:"restored"`
	NewResourceID string                 `json:"new_resource_id,omitempty"`
	Raw           map[string]interface{} `json:"-"`
}

type Sync

type Sync struct {
	T       *transport.Transport
	NodeURL string
}

func (*Sync) Batch

func (s *Sync) Batch(ctx context.Context, in BatchSyncInput) (map[string]interface{}, error)

Batch — discover and sync cloud resources into VxCloud state.

Jump to

Keyboard shortcuts

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