Documentation ¶
Index ¶
- Constants
- type Edge
- func (e *Edge) ConvertToEdgeAppInfo(edgeApp *dbclient.EdgeApp) (*apistructs.EdgeAppInfo, error)
- func (e *Edge) CreateApp(ctx context.Context, req *apistructs.EdgeAppCreateRequest) error
- func (e *Edge) CreateConfigSet(ctx context.Context, req *apistructs.EdgeConfigSetCreateRequest) (uint64, error)
- func (e *Edge) CreateConfigSetItem(ctx context.Context, req *apistructs.EdgeCfgSetItemCreateRequest) ([]uint64, error)
- func (e *Edge) CreateEdgeMysql(ctx context.Context, req *apistructs.EdgeAppCreateRequest) error
- func (e *Edge) CreateSite(ctx context.Context, req *apistructs.EdgeSiteCreateRequest) (uint64, error)
- func (e *Edge) DeleteApp(ctx context.Context, appID int64) error
- func (e *Edge) DeleteConfigSet(ctx context.Context, configSetID int64) error
- func (e *Edge) DeleteConfigSetItem(ctx context.Context, itemID int64) error
- func (e *Edge) DeleteEdgeMysql(ctx context.Context, appID int64) error
- func (e *Edge) DeleteSite(ctx context.Context, edgeSiteID int64) error
- func (e *Edge) GetApp(edgeAppID int64) (*apistructs.EdgeAppInfo, error)
- func (e *Edge) GetAppStatus(ctx context.Context, appID int64) (*apistructs.EdgeAppStatusResponse, error)
- func (e *Edge) GetConfigSet(ctx context.Context, configSetID int64) (*apistructs.EdgeConfigSetInfo, error)
- func (e *Edge) GetConfigSetItem(itemID int64) (*apistructs.EdgeCfgSetItemInfo, error)
- func (e *Edge) GetEdgeMysqlStatus(ctx context.Context, appID int64) (*apistructs.EdgeAppStatusResponse, error)
- func (e *Edge) GetEdgeSite(ctx context.Context, edgeSiteID int64) (*apistructs.EdgeSiteInfo, error)
- func (e *Edge) GetInitSiteShell(ctx context.Context, 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(ctx context.Context, param *apistructs.EdgeConfigSetListPageRequest) (int, *[]apistructs.EdgeConfigSetInfo, error)
- func (e *Edge) ListConfigSetItem(param *apistructs.EdgeCfgSetItemListPageRequest) (int, *[]apistructs.EdgeCfgSetItemInfo, error)
- func (e *Edge) ListSite(ctx context.Context, param *apistructs.EdgeSiteListPageRequest) (int, *[]apistructs.EdgeSiteInfo, error)
- func (e *Edge) OfflineAppSite(ctx context.Context, edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) OfflineEdgeHost(ctx context.Context, edgeSiteID int64, siteIP string) error
- func (e *Edge) OfflineEdgeMysql(ctx context.Context, edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) RestartAppSite(ctx context.Context, edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) RestartEdgeMysql(ctx context.Context, edgeApp *dbclient.EdgeApp, siteName string) error
- func (e *Edge) UpdateApp(ctx context.Context, edgeAppID int64, req *apistructs.EdgeAppUpdateRequest) error
- func (e *Edge) UpdateConfigSet(configSetID int64, req *apistructs.EdgeConfigSetUpdateRequest) error
- func (e *Edge) UpdateConfigSetItem(ctx context.Context, itemID int64, req *apistructs.EdgeCfgSetItemUpdateRequest) error
- func (e *Edge) UpdateEdgeMysql(ctx context.Context, 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(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) 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(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 ¶
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(ctx context.Context, 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(ctx context.Context, 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(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 Option ¶
type Option func(*Edge)
func WithClusterSvc ¶
func WithClusterSvc(clusterSvc clusterpb.ClusterServiceServer) Option
WithClusterSvc With cluster-manager ClusterService
func WithKubernetes ¶
func WithKubernetes(k *kubernetes.Kubernetes) Option
WithKubernetes With kubernetes client.
func WithOrg ¶
func WithOrg(org org.ClientInterface) Option