MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / GetAppSKey

Method GetAppSKey

pkg/interop/client.go:529–539  ·  view source on GitHub ↗

GetAppSKey performs AppSKey request to Join Server associated with req.JoinEUI.

(
	ctx context.Context, asID string, req *ttnpb.SessionKeyRequest,
)

Source from the content-addressed store, hash-verified

527
528// GetAppSKey performs AppSKey request to Join Server associated with req.JoinEUI.
529func (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.
542func (cl Client) HandleJoinRequest(

Callers 1

TestGetAppSKeyFunction · 0.95

Calls 6

MustEUI64Function · 0.92
joinServerRaceFunction · 0.85
NewMethod · 0.65
GetAppSKeyMethod · 0.65
OrZeroMethod · 0.45

Tested by 1

TestGetAppSKeyFunction · 0.76