GetAppSKey performs AppSKey request to Join Server associated with req.JoinEUI.
( ctx context.Context, asID string, req *ttnpb.SessionKeyRequest, )
| 527 | |
| 528 | // GetAppSKey performs AppSKey request to Join Server associated with req.JoinEUI. |
| 529 | func (cl Client) GetAppSKey( |
| 530 | ctx context.Context, asID string, req *ttnpb.SessionKeyRequest, |
| 531 | ) (*ttnpb.AppSKeyResponse, error) { |
| 532 | jss := cl.matchingJoinServerClients(types.MustEUI64(req.JoinEui).OrZero()) |
| 533 | if len(jss) == 0 { |
| 534 | return nil, errNotRegistered.New() |
| 535 | } |
| 536 | return joinServerRace(ctx, func(js joinServerClient) (*ttnpb.AppSKeyResponse, error) { |
| 537 | return js.GetAppSKey(ctx, asID, req) |
| 538 | }, jss) |
| 539 | } |
| 540 | |
| 541 | // HandleJoinRequest performs Join request to Join Server associated with req.JoinEUI. |
| 542 | func (cl Client) HandleJoinRequest( |