apinodeutils

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SharedManager = NewManager()

Functions

func CanUpgrade

func CanUpgrade(apiVersion string, osName string, arch string) (canUpgrade bool, reason string)

Types

type DeployFile added in v1.0.4

type DeployFile struct {
	OS      string
	Arch    string
	Version string
	Path    string
}

DeployFile 部署文件描述

func (*DeployFile) Read added in v1.0.4

func (this *DeployFile) Read(offset int64) (data []byte, newOffset int64, err error)

Read 读取一个片段数据

func (*DeployFile) Sum added in v1.0.4

func (this *DeployFile) Sum() (string, error)

Sum 计算概要

type DeployManager added in v1.0.4

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

DeployManager 节点部署文件管理器 如果节点部署文件有变化,需要重启API节点以便于生效

func NewDeployManager added in v1.0.4

func NewDeployManager() *DeployManager

NewDeployManager 获取新节点部署文件管理器

func (*DeployManager) LoadNSNodeFiles added in v1.0.4

func (this *DeployManager) LoadNSNodeFiles() []*DeployFile

LoadNSNodeFiles 加载所有NS节点安装文件

func (*DeployManager) LoadNodeFiles added in v1.0.4

func (this *DeployManager) LoadNodeFiles() []*DeployFile

LoadNodeFiles 加载所有边缘节点文件

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) AddUpgrader

func (this *Manager) AddUpgrader(upgrader *Upgrader)

func (*Manager) FindUpgrader

func (this *Manager) FindUpgrader(apiNodeId int64) *Upgrader

func (*Manager) RemoveUpgrader

func (this *Manager) RemoveUpgrader(upgrader *Upgrader)

type Progress

type Progress struct {
	Percent float64
}

type Upgrader

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

func NewUpgrader

func NewUpgrader(apiNodeId int64) *Upgrader

func (*Upgrader) Progress

func (this *Upgrader) Progress() *Progress

Progress 查看升级进程

func (*Upgrader) Upgrade

func (this *Upgrader) Upgrade() error

Jump to

Keyboard shortcuts

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