service

package
v5.2.1-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: LGPL-3.0 Imports: 30 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duplicate

func Duplicate(a interface{}) (ret []interface{})

Duplicate Duplicate

Types

type AppService

type AppService struct {
	Prefix string
	// contains filtered or unexported fields
}

AppService app service

func CreateAppService

func CreateAppService(c *option.Conf) *AppService

CreateAppService create

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) GetPluginConfigAndType

func (d *DiscoverAction) GetPluginConfigAndType(namespace, sourceAlias, pluginID string) (*api_model.ResourceSpec, bool, error)

GetPluginConfigAndType get plugin configs and plugin type (default mesh or custom mesh) if not exist return error

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

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) 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

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

Jump to

Keyboard shortcuts

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