service

package
v3.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: LGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

CreateDiscoverActionManager CreateDiscoverActionManager

func (*DiscoverAction) DiscoverClusters

func (d *DiscoverAction) DiscoverClusters(
	tenantService,
	serviceCluster string) (*node_model.CDS, *util.APIHandleError)

DiscoverClusters cds

func (*DiscoverAction) DiscoverListeners

func (d *DiscoverAction) DiscoverListeners(
	tenantService, serviceCluster string) (*node_model.LDS, *util.APIHandleError)

DiscoverListeners lds

func (*DiscoverAction) DiscoverService

func (d *DiscoverAction) DiscoverService(serviceInfo string) (*node_model.SDS, *util.APIHandleError)

DiscoverService sds

func (*DiscoverAction) ToolsBuildPieceLDS

func (d *DiscoverAction) ToolsBuildPieceLDS()

ToolsBuildPieceLDS ToolsBuildPieceLDS

func (*DiscoverAction) ToolsGetK8SServiceList

func (d *DiscoverAction) ToolsGetK8SServiceList(uuid string) (*v1.ServiceList, error)

ToolsGetK8SServiceList GetK8SServiceList

func (*DiscoverAction) ToolsGetMainPodEnvs

func (d *DiscoverAction) ToolsGetMainPodEnvs(namespace, serviceAlias string) (
	*[]v1.EnvVar,
	*util.APIHandleError)

ToolsGetMainPodEnvs ToolsGetMainPodEnvs

func (*DiscoverAction) ToolsGetRainbondResources

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

ToolsGetRainbondResources 获取rainbond自定义resources

func (*DiscoverAction) ToolsGetRouterItem

func (d *DiscoverAction) ToolsGetRouterItem(
	destAlias, kind string,
	sr map[string]interface{}) interface{}

ToolsGetRouterItem ToolsGetRouterItem

func (*DiscoverAction) ToolsGetSourcesEnv

func (d *DiscoverAction) ToolsGetSourcesEnv(
	namespace, sourceAlias, envName string) ([]byte, *util.APIHandleError)

ToolsGetSourcesEnv rds

type NodeService

type NodeService struct {
	// contains filtered or unexported fields
}

NodeService node service

func CreateNodeService

func CreateNodeService(c *option.Conf, nodecluster *node.NodeCluster) *NodeService

CreateNodeService create

func (*NodeService) AddNode

func (n *NodeService) AddNode(node *model.APIHostNode) *utils.APIHandleError

AddNode add node

func (*NodeService) CheckNode

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

func (*NodeService) CordonNode

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

CordonNode 设置节点不可调度熟悉

func (*NodeService) DeleteNode

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

DeleteNode 删除节点信息 只有节点状态属于(离线状态)才能删除

func (*NodeService) DownNode

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

DownNode 节点下线

func (*NodeService) GetAllNode

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

GetAllNode get all node

func (*NodeService) GetNode

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

GetNode 获取node

func (*NodeService) GetNodeResource

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

func (*NodeService) InitStatus

func (n *NodeService) InitStatus(nodeIP string) (*model.InitStatus, *utils.APIHandleError)

func (*NodeService) InstallNode

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

func (*NodeService) PutNodeLabel

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

PutNodeLabel 更新node label

func (*NodeService) UpNode

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

UpNode 节点上线

type PrometheusService

type PrometheusService struct {
	// contains filtered or unexported fields
}

TaskService 处理taskAPI

func CreatePrometheusService

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

CreateTaskService 创建Task service

func (*PrometheusService) AddTask

func (ts *PrometheusService) AddTask(t *model.Task) *utils.APIHandleError

AddTask add task

func (*PrometheusService) Exec

AddTask add task

func (*PrometheusService) ExecRange

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

func (*PrometheusService) GetTasksByNode

func (ts *PrometheusService) GetTasksByNode(n *model.HostNode) ([]*model.Task, *utils.APIHandleError)

type TaskGroupService

type TaskGroupService struct {
	SavePath string
	// contains filtered or unexported fields
}

TaskGroupService 任务组

func CreateTaskGroupService

func CreateTaskGroupService(c *option.Conf, ms *masterserver.MasterServer) *TaskGroupService

CreateTaskGroupService 创建Task group service

func (*TaskGroupService) AddTaskGroup

func (ts *TaskGroupService) AddTaskGroup(t *model.TaskGroup) *utils.APIHandleError

AddTaskGroup add task group

func (*TaskGroupService) DeleteTaskGroup

func (ts *TaskGroupService) DeleteTaskGroup(taskGroupID string) *utils.APIHandleError

DeleteTaskGroup 删除TaskGroup 删除Group不删除包含的Task

func (*TaskGroupService) ExecTaskGroup

func (ts *TaskGroupService) ExecTaskGroup(taskGroupID string, nodes []string) *utils.APIHandleError

ExecTaskGroup 执行组任务API处理

func (*TaskGroupService) GetTaskGroup

func (ts *TaskGroupService) GetTaskGroup(taskGroupID string) (*model.TaskGroup, *utils.APIHandleError)

GetTaskGroup 获取Task

func (*TaskGroupService) GetTaskGroups

func (ts *TaskGroupService) GetTaskGroups() ([]*model.TaskGroup, *utils.APIHandleError)

GetTaskGroups get tasks

type TaskService

type TaskService struct {
	SavePath string
	// contains filtered or unexported fields
}

TaskService 处理taskAPI

func CreateTaskService

func CreateTaskService(c *option.Conf, ms *masterserver.MasterServer) *TaskService

CreateTaskService 创建Task service

func (*TaskService) AddTask

func (ts *TaskService) AddTask(t *model.Task) *utils.APIHandleError

AddTask add task

func (*TaskService) DeleteTask

func (ts *TaskService) DeleteTask(taskID string) *utils.APIHandleError

DeleteTask 删除Task

func (*TaskService) ExecTask

func (ts *TaskService) ExecTask(taskID string, nodes []string) *utils.APIHandleError

ExecTask 执行任务API处理

func (*TaskService) GetTask

func (ts *TaskService) GetTask(taskID string) (*model.Task, *utils.APIHandleError)

GetTask 获取Task

func (*TaskService) GetTasks

func (ts *TaskService) GetTasks() ([]*model.Task, *utils.APIHandleError)

GetTasks get tasks

func (*TaskService) GetTasksByNode

func (ts *TaskService) GetTasksByNode(n *model.HostNode) ([]*model.Task, *utils.APIHandleError)

func (*TaskService) ReloadStaticTasks

func (ts *TaskService) ReloadStaticTasks()

ReloadStaticTasks reload task

type TaskTempService

type TaskTempService struct {
	SavePath string
	// contains filtered or unexported fields
}

TaskTempService 任务模版

func CreateTaskTempService

func CreateTaskTempService(c *option.Conf) *TaskTempService

CreateTaskTempService 创建Task service

func (*TaskTempService) DeleteTaskTemp

func (ts *TaskTempService) DeleteTaskTemp(tempID string) *utils.APIHandleError

DeleteTaskTemp 删除任务模版

func (*TaskTempService) GetTaskTemp

func (ts *TaskTempService) GetTaskTemp(tempID string) (*model.TaskTemp, *utils.APIHandleError)

GetTaskTemp add task

func (*TaskTempService) SaveTaskTemp

func (ts *TaskTempService) SaveTaskTemp(t *model.TaskTemp) *utils.APIHandleError

SaveTaskTemp add task

Jump to

Keyboard shortcuts

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