rainbond: github.com/goodrain/rainbond/node/core/service Index | Files

package service

import "github.com/goodrain/rainbond/node/core/service"


Package Files

app_service.go discover_server.go node_service.go prometheus_service.go

func Duplicate Uses

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

Duplicate Duplicate

type AppService Uses

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

AppService app service

func CreateAppService Uses

func CreateAppService(c *option.Conf) *AppService

CreateAppService create

func (*AppService) FindAppEndpoints Uses

func (a *AppService) FindAppEndpoints(appName string) []*config.Endpoint

FindAppEndpoints 获取app endpoint

type DiscoverAction Uses

type DiscoverAction struct {
    // contains filtered or unexported fields

DiscoverAction DiscoverAction

func CreateDiscoverActionManager Uses

func CreateDiscoverActionManager(conf *option.Conf, kubecli kubecache.KubeClient) *DiscoverAction

CreateDiscoverActionManager CreateDiscoverActionManager

func (*DiscoverAction) DiscoverClusters Uses

func (d *DiscoverAction) DiscoverClusters(
    serviceCluster string) (*envoyv1.CDSCluter, *util.APIHandleError)

DiscoverClusters cds discover create cluster by get depend app endpoints from plugin config

func (*DiscoverAction) DiscoverListeners Uses

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 Uses

func (d *DiscoverAction) DiscoverService(serviceInfo string) (*envoyv1.SDSHost, *util.APIHandleError)

DiscoverService sds

func (*DiscoverAction) GetPluginConfigs Uses

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

GetPluginConfigs get plugin configs if not exist return error

type NodeService Uses

type NodeService struct {
    // contains filtered or unexported fields

NodeService node service

func CreateNodeService Uses

func CreateNodeService(c *option.Conf, nodecluster *node.Cluster, kubecli kubecache.KubeClient) *NodeService

CreateNodeService create

func (*NodeService) AddNode Uses

func (n *NodeService) AddNode(node *client.APIHostNode) (*client.HostNode, *utils.APIHandleError)

AddNode add node

func (*NodeService) AsynchronousInstall Uses

func (n *NodeService) AsynchronousInstall(node *client.HostNode, eventID string)

AsynchronousInstall AsynchronousInstall

func (*NodeService) CheckNode Uses

func (n *NodeService) CheckNode(nodeUID string) (*model.InstallStatus, *utils.APIHandleError)

CheckNode check node install status

func (*NodeService) CordonNode Uses

func (n *NodeService) CordonNode(nodeID string, unschedulable bool) *utils.APIHandleError

CordonNode set node is unscheduler

func (*NodeService) DeleteNode Uses

func (n *NodeService) DeleteNode(nodeID string) *utils.APIHandleError

DeleteNode delete node only node status is offline and node can be deleted

func (*NodeService) DeleteNodeCondition Uses

func (n *NodeService) DeleteNodeCondition(nodeUID string, condition client.NodeConditionType) (*client.HostNode, *utils.APIHandleError)

DeleteNodeCondition delete node condition

func (*NodeService) DeleteNodeLabel Uses

func (n *NodeService) DeleteNodeLabel(nodeID string, labels map[string]string) (map[string]string, *utils.APIHandleError)

DeleteNodeLabel delete node label

func (*NodeService) DownNode Uses

func (n *NodeService) DownNode(nodeID string) (*client.HostNode, *utils.APIHandleError)

DownNode down node

func (*NodeService) GetAllNode Uses

func (n *NodeService) GetAllNode() ([]*client.HostNode, *utils.APIHandleError)

GetAllNode get all node

func (*NodeService) GetNode Uses

func (n *NodeService) GetNode(nodeID string) (*client.HostNode, *utils.APIHandleError)

GetNode get node info

func (*NodeService) GetNodeLabels Uses

func (n *NodeService) GetNodeLabels(nodeID string) (*model.LabelsResp, *utils.APIHandleError)

GetNodeLabels returns node labels, including system labels and custom labels

func (*NodeService) GetNodeResource Uses

func (n *NodeService) GetNodeResource(nodeUID string) (*model.NodePodResource, *utils.APIHandleError)

GetNodeResource get node resource

func (*NodeService) GetServicesHealthy Uses

func (n *NodeService) GetServicesHealthy() (map[string][]map[string]string, *utils.APIHandleError)

GetServicesHealthy get service health

func (*NodeService) InstallNode Uses

func (n *NodeService) InstallNode(node *client.HostNode) *utils.APIHandleError

InstallNode install node

func (*NodeService) PutNodeLabel Uses

func (n *NodeService) PutNodeLabel(nodeID string, labels map[string]string) (map[string]string, *utils.APIHandleError)

PutNodeLabel update node label

func (*NodeService) UpNode Uses

func (n *NodeService) UpNode(nodeID string) (*client.HostNode, *utils.APIHandleError)

UpNode up node

func (*NodeService) UpdateNodeStatus Uses

func (n *NodeService) UpdateNodeStatus(nodeID, status string) *utils.APIHandleError

UpdateNodeStatus update node status

type PrometheusService Uses

type PrometheusService struct {
    // contains filtered or unexported fields

PrometheusService prometheus service

func CreatePrometheusService Uses

func CreatePrometheusService(c *option.Conf, ms *masterserver.MasterServer) *PrometheusService

CreatePrometheusService create prometheus service

func (*PrometheusService) Exec Uses

func (ts *PrometheusService) Exec(expr string) (*model.Prome, *utils.APIHandleError)

Exec exec prometheus query

func (*PrometheusService) ExecRange Uses

func (ts *PrometheusService) ExecRange(expr, start, end, step string) (*model.Prome, *utils.APIHandleError)

ExecRange exec prometheus query range

Package service imports 29 packages (graph) and is imported by 1 packages. Updated 2020-01-14. Refresh now. Tools for package owners.