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

Method getRegistry

pkg/basicstation/cups/server.go:73–82  ·  view source on GitHub ↗
(ctx context.Context, _ *ttnpb.GatewayIdentifiers)

Source from the content-addressed store, hash-verified

71}
72
73func (s *Server) getRegistry(ctx context.Context, _ *ttnpb.GatewayIdentifiers) (ttnpb.GatewayRegistryClient, error) {
74 if s.registry != nil {
75 return s.registry, nil
76 }
77 cc, err := s.component.GetPeerConn(ctx, ttnpb.ClusterRole_ENTITY_REGISTRY, nil)
78 if err != nil {
79 return nil, err
80 }
81 return ttnpb.NewGatewayRegistryClient(cc), nil
82}
83
84func (s *Server) getAccess(ctx context.Context, _ *ttnpb.GatewayIdentifiers) (ttnpb.GatewayAccessClient, error) {
85 if s.access != nil {

Callers 2

registerGatewayMethod · 0.95
updateInfoMethod · 0.95

Calls 2

NewGatewayRegistryClientFunction · 0.92
GetPeerConnMethod · 0.65

Tested by

no test coverage detected