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

Method Subscribe

pkg/component/grpc_test.go:49–61  ·  view source on GitHub ↗
(id *ttnpb.ApplicationIdentifiers, stream ttnpb.AppAs_SubscribeServer)

Source from the content-addressed store, hash-verified

47}
48
49func (as *asImplementation) Subscribe(id *ttnpb.ApplicationIdentifiers, stream ttnpb.AppAs_SubscribeServer) error {
50 if err := clusterauth.Authorized(stream.Context()); err != nil {
51 return err
52 }
53 for {
54 select {
55 case <-stream.Context().Done():
56 return nil
57 case up := <-as.up:
58 stream.Send(up)
59 }
60 }
61}
62
63type gsImplementation struct {
64 ttnpb.UnimplementedGsServer

Callers

nothing calls this directly

Calls 3

DoneMethod · 0.80
ContextMethod · 0.65
SendMethod · 0.65

Tested by

no test coverage detected