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

Method SetHeader

pkg/ratelimit/grpc_test.go:47–54  ·  view source on GitHub ↗
(md metadata.MD)

Source from the content-addressed store, hash-verified

45}
46
47func (ss *serverStream) SetHeader(md metadata.MD) error {
48 a := assertions.New(ss.t)
49 a.So(md.Get("x-rate-limit-limit"), should.NotBeEmpty)
50 a.So(md.Get("x-rate-limit-available"), should.NotBeEmpty)
51 a.So(md.Get("x-rate-limit-reset"), should.NotBeEmpty)
52 a.So(md.Get("x-rate-limit-retry"), should.NotBeEmpty)
53 return nil
54}
55
56func grpcClusterContext() context.Context {
57 return metadata.NewIncomingContext(test.Context(), metadata.Pairs(

Callers 15

SendMethod · 0.45
SendMethod · 0.45
listNetworksMethod · 0.45
setTotalHeaderFunction · 0.45
ListMethod · 0.45
ListMethod · 0.45
ListBrandsMethod · 0.45
ListModelsMethod · 0.45
UnaryServerInterceptorFunction · 0.45
StreamServerInterceptorFunction · 0.45

Calls 2

NewMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected