Download this file
| 1 | package console |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | |
| 6 | "github.com/carlosframework/platform/internal/hostops" |
| 7 | "github.com/carlosframework/platform/internal/release" |
| 8 | ) |
| 9 | |
| 10 | func (s *Server) touchSidecarWake(ctx context.Context, account, app, name, by, reason string) error { |
| 11 | if !s.cfg.HostClaim { |
| 12 | return release.TouchSidecarWake(ctx, s.cfg.Releases, account, app, name, by, reason) |
| 13 | } |
| 14 | if s.cfg.ClaimAuthority == nil { |
| 15 | return hostops.ErrContract |
| 16 | } |
| 17 | acct, err := s.store.AccountBySqid(account) |
| 18 | if err != nil { |
| 19 | return err |
| 20 | } |
| 21 | appID, err := s.store.ClaimAppID(acct.ID, app) |
| 22 | if err != nil { |
| 23 | return err |
| 24 | } |
| 25 | return s.cfg.ClaimAuthority.TouchSidecarWake(ctx, account, app, name, appID, by, reason) |
| 26 | } |
| 27 | |