MCPcopy Create free account
hub / github.com/akash-network/node / GetGroup

Method GetGroup

x/deployment/keeper/keeper.go:168–177  ·  view source on GitHub ↗

GetGroup returns group details with given GroupID from deployment store

(ctx sdk.Context, id v1.GroupID)

Source from the content-addressed store, hash-verified

166
167// GetGroup returns group details with given GroupID from deployment store
168func (k Keeper) GetGroup(ctx sdk.Context, id v1.GroupID) (types.Group, bool) {
169 group, err := k.groups.Get(ctx, keys.GroupIDToKey(id))
170 if err != nil {
171 if !errors.Is(err, collections.ErrNotFound) {
172 ctx.Logger().Error("unexpected error getting group", "id", id, "err", err)
173 }
174 return types.Group{}, false
175 }
176 return group, true
177}
178
179// GetGroups returns all groups of a deployment with given DeploymentID from deployment store
180func (k Keeper) GetGroups(ctx sdk.Context, id v1.DeploymentID) (types.Groups, error) {

Callers 2

OnBidClosedMethod · 0.95
OnLeaseClosedMethod · 0.95

Calls 4

GroupIDToKeyFunction · 0.92
GetMethod · 0.65
ErrorMethod · 0.65
LoggerMethod · 0.45

Tested by

no test coverage detected