Documentation ¶
Index ¶
- Constants
- type Edge
- func (e *Edge) ConvertToEdgeAppInfo(edgeApp *dbclient.EdgeApp) (*apistructs.EdgeAppInfo, error)
- func (e *Edge) CreateApp(req *apistructs.EdgeAppCreateRequest) error
- func (e *Edge) CreateConfigSet(req *apistructs.EdgeConfigSetCreateRequest) (uint64, error)
- func (e *Edge) CreateConfigSetItem(req *apistructs.EdgeCfgSetItemCreateRequest) ([]uint64, error)
- func (e *Edge) CreateEdgeMysql(req *apistructs.EdgeAppCreateRequest) error
- func (e *Edge) CreateSite(req *apistructs.EdgeSiteCreateRequest) (uint64, error)
- func (e *Edge) DeleteApp(appID int64) error
- func (e *Edge) DeleteConfigSet(configSetID int64) error
- func (e *Edge) DeleteConfigSetItem(itemID int64) error
- func (e *Edge) DeleteEdgeMysql(appID int64) error
- func (e *Edge) DeleteSite(edgeSiteID int64) error
- func (e *Edge) GetApp(edgeAppID int64) (*apistructs.EdgeAppInfo, error)
- func (e *Edge) GetAppStatus(appID int64) (*apistructs.EdgeAppStatusResponse, error)
- func (e *Edge) GetConfigSet(configSetID int64) (*apistructs.EdgeConfigSetInfo, error)
- func (e *Edge) GetConfigSetItem(itemID int64) (*apistructs.EdgeCfgSetItemInfo, error)
- func (e *Edge) GetEdgeMysqlStatus(appID int64) (*apistructs.EdgeAppStatusResponse, error)
- func (e *Edge) GetEdgeSite(edgeSiteID int64) (*apistructs.EdgeSiteInfo, error)
- func (e *Edge) GetInitSiteShell(edgeSiteID int64) (map[string][]string, error)
- func (e *Edge) IsContain(items []string, item string) bool
- func (e *Edge) ListApp(param *apistructs.EdgeAppListPageRequest) (int, *[]apistructs.EdgeAppInfo, error)
- func (e *Edge) ListConfigSet(param *apistructs.EdgeConfigSetListPageRequest) (int, *[]apistructs.EdgeConfigSetInfo, error)
- func (e *Edge) ListConfigSetItem(param *apistructs.EdgeCfgSetItemListPageRequest) (int, *[]apistructs.EdgeCfgSetItemInfo, error)
- func (e *Edge) ListSite(param *apistructs.EdgeSiteListPageRequest) (int, *[]apistructs.EdgeSiteInfo, error)
- func (e *Edge) OfflineAppSite(edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) OfflineEdgeHost(edgeSiteID int64, siteIP string) error
- func (e *Edge) OfflineEdgeMysql(edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) RestartAppSite(edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) RestartEdgeMysql(edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) UpdateApp(edgeAppID int64, req *apistructs.EdgeAppUpdateRequest) error
- func (e *Edge) UpdateConfigSet(configSetID int64, req *apistructs.EdgeConfigSetUpdateRequest) error
- func (e *Edge) UpdateConfigSetItem(itemID int64, req *apistructs.EdgeCfgSetItemUpdateRequest) error
- func (e *Edge) UpdateEdgeMysql(edgeAppID int64, req *apistructs.EdgeAppUpdateRequest) error
- func (e *Edge) UpdateSite(edgeSiteID int64, req *apistructs.EdgeSiteUpdateRequest) error
- type NodePools
- type Option
Constants ¶
const ( MasterTag = "mysql-master" SlaveTag = "mysql-slave" )
const ( ScopePublic = "public" ScopePublicDisplayName = "通用" ScopeSite = "site" )
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 (*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) DeleteConfigSet ¶
DeleteConfigSet Delete configSet by configSetID in specified cluster.
func (*Edge) DeleteConfigSetItem ¶
DeleteConfigSetItem Delete configSet item.
func (*Edge) DeleteEdgeMysql ¶
func (*Edge) DeleteSite ¶
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 ¶
GetInitSiteShell Get edge site init shell.
func (*Edge) ListApp ¶
func (e *Edge) ListApp(param *apistructs.EdgeAppListPageRequest) (int, *[]apistructs.EdgeAppInfo, error)
ListApp Get all edge application list.
func (*Edge) ListConfigSet ¶
func (e *Edge) ListConfigSet(param *apistructs.EdgeConfigSetListPageRequest) (int, *[]apistructs.EdgeConfigSetInfo, error)
ListConfigSet List configSet by orgID or clusterID.
func (*Edge) ListConfigSetItem ¶
func (e *Edge) ListConfigSetItem(param *apistructs.EdgeCfgSetItemListPageRequest) (int, *[]apistructs.EdgeCfgSetItemInfo, error)
ListConfigSetItem List configSet item paging or search condition.
func (*Edge) ListSite ¶
func (e *Edge) ListSite(param *apistructs.EdgeSiteListPageRequest) (int, *[]apistructs.EdgeSiteInfo, error)
ListSite List edge site paging.
func (*Edge) OfflineAppSite ¶
func (*Edge) OfflineEdgeHost ¶
OfflineEdgeHost Offline edge host and clean monitor data.
func (*Edge) OfflineEdgeMysql ¶
func (*Edge) RestartAppSite ¶
func (*Edge) RestartEdgeMysql ¶
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 Option ¶
type Option func(*Edge)
func WithKubernetes ¶
func WithKubernetes(k *kubernetes.Kubernetes) Option
WithKubernetes With kubernetes client.