Documentation ¶
Index ¶
- func Duplicate(a interface{}) (ret []interface{})
- type AppService
- type DiscoverAction
- func (d *DiscoverAction) DiscoverClusters(tenantService, serviceCluster string) (*envoyv1.CDSCluter, *util.APIHandleError)
- func (d *DiscoverAction) DiscoverListeners(tenantService, serviceCluster string) (*envoyv1.LDSListener, *util.APIHandleError)
- func (d *DiscoverAction) DiscoverService(serviceInfo string) (*envoyv1.SDSHost, *util.APIHandleError)
- func (d *DiscoverAction) GetPluginConfigs(namespace, sourceAlias, pluginID string) (*api_model.ResourceSpec, error)
- type NodeService
- func (n *NodeService) AddNode(node *client.APIHostNode) (*client.HostNode, *utils.APIHandleError)
- func (n *NodeService) AsynchronousInstall(node *client.HostNode, eventID string)
- func (n *NodeService) CheckNode(nodeUID string) (*model.InstallStatus, *utils.APIHandleError)
- func (n *NodeService) CordonNode(nodeID string, unschedulable bool) *utils.APIHandleError
- func (n *NodeService) DeleteNode(nodeID string) *utils.APIHandleError
- func (n *NodeService) DeleteNodeCondition(nodeUID string, condition client.NodeConditionType) (*client.HostNode, *utils.APIHandleError)
- func (n *NodeService) DeleteNodeLabel(nodeID string, labels map[string]string) (map[string]string, *utils.APIHandleError)
- func (n *NodeService) DownNode(nodeID string) (*client.HostNode, *utils.APIHandleError)
- func (n *NodeService) GetAllNode() ([]*client.HostNode, *utils.APIHandleError)
- func (n *NodeService) GetNode(nodeID string) (*client.HostNode, *utils.APIHandleError)
- func (n *NodeService) GetNodeLabels(nodeID string) (*model.LabelsResp, *utils.APIHandleError)
- func (n *NodeService) GetNodeResource(nodeUID string) (*model.NodePodResource, *utils.APIHandleError)
- func (n *NodeService) GetServicesHealthy() (map[string][]map[string]string, *utils.APIHandleError)
- func (n *NodeService) InitStatus(nodeIP string) (*model.InitStatus, *utils.APIHandleError)
- func (n *NodeService) InstallNode(node *client.HostNode) *utils.APIHandleError
- func (n *NodeService) PutNodeLabel(nodeID string, labels map[string]string) (map[string]string, *utils.APIHandleError)
- func (n *NodeService) UpNode(nodeID string) (*client.HostNode, *utils.APIHandleError)
- func (n *NodeService) UpdateNodeStatus(nodeID, status string) *utils.APIHandleError
- type PrometheusService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppService ¶
type AppService struct { Prefix string // contains filtered or unexported fields }
AppService app service
func (*AppService) FindAppEndpoints ¶
func (a *AppService) FindAppEndpoints(appName string) []*config.Endpoint
FindAppEndpoints 获取app endpoint
type DiscoverAction ¶
type DiscoverAction struct {
// contains filtered or unexported fields
}
DiscoverAction DiscoverAction
func CreateDiscoverActionManager ¶
func CreateDiscoverActionManager(conf *option.Conf, kubecli kubecache.KubeClient) *DiscoverAction
CreateDiscoverActionManager CreateDiscoverActionManager
func (*DiscoverAction) DiscoverClusters ¶
func (d *DiscoverAction) DiscoverClusters( tenantService, serviceCluster string) (*envoyv1.CDSCluter, *util.APIHandleError)
DiscoverClusters cds discover create cluster by get depend app endpoints from plugin config
func (*DiscoverAction) DiscoverListeners ¶
func (d *DiscoverAction) DiscoverListeners( tenantService, serviceCluster string) (*envoyv1.LDSListener, *util.APIHandleError)
DiscoverListeners lds create listens by get depend app endpoints from plugin config
func (*DiscoverAction) DiscoverService ¶
func (d *DiscoverAction) DiscoverService(serviceInfo string) (*envoyv1.SDSHost, *util.APIHandleError)
DiscoverService sds
func (*DiscoverAction) GetPluginConfigs ¶
func (d *DiscoverAction) GetPluginConfigs(namespace, sourceAlias, pluginID string) (*api_model.ResourceSpec, error)
GetPluginConfigs get plugin configs if not exist return error
type NodeService ¶
type NodeService struct {
// contains filtered or unexported fields
}
NodeService node service
func CreateNodeService ¶
func CreateNodeService(c *option.Conf, nodecluster *node.Cluster, kubecli kubecache.KubeClient) *NodeService
CreateNodeService create
func (*NodeService) AddNode ¶
func (n *NodeService) AddNode(node *client.APIHostNode) (*client.HostNode, *utils.APIHandleError)
AddNode add node
func (*NodeService) AsynchronousInstall ¶
func (n *NodeService) AsynchronousInstall(node *client.HostNode, eventID string)
AsynchronousInstall AsynchronousInstall
func (*NodeService) CheckNode ¶
func (n *NodeService) CheckNode(nodeUID string) (*model.InstallStatus, *utils.APIHandleError)
CheckNode check node install status
func (*NodeService) CordonNode ¶
func (n *NodeService) CordonNode(nodeID string, unschedulable bool) *utils.APIHandleError
CordonNode set node is unscheduler
func (*NodeService) DeleteNode ¶
func (n *NodeService) DeleteNode(nodeID string) *utils.APIHandleError
DeleteNode delete node only node status is offline and node can be deleted
func (*NodeService) DeleteNodeCondition ¶
func (n *NodeService) DeleteNodeCondition(nodeUID string, condition client.NodeConditionType) (*client.HostNode, *utils.APIHandleError)
DeleteNodeCondition delete node condition
func (*NodeService) DeleteNodeLabel ¶
func (n *NodeService) DeleteNodeLabel(nodeID string, labels map[string]string) (map[string]string, *utils.APIHandleError)
DeleteNodeLabel delete node label
func (*NodeService) DownNode ¶
func (n *NodeService) DownNode(nodeID string) (*client.HostNode, *utils.APIHandleError)
DownNode down node
func (*NodeService) GetAllNode ¶
func (n *NodeService) GetAllNode() ([]*client.HostNode, *utils.APIHandleError)
GetAllNode get all node
func (*NodeService) GetNode ¶
func (n *NodeService) GetNode(nodeID string) (*client.HostNode, *utils.APIHandleError)
GetNode get node info
func (*NodeService) GetNodeLabels ¶
func (n *NodeService) GetNodeLabels(nodeID string) (*model.LabelsResp, *utils.APIHandleError)
GetNodeLabels returns node labels, including system labels and custom labels
func (*NodeService) GetNodeResource ¶
func (n *NodeService) GetNodeResource(nodeUID string) (*model.NodePodResource, *utils.APIHandleError)
GetNodeResource get node resource
func (*NodeService) GetServicesHealthy ¶
func (n *NodeService) GetServicesHealthy() (map[string][]map[string]string, *utils.APIHandleError)
GetServicesHealthy get service health
func (*NodeService) InitStatus ¶
func (n *NodeService) InitStatus(nodeIP string) (*model.InitStatus, *utils.APIHandleError)
InitStatus node init status
func (*NodeService) InstallNode ¶
func (n *NodeService) InstallNode(node *client.HostNode) *utils.APIHandleError
InstallNode install node
func (*NodeService) PutNodeLabel ¶
func (n *NodeService) PutNodeLabel(nodeID string, labels map[string]string) (map[string]string, *utils.APIHandleError)
PutNodeLabel update node label
func (*NodeService) UpNode ¶
func (n *NodeService) UpNode(nodeID string) (*client.HostNode, *utils.APIHandleError)
UpNode up node
func (*NodeService) UpdateNodeStatus ¶
func (n *NodeService) UpdateNodeStatus(nodeID, status string) *utils.APIHandleError
UpdateNodeStatus update node status
type PrometheusService ¶
type PrometheusService struct {
// contains filtered or unexported fields
}
PrometheusService prometheus service
func CreatePrometheusService ¶
func CreatePrometheusService(c *option.Conf, ms *masterserver.MasterServer) *PrometheusService
CreatePrometheusService create prometheus service
func (*PrometheusService) Exec ¶
func (ts *PrometheusService) Exec(expr string) (*model.Prome, *utils.APIHandleError)
Exec exec prometheus query
func (*PrometheusService) ExecRange ¶
func (ts *PrometheusService) ExecRange(expr, start, end, step string) (*model.Prome, *utils.APIHandleError)
ExecRange exec prometheus query range