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

Method Get

service/monitor/iml.go:52–69  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

50}
51
52func (i *imlMonitorService) Get(ctx context.Context, id string) (*Monitor, error) {
53 info, err := i.store.First(ctx, map[string]interface{}{
54 "uuid": id,
55 })
56 if err != nil {
57 return nil, err
58 }
59 return &Monitor{
60 ID: info.UUID,
61 Cluster: info.Cluster,
62 Driver: info.Driver,
63 Config: info.Config,
64 Creator: info.Creator,
65 Updater: info.Updater,
66 CreateAt: info.CreateAt,
67 UpdateAt: info.UpdateAt,
68 }, nil
69}
70
71func (i *imlMonitorService) MapByCluster(ctx context.Context, partitionIds ...string) (map[string]*Monitor, error) {
72 if len(partitionIds) == 0 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected