Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/caoyingjunz/pixiu
/ functions
Functions
1,262 in github.com/caoyingjunz/pixiu
⨍
Functions
1,262
◇
Types & classes
331
↓ 232 callers
Function
SetFailed
SetFailed 设置错误返回值
api/server/httputils/httputils.go:83
↓ 114 callers
Function
NewResponse
NewResponse 构造 http 返回值 SetSuccess 时设置 code 为 200 并追加 success 的标识 SetFailed 时设置 code 为 400,也可以自定义设置错误码,并追加报错信息
api/server/httputils/httputils.go:71
↓ 107 callers
Function
SetSuccess
SetSuccess 设置成功返回值
api/server/httputils/httputils.go:76
↓ 64 callers
Method
Get
(ctx context.Context, nodeId int64)
pkg/controller/node/node.go:40
↓ 55 callers
Method
Plan
()
pkg/controller/plan/plan.go:40
↓ 47 callers
Function
ShouldBindAny
(c *gin.Context, jsonObject interface{}, uriObject interface{}, queryObject interface{})
api/server/httputils/httputils.go:116
↓ 31 callers
Method
Error
(ctx context.Context, msg string, data ...interface{})
pkg/db/logger.go:53
↓ 31 callers
Method
List
(ctx context.Context, opt types.ListOptions)
pkg/controller/node/node.go:41
↓ 26 callers
Method
Cluster
()
pkg/db/factory.go:24
↓ 25 callers
Method
Cluster
()
pkg/controller/cluster/cluster.go:55
↓ 25 callers
Method
Delete
(ctx context.Context, nodeId int64)
pkg/controller/node/node.go:39
↓ 25 callers
Method
Marshal
()
pkg/types/meta.go:418
↓ 22 callers
Method
Create
(ctx context.Context, req *types.CreateNodeRequest)
pkg/controller/node/node.go:37
↓ 22 callers
Method
Get
(ctx context.Context, aid int64)
pkg/db/apis.go:33
↓ 22 callers
Method
Plan
()
pkg/db/factory.go:30
↓ 20 callers
Method
APIResource
()
pkg/controller/apiresource/apiresource.go:33
↓ 20 callers
Function
IsRecordNotFound
(err error)
pkg/util/errors/errors.go:67
↓ 20 callers
Method
Set
(planId int64, tasks []model.Task)
pkg/client/task.go:69
↓ 19 callers
Method
Close
()
pkg/types/meta.go:212
↓ 17 callers
Method
Create
(ctx context.Context, object *model.API)
pkg/db/apis.go:30
↓ 16 callers
Method
List
(ctx context.Context, opts ...Options)
pkg/db/apis.go:34
↓ 16 callers
Method
Update
(ctx context.Context, nodeId int64, req *types.UpdateNodeRequest)
pkg/controller/node/node.go:38
↓ 15 callers
Method
Delete
(ctx context.Context, aid int64)
pkg/db/apis.go:32
↓ 15 callers
Method
Done
Done 标记关闭doneChan,关闭后触发退出终端
pkg/types/meta.go:153
↓ 15 callers
Method
Helm
()
pkg/controller/helm/helm.go:32
↓ 15 callers
Method
Register
Register 注册路由并同步 API 元数据到数据库
api/server/router/apiregistry/apiregistry.go:51
↓ 14 callers
Method
API
()
pkg/db/factory.go:28
↓ 14 callers
Method
GetClusterSetByName
GetClusterSetByName 获取 ClusterSet, 缓存中不存在时,构建缓存再返回
pkg/controller/cluster/cluster.go:891
↓ 14 callers
Method
Unmarshal
(s string)
pkg/types/meta.go:426
↓ 14 callers
Method
User
()
pkg/controller/user/user.go:49
↓ 14 callers
Method
User
()
pkg/db/factory.go:29
↓ 13 callers
Method
Count
(ctx context.Context, opts ...Options)
pkg/db/apis.go:35
↓ 13 callers
Method
Run
未开始,运行中,异常和完成
pkg/controller/plan/worker.go:38
↓ 12 callers
Method
Runner
()
pkg/controller/runner/runner.go:36
↓ 12 callers
Function
WithLimit
(limit int)
pkg/db/options.go:59
↓ 12 callers
Function
WithOffset
(offset int)
pkg/db/options.go:41
↓ 11 callers
Method
Role
()
pkg/controller/role/role.go:33
↓ 11 callers
Method
Update
(ctx context.Context, aid int64, resourceVersion int64, updates map[string]interface{})
pkg/db/apis.go:31
↓ 11 callers
Function
register
(model ...interface{})
pkg/db/model/model.go:21
↓ 10 callers
Method
Contains
(key interface{})
pkg/util/lru/lru.go:45
↓ 10 callers
Method
Distribution
()
pkg/controller/distribution/distribution.go:33
↓ 10 callers
Method
Permission
()
pkg/db/factory.go:35
↓ 10 callers
Method
makeFieldSelector
构造事件的 FieldSelector, 如果参数为空则忽略
pkg/controller/cluster/cluster.go:975
↓ 9 callers
Method
Runner
()
pkg/db/factory.go:37
↓ 9 callers
Method
Tenant
()
pkg/controller/tenant/tenant.go:32
↓ 9 callers
Function
WithNameLike
(name string)
pkg/db/options.go:85
↓ 8 callers
Method
Add
Add 可以存多个
pkg/client/token_cache.go:60
↓ 8 callers
Method
Datasource
()
pkg/controller/datasource/datasource.go:35
↓ 8 callers
Method
Repository
()
pkg/db/factory.go:33
↓ 7 callers
Function
AbortFailedWithCode
AbortFailedWithCode 设置错误,code 返回值并终止请求
api/server/httputils/httputils.go:108
↓ 7 callers
Method
Add
(key, value interface{})
pkg/util/lru/lru.go:50
↓ 7 callers
Method
Create
(ctx context.Context, object *model.Plan, opts ...CreatePlanOption)
pkg/db/plan.go:31
↓ 7 callers
Method
Delete
(ctx context.Context, pid int64)
pkg/db/plan.go:33
↓ 7 callers
Method
Distribution
()
pkg/db/factory.go:31
↓ 7 callers
Method
GetPlanId
()
pkg/controller/plan/worker.go:33
↓ 7 callers
Method
Release
(cluster, namespace string)
pkg/controller/helm/helm.go:36
↓ 7 callers
Method
Role
()
pkg/db/factory.go:26
↓ 7 callers
Method
SetDefaultPageOption
()
pkg/types/types.go:369
↓ 7 callers
Function
WithUser
(userId int64)
pkg/db/options.go:196
↓ 7 callers
Method
listObjects
(objects []metav1.Object, namespace string, listOption types.ListOptions)
pkg/controller/cluster/util.go:72
↓ 6 callers
Method
Agent
()
pkg/controller/agent/agent.go:32
↓ 6 callers
Method
Datasource
()
pkg/db/factory.go:36
↓ 6 callers
Method
GetConfigByPlan
(ctx context.Context, planId int64)
pkg/db/plan.go:61
↓ 6 callers
Method
Repository
()
pkg/controller/helm/repository.go:39
↓ 6 callers
Function
WithOrderByDesc
()
pkg/db/options.go:35
↓ 5 callers
Method
Agent
()
pkg/db/factory.go:34
↓ 5 callers
Method
Info
(ctx context.Context, msg string, data ...interface{})
pkg/db/logger.go:49
↓ 5 callers
Method
ListNodes
(ctx context.Context, pid int64)
pkg/controller/plan/plan.go:63
↓ 5 callers
Method
ListTasks
(ctx context.Context, planId int64)
pkg/controller/plan/plan.go:74
↓ 5 callers
Method
Name
Name returns the job name
pkg/jobmanager/manager.go:27
↓ 5 callers
Function
NewClusterSet
(cfg string)
pkg/client/client.go:53
↓ 5 callers
Function
NewContainer
(action string, planId int64, dir string)
pkg/util/container/container.go:43
↓ 5 callers
Method
Node
()
pkg/controller/node/node.go:33
↓ 5 callers
Method
String
()
pkg/db/model/audit.go:65
↓ 5 callers
Method
Tenant
()
pkg/db/factory.go:25
↓ 5 callers
Function
WithModifyOrderByDesc
()
pkg/db/options.go:53
↓ 5 callers
Method
Write
(p []byte)
pkg/types/meta.go:202
↓ 4 callers
Method
Audit
()
pkg/db/factory.go:32
↓ 4 callers
Method
Close
()
pkg/util/container/container.go:89
↓ 4 callers
Method
Do
Do is the job handler
pkg/jobmanager/manager.go:37
↓ 4 callers
Method
GetKubeObjectByLabel
GetKubeObjectByLabel TODO: 并发优化
pkg/controller/cluster/cluster.go:836
↓ 4 callers
Method
GetPods
()
pkg/types/meta.go:71
↓ 4 callers
Method
InternalUpdate
InternalUpdate 内部更新,不校验、不递增 resource_version
pkg/db/runner.go:39
↓ 4 callers
Function
IsEmptyS
(s string)
pkg/util/util.go:86
↓ 4 callers
Method
Len
()
pkg/util/lru/lru.go:83
↓ 4 callers
Function
NewClient
()
pkg/util/docker/client.go:21
↓ 4 callers
Method
SetMessageWithCode
(m interface{}, c int)
api/server/httputils/httputils.go:53
↓ 4 callers
Method
StartAndWaitForContainer
StartAndWaitForContainer 创建,启动容器,并等待容器退出
pkg/util/container/container.go:58
↓ 4 callers
Method
String
()
api/server/httputils/httputils.go:62
↓ 4 callers
Method
Unmarshal
(s string)
pkg/types/meta.go:325
↓ 4 callers
Method
Unmarshal
(s string)
pkg/types/meta.go:340
↓ 4 callers
Method
Upgrade
(ctx context.Context, form *types.Release)
pkg/controller/helm/releases.go:43
↓ 4 callers
Function
contextBind
(c *gin.Context)
api/server/httputils/httputils.go:214
↓ 4 callers
Method
updateStatus
更新 runner 状态
pkg/controller/runner/runner.go:229
↓ 4 callers
Method
withResponseCode
withResponseCode puts the response code into the HTTP context.
api/server/httputils/httputils.go:219
↓ 3 callers
Method
Audit
()
pkg/controller/audit/audit.go:33
↓ 3 callers
Method
Clean
Clean 移除不必要的配置,防止持久化的时候存储多余配置
pkg/types/meta.go:449
↓ 3 callers
Method
CreateNode
(ctx context.Context, pid int64, req *types.CreatePlanNodeRequest)
pkg/controller/plan/plan.go:59
↓ 3 callers
Method
DeletePermission
DeletePermission 1. 删除数据库记录 2. 移除 k8s 的资源 3. 删除已授权的集群记录
pkg/controller/cluster/permission.go:293
↓ 3 callers
Method
Get
(ctx context.Context, pid int64)
pkg/controller/plan/plan.go:285
next →
1–100 of 1,262, ranked by callers