edge

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 32 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(ctx context.Context, req *apistructs.EdgeAppCreateRequest) error

CreateApp Create edge application

func (*Edge) CreateConfigSet

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

CreateConfigSet Create configSet namespaces in specified cluster.

func (*Edge) CreateConfigSetItem

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

CreateConfigSetItem Create configSet item.

func (*Edge) CreateEdgeMysql

func (e *Edge) CreateEdgeMysql(ctx context.Context, req *apistructs.EdgeAppCreateRequest) error

func (*Edge) CreateSite

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

CreateSite Create edge site.

func (*Edge) DeleteApp

func (e *Edge) DeleteApp(ctx context.Context, appID int64) error

func (*Edge) DeleteConfigSet

func (e *Edge) DeleteConfigSet(ctx context.Context, configSetID int64) error

DeleteConfigSet Delete configSet by configSetID in specified cluster.

func (*Edge) DeleteConfigSetItem

func (e *Edge) DeleteConfigSetItem(ctx context.Context, itemID int64) error

DeleteConfigSetItem Delete configSet item.

func (*Edge) DeleteEdgeMysql

func (e *Edge) DeleteEdgeMysql(ctx context.Context, appID int64) error

func (*Edge) DeleteSite

func (e *Edge) DeleteSite(ctx context.Context, 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(ctx context.Context, appID int64) (*apistructs.EdgeAppStatusResponse, error)

func (*Edge) GetConfigSet

func (e *Edge) GetConfigSet(ctx context.Context, 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(ctx context.Context, appID int64) (*apistructs.EdgeAppStatusResponse, error)

func (*Edge) GetEdgeSite

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

GetEdgeSite get edge site with site id

func (*Edge) GetInitSiteShell

func (e *Edge) GetInitSiteShell(ctx context.Context, 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(ctx context.Context, edgeApp *dbclient.EdgeApp, siteName string) error

func (*Edge) OfflineEdgeHost

func (e *Edge) OfflineEdgeHost(ctx context.Context, edgeSiteID int64, siteIP string) error

OfflineEdgeHost Offline edge host and clean monitor data.

func (*Edge) OfflineEdgeMysql

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

func (*Edge) RestartAppSite

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

func (*Edge) RestartEdgeMysql

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

func (*Edge) UpdateApp

func (e *Edge) UpdateApp(ctx context.Context, 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(ctx context.Context, itemID int64, req *apistructs.EdgeCfgSetItemUpdateRequest) error

UpdateConfigSetItem Update configSet item.

func (*Edge) UpdateEdgeMysql

func (e *Edge) UpdateEdgeMysql(ctx context.Context, 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 WithClusterSvc

func WithClusterSvc(clusterSvc clusterpb.ClusterServiceServer) Option

WithClusterSvc With cluster-manager ClusterService

func WithDBClient

func WithDBClient(db *dbclient.DBClient) Option

WithDBClient With db client.

func WithKubernetes

func WithKubernetes(k *kubernetes.Kubernetes) Option

WithKubernetes With kubernetes client.

func WithOrg

func WithOrg(org org.ClientInterface) Option

Jump to

Keyboard shortcuts

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