edge

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MasterTag = "mysql-master"
	SlaveTag  = "mysql-slave"
)
View Source
const (
	ScopePublic            = "public"
	ScopePublicDisplayName = "通用"
	ScopeSite              = "site"
)
View Source
const (
	DeploymentType             = "Deployment"
	StatefulSetType            = "StatefulSet"
	UnitedDeploymentAPIVersion = "apps.openyurt.io/v1alpha1"
	UnitedDeploymentKind       = "UnitedDeployment"
	SecretKind                 = "Secret"
	SecretApiVersion           = "v1"
	EdgeAppPrefix              = "edgeapp"
	EdgeAppDeployingStatus     = "deploying"
	EdgeAppSucceedStatus       = "succeed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

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

func New

func New(options ...Option) *Edge

func (*Edge) ConvertToEdgeAppInfo

func (e *Edge) ConvertToEdgeAppInfo(edgeApp *dbclient.EdgeApp) (*apistructs.EdgeAppInfo, error)

ConvertToEdgeAppInfo Convert type EdgeApp to type EdgeAppInfo.

func (*Edge) CreateApp

func (e *Edge) CreateApp(req *apistructs.EdgeAppCreateRequest) error

CreateApp Create edge application

func (*Edge) CreateConfigSet

func (e *Edge) CreateConfigSet(req *apistructs.EdgeConfigSetCreateRequest) (uint64, error)

CreateConfigSet Create configSet namespaces in specified cluster.

func (*Edge) CreateConfigSetItem

func (e *Edge) CreateConfigSetItem(req *apistructs.EdgeCfgSetItemCreateRequest) ([]uint64, error)

CreateConfigSetItem Create configSet item.

func (*Edge) CreateEdgeMysql

func (e *Edge) CreateEdgeMysql(req *apistructs.EdgeAppCreateRequest) error

func (*Edge) CreateSite

func (e *Edge) CreateSite(req *apistructs.EdgeSiteCreateRequest) (uint64, error)

CreateSite Create edge site.

func (*Edge) DeleteApp

func (e *Edge) DeleteApp(appID int64) error

func (*Edge) DeleteConfigSet

func (e *Edge) DeleteConfigSet(configSetID int64) error

DeleteConfigSet Delete configSet by configSetID in specified cluster.

func (*Edge) DeleteConfigSetItem

func (e *Edge) DeleteConfigSetItem(itemID int64) error

DeleteConfigSetItem Delete configSet item.

func (*Edge) DeleteEdgeMysql

func (e *Edge) DeleteEdgeMysql(appID int64) error

func (*Edge) DeleteSite

func (e *Edge) DeleteSite(edgeSiteID int64) error

DeleteSite Delete edge site.

func (*Edge) GetApp

func (e *Edge) GetApp(edgeAppID int64) (*apistructs.EdgeAppInfo, error)

GetApp get edge application information

func (*Edge) GetAppStatus

func (e *Edge) GetAppStatus(appID int64) (*apistructs.EdgeAppStatusResponse, error)

func (*Edge) GetConfigSet

func (e *Edge) GetConfigSet(configSetID int64) (*apistructs.EdgeConfigSetInfo, error)

GetConfigSet Get configSet by configSetID.

func (*Edge) GetConfigSetItem

func (e *Edge) GetConfigSetItem(itemID int64) (*apistructs.EdgeCfgSetItemInfo, error)

GetConfigSetItem Get configSet item by item id.

func (*Edge) GetEdgeMysqlStatus

func (e *Edge) GetEdgeMysqlStatus(appID int64) (*apistructs.EdgeAppStatusResponse, error)

func (*Edge) GetEdgeSite

func (e *Edge) GetEdgeSite(edgeSiteID int64) (*apistructs.EdgeSiteInfo, error)

GetEdgeSite get edge site with site id

func (*Edge) GetInitSiteShell

func (e *Edge) GetInitSiteShell(edgeSiteID int64) (map[string][]string, error)

GetInitSiteShell Get edge site init shell.

func (*Edge) IsContain

func (e *Edge) IsContain(items []string, item string) bool

func (*Edge) ListApp

ListApp Get all edge application list.

func (*Edge) ListConfigSet

ListConfigSet List configSet by orgID or clusterID.

func (*Edge) ListConfigSetItem

ListConfigSetItem List configSet item paging or search condition.

func (*Edge) ListSite

ListSite List edge site paging.

func (*Edge) OfflineAppSite

func (e *Edge) OfflineAppSite(edgeApp *dbclient.EdgeApp, siteName string) error

func (*Edge) OfflineEdgeHost

func (e *Edge) OfflineEdgeHost(edgeSiteID int64, siteIP string) error

OfflineEdgeHost Offline edge host and clean monitor data.

func (*Edge) OfflineEdgeMysql

func (e *Edge) OfflineEdgeMysql(edgeApp *dbclient.EdgeApp, siteName string) error

func (*Edge) RestartAppSite

func (e *Edge) RestartAppSite(edgeApp *dbclient.EdgeApp, siteName string) error

func (*Edge) RestartEdgeMysql

func (e *Edge) RestartEdgeMysql(edgeApp *dbclient.EdgeApp, siteName string) error

func (*Edge) UpdateApp

func (e *Edge) UpdateApp(edgeAppID int64, req *apistructs.EdgeAppUpdateRequest) error

func (*Edge) UpdateConfigSet

func (e *Edge) UpdateConfigSet(configSetID int64, req *apistructs.EdgeConfigSetUpdateRequest) error

UpdateConfigSet Update configSet

func (*Edge) UpdateConfigSetItem

func (e *Edge) UpdateConfigSetItem(itemID int64, req *apistructs.EdgeCfgSetItemUpdateRequest) error

UpdateConfigSetItem Update configSet item.

func (*Edge) UpdateEdgeMysql

func (e *Edge) UpdateEdgeMysql(edgeAppID int64, req *apistructs.EdgeAppUpdateRequest) error

func (*Edge) UpdateSite

func (e *Edge) UpdateSite(edgeSiteID int64, req *apistructs.EdgeSiteUpdateRequest) error

UpdateSite Update edge site.

type NodePools

type NodePools = map[string]*v1alpha1.NodePool

NodePools clusterName: nodePools

type Option

type Option func(*Edge)

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle With bundle module.

func WithDBClient

func WithDBClient(db *dbclient.DBClient) Option

WithDBClient With db client.

func WithKubernetes

func WithKubernetes(k *kubernetes.Kubernetes) Option

WithKubernetes With kubernetes client.

Jump to

Keyboard shortcuts

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