( ctx context.Context, activation taskRoleActivation, )
| 317 | } |
| 318 | |
| 319 | func (r *taskRoleRuntime) activeRoleSession( |
| 320 | ctx context.Context, |
| 321 | activation taskRoleActivation, |
| 322 | ) (*session.Info, error) { |
| 323 | infos, err := r.sessions.ListAll(ctx) |
| 324 | if err != nil { |
| 325 | return nil, fmt.Errorf("daemon: list sessions for task role activation: %w", err) |
| 326 | } |
| 327 | for _, info := range infos { |
| 328 | if taskRoleSessionMatches(info, activation) { |
| 329 | return info, nil |
| 330 | } |
| 331 | } |
| 332 | return nil, nil |
| 333 | } |
| 334 | |
| 335 | func (r *taskRoleRuntime) startRoleSession( |
| 336 | ctx context.Context, |
no test coverage detected