rainbond: github.com/goodrain/rainbond/api/handler/group Index | Files

package group

import "github.com/goodrain/rainbond/api/handler/group"

Index

Package Files

group_backup.go

type Backup Uses

type Backup struct {
    // in: path
    // required: true
    TenantName string `json:"tenant_name"`
    Body       struct {
        EventID    string   `json:"event_id" validate:"event_id|required"`
        GroupID    string   `json:"group_id" validate:"group_name|required"`
        Metadata   string   `json:"metadata,omitempty" validate:"metadata|required"`
        ServiceIDs []string `json:"service_ids" validate:"service_ids|required"`
        Mode       string   `json:"mode" validate:"mode|required|in:full-online,full-offline"`
        Version    string   `json:"version" validate:"version|required"`
        SlugInfo   struct {
            Namespace   string `json:"namespace"`
            FTPHost     string `json:"ftp_host"`
            FTPPort     string `json:"ftp_port"`
            FTPUser     string `json:"ftp_username"`
            FTPPassword string `json:"ftp_password"`
        }   `json:"slug_info,omitempty"`
        ImageInfo struct {
            HubURL      string `json:"hub_url"`
            HubUser     string `json:"hub_user"`
            HubPassword string `json:"hub_password"`
            Namespace   string `json:"namespace"`
            IsTrust     bool   `json:"is_trust,omitempty"`
        }   `json:"image_info,omitempty"`
        SourceDir string `json:"source_dir"`
        BackupID  string `json:"backup_id,omitempty"`
    }
}

Backup GroupBackup swagger:parameters groupBackup

type BackupCopy Uses

type BackupCopy struct {
    Body struct {
        EventID string `json:"event_id" validate:"event_id|required"`
        GroupID string `json:"group_id" validate:"group_id|required"`
        //Status in starting,failed,success,restore
        Status     string `json:"status" validate:"status|required"`
        Version    string `json:"version" validate:"version|required"`
        SourceDir  string `json:"source_dir" validate:"source_dir|required"`
        SourceType string ` json:"source_type" validate:"source_type|required"`
        BackupMode string `json:"backup_mode" validate:"backup_mode|required"`
        BuckupSize int    `json:"backup_size" validate:"backup_size|required"`
    }
}

BackupCopy BackupCopy

type BackupHandle Uses

type BackupHandle struct {
    // contains filtered or unexported fields
}

BackupHandle group app backup handle

func CreateBackupHandle Uses

func CreateBackupHandle(MQClient mqclient.MQClient, statusCli *client.AppRuntimeSyncClient, etcdCli *clientv3.Client) *BackupHandle

CreateBackupHandle CreateBackupHandle

func (*BackupHandle) BackupCopy Uses

func (h *BackupHandle) BackupCopy(b BackupCopy) (*dbmodel.AppBackup, *util.APIHandleError)

BackupCopy BackupCopy

func (*BackupHandle) DeleteBackup Uses

func (h *BackupHandle) DeleteBackup(backupID string) *util.APIHandleError

DeleteBackup delete backup

func (*BackupHandle) GetBackup Uses

func (h *BackupHandle) GetBackup(backupID string) (*dbmodel.AppBackup, *util.APIHandleError)

GetBackup get one backup info

func (*BackupHandle) GetBackupByGroupID Uses

func (h *BackupHandle) GetBackupByGroupID(groupID string) ([]*dbmodel.AppBackup, *util.APIHandleError)

GetBackupByGroupID get some backup info by group id

func (*BackupHandle) NewBackup Uses

func (h *BackupHandle) NewBackup(b Backup) (*dbmodel.AppBackup, *util.APIHandleError)

NewBackup new backup task

func (*BackupHandle) RestoreBackup Uses

func (h *BackupHandle) RestoreBackup(br BackupRestore) (*RestoreResult, *util.APIHandleError)

RestoreBackup restore a backup version all app could be closed before restore

func (*BackupHandle) RestoreBackupResult Uses

func (h *BackupHandle) RestoreBackupResult(restoreID string) (*RestoreResult, *util.APIHandleError)

RestoreBackupResult RestoreBackupResult

type BackupRestore Uses

type BackupRestore struct {
    BackupID string `json:"backup_id"`
    Body     struct {
        SlugInfo struct {
            Namespace   string `json:"namespace"`
            FTPHost     string `json:"ftp_host"`
            FTPPort     string `json:"ftp_port"`
            FTPUser     string `json:"ftp_username"`
            FTPPassword string `json:"ftp_password"`
        }   `json:"slug_info,omitempty"`
        ImageInfo struct {
            HubURL      string `json:"hub_url"`
            HubUser     string `json:"hub_user"`
            HubPassword string `json:"hub_password"`
            Namespace   string `json:"namespace"`
            IsTrust     bool   `json:"is_trust,omitempty"`
        }   `json:"image_info,omitempty"`
        EventID string `json:"event_id"`
        //need restore target tenant id
        TenantID string `json:"tenant_id"`
        //RestoreMode(cdct) current datacenter and current tenant
        //RestoreMode(cdot) current datacenter and other tenant
        //RestoreMode(od)     other datacenter
        RestoreMode string `json:"restore_mode"`
    }
}

BackupRestore BackupRestore

type Info Uses

type Info struct {
    ServiceID    string
    ServiceAlias string
    Status       string
    LBPorts      map[int]int
}

Info service cache info

type RegionServiceSnapshot Uses

type RegionServiceSnapshot struct {
    ServiceID          string
    Service            *dbmodel.TenantServices
    ServiceProbe       []*dbmodel.TenantServiceProbe
    LBMappingPort      []*dbmodel.TenantServiceLBMappingPort
    ServiceEnv         []*dbmodel.TenantServiceEnvVar
    ServiceLabel       []*dbmodel.TenantServiceLable
    ServiceMntRelation []*dbmodel.TenantServiceMountRelation
    PluginRelation     []*dbmodel.TenantServicePluginRelation
    ServiceRelation    []*dbmodel.TenantServiceRelation
    ServiceStatus      string
    ServiceVolume      []*dbmodel.TenantServiceVolume
    ServicePort        []*dbmodel.TenantServicesPort
    Versions           []*dbmodel.VersionInfo
    PluginConfigs      []*dbmodel.TenantPluginVersionDiscoverConfig
}

RegionServiceSnapshot RegionServiceSnapshot

type RestoreResult Uses

type RestoreResult struct {
    Status        string           `json:"status"`
    Message       string           `json:"message"`
    CreateTime    time.Time        `json:"create_time"`
    ServiceChange map[string]*Info `json:"service_change"`
    BackupID      string           `json:"backup_id"`
    RestoreMode   string           `json:"restore_mode"`
    EventID       string           `json:"event_id"`
    RestoreID     string           `json:"restore_id"`
    Metadata      string           `json:"metadata"`
    CacheDir      string           `json:"cache_dir"`
}

RestoreResult RestoreResult

Package group imports 18 packages (graph) and is imported by 2 packages. Updated 2019-06-26. Refresh now. Tools for package owners.