strolt

package
v0.0.0-...-3a65d20 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManagerGetInfo

func ManagerGetInfo(version string) common.ManagerInfo

func ManagerGetPreparedInstances

func ManagerGetPreparedInstances() []common.ManagerPreparedInstance

func ManagerInit

func ManagerInit(ctx context.Context, cancel func(), instances []ManagerInstanceInit)

Types

type Config

type Config struct {
	IsInitialized     bool
	UpdateRequestedAt time.Time
	UpdatedAt         time.Time
	Data              *strolt_models.Config
}

type Instance

type Instance struct {
	Name     string
	URL      string
	Username string
	Password string

	Watch WatchItem
	Info  *strolt_models.APIGetInfoResponse

	IsOnline bool

	TaskStatus TaskStatus

	Config Config

	*sync.RWMutex
	// contains filtered or unexported fields
}

type Manager

type Manager struct {
	Instances map[string]*Instance
	sync.RWMutex
}

func (*Manager) Watch

func (m *Manager) Watch(ctx context.Context, cancel func())

type ManagerInstanceInit

type ManagerInstanceInit struct {
	Name     string
	URL      string
	Username string
	Password string
}

type SDK

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

func ManagerGetSDKByInstanceName

func ManagerGetSDKByInstanceName(instanceName string) (*SDK, bool)

func New

func New(host, username, password string) *SDK

func (*SDK) Backup

func (sdk *SDK) Backup(serviceName, taskName string) (*services.BackupOK, error)

func (*SDK) GetConfig

func (sdk *SDK) GetConfig() (*operations.GetConfigOK, error)

func (*SDK) GetInfo

func (sdk *SDK) GetInfo() (*info.GetInfoOK, error)

func (*SDK) GetSnapshots

func (sdk *SDK) GetSnapshots(serviceName, taskName, destinationName string) (*services.GetSnapshotsOK, error)

func (*SDK) GetSnapshotsForPrune

func (sdk *SDK) GetSnapshotsForPrune(serviceName, taskName, destinationName string) (*services.GetSnapshotsForPruneOK, error)

func (*SDK) GetStats

func (sdk *SDK) GetStats(serviceName, taskName, destinationName string) (*services.GetStatsOK, error)

func (*SDK) GetStatus

func (sdk *SDK) GetStatus() (*services.GetStatusOK, error)

func (*SDK) Prune

func (sdk *SDK) Prune(serviceName, taskName, destinationName string) (*services.PruneOK, error)

type TaskStatus

type TaskStatus struct {
	IsInitialized     bool
	UpdateRequestedAt time.Time
	UpdatedAt         time.Time
	Data              *strolt_models.ManagerStatus
}

type WatchItem

type WatchItem struct {
	LatestPingAt            time.Time
	LatestSuccessPingAt     time.Time
	IsPingInProcess         bool
	IsUpdateStatusInProcess bool
}

Jump to

Keyboard shortcuts

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