MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / GetByCluster

Method GetByCluster

service/monitor/iml.go:33–50  ·  view source on GitHub ↗
(ctx context.Context, partitionId string)

Source from the content-addressed store, hash-verified

31}
32
33func (i *imlMonitorService) GetByCluster(ctx context.Context, partitionId string) (*Monitor, error) {
34 info, err := i.store.First(ctx, map[string]interface{}{
35 "cluster": partitionId,
36 })
37 if err != nil {
38 return nil, err
39 }
40 return &Monitor{
41 ID: info.UUID,
42 Cluster: info.Cluster,
43 Driver: info.Driver,
44 Config: info.Config,
45 Creator: info.Creator,
46 Updater: info.Updater,
47 CreateAt: info.CreateAt,
48 UpdateAt: info.UpdateAt,
49 }, nil
50}
51
52func (i *imlMonitorService) Get(ctx context.Context, id string) (*Monitor, error) {
53 info, err := i.store.First(ctx, map[string]interface{}{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected