MCPcopy
hub / github.com/fagongzi/manba / updateCluster

Function updateCluster

examples/cluster.go:33–52  ·  view source on GitHub ↗
(id uint64)

Source from the content-addressed store, hash-verified

31}
32
33func updateCluster(id uint64) error {
34 c, err := getClient()
35 if err != nil {
36 return err
37 }
38
39 cluster, err := c.GetCluster(id)
40 if err != nil {
41 return err
42 }
43
44 // 修改名称
45 _, err = c.NewClusterBuilder().Use(*cluster).Name("cluster-1").Commit()
46 if err != nil {
47 return err
48 }
49
50 fmt.Printf("cluster %d name is updated", id)
51 return nil
52}

Callers

nothing calls this directly

Calls 6

getClientFunction · 0.85
GetClusterMethod · 0.65
NameMethod · 0.65
NewClusterBuilderMethod · 0.65
CommitMethod · 0.45
UseMethod · 0.45

Tested by

no test coverage detected