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

Function WithRegisterUnknown

pkg/basicstation/cups/server.go:101–111  ·  view source on GitHub ↗

WithRegisterUnknown configures the CUPS server to register gateways if they do not already exist in the registry. The gateways will be registered under the given owner.

(
	owner *ttnpb.OrganizationOrUserIdentifiers, auth func(context.Context) grpc.CallOption,
)

Source from the content-addressed store, hash-verified

99// do not already exist in the registry. The gateways will be registered under the
100// given owner.
101func WithRegisterUnknown(
102 owner *ttnpb.OrganizationOrUserIdentifiers, auth func(context.Context) grpc.CallOption,
103) Option {
104 return func(s *Server) {
105 if owner != nil {
106 s.registerUnknown, s.defaultOwner, s.defaultOwnerAuth = true, owner, auth
107 } else {
108 s.registerUnknown, s.defaultOwner, s.defaultOwnerAuth = false, nil, nil
109 }
110 }
111}
112
113// WithAllowCUPSURIUpdate configures the CUPS server to allow updates of the CUPS
114// Server URI.

Callers 2

NewServerFunction · 0.85
TestServerFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestServerFunction · 0.68