_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c164200 | train | // Helper that sends an A- to this remote gateway if not already done.
// This function should not be invoked directly but instead be invoked
// by functions holding the gateway.pasi's Lock. | {
"resource": ""
} | ||
c164201 | train | // small helper to get the account name from the INFO command. | {
"resource": ""
} | ||
c164202 | train | // NewStdLogger creates a logger with output directed to Stderr | {
"resource": ""
} | ||
c164203 | train | // NewFileLogger creates a logger with output directed to a file | {
"resource": ""
} | ||
c164204 | train | // Close implements the io.Closer interface to clean up
// resources in the server's logger implementation.
// Caller must ensure threadsafety. | {
"resource": ""
} | ||
c164205 | train | // Warnf logs a notice statement | {
"resource": ""
} | ||
c164206 | train | // This will add a timer to watch over remote reply subjects in case
// they fail to receive a response. The duration will be taken from the
// accounts map timeout to match.
// Lock should be held upon entering. | {
"resource": ""
} | ||
c164207 | train | // removeReplySub is called when we trip the max on remoteReply subs. | {
"resource": ""
} | ||
c164208 | train | // removeReplySubTimeout will remove a timer if it exists.
// Lock should be held upon entering. | {
"resource": ""
} | ||
c164209 | train | // processInboundRouteMsg is called to process an inbound msg from a route. | {
"resource": ""
} | ||
c164210 | train | // Helper function for routes and gateways to create qfilters need for
// converted subs from imports, etc. | {
"resource": ""
} | ||
c164211 | train | // Process the info message if we are a route. | {
"resource": ""
} | ||
c164212 | train | // Possibly sends local subscriptions interest to this route
// based on changes in the remote's Export permissions.
// Lock assumed held on entry | {
"resource": ""
} | ||
c164213 | train | // sendAsyncInfoToClients sends an INFO protocol to all
// connected clients that accept async INFO updates.
// The server lock is held on entry. | {
"resource": ""
} | ||
c164214 | train | // This will process implicit route information received from another server.
// We will check to see if we have configured or are already connected,
// and if so we will ignore. Otherwise we will attempt to connect. | {
"resource": ""
} | ||
c164215 | train | // forwardNewRouteInfoToKnownServers sends the INFO protocol of the new route
// to all routes known by this server. In turn, each server will contact this
// new route. | {
"resource": ""
} | ||
c164216 | train | // Initialize or reset cluster's permissions.
// This is for ROUTER connections only.
// Client lock is held on entry | {
"resource": ""
} | ||
c164217 | train | // removeRemoteSubs will walk the subs and remove them from the appropriate account. | {
"resource": ""
} | ||
c164218 | train | // sendSubsToRoute will send over our subject interest to
// the remote side. For each account we will send the
// complete interest for all subjects, both normal as a binary
// and queue group weights. | {
"resource": ""
} | ||
c164219 | train | // Sends SUBs protocols for the given subscriptions. If a filter is specified, it is
// invoked for each subscription. If the filter returns false, the subscription is skipped.
// This function may release the route's lock due to flushing of outbound data. A boolean
// is returned to indicate if the connection has been... | {
"resource": ""
} | ||
c164220 | train | // Sends UNSUBs protocols for the given subscriptions. If a filter is specified, it is
// invoked for each subscription. If the filter returns false, the subscription is skipped.
// This function may release the route's lock due to flushing of outbound data. A boolean
// is returned to indicate if the connection has be... | {
"resource": ""
} | ||
c164221 | train | // updateRouteSubscriptionMap will make sure to update the route map for the subscription. Will
// also forward to all routes if needed. | {
"resource": ""
} | ||
c164222 | train | // broadcastUnSubscribe will forward a client unsubscribe
// action to all active routes. | {
"resource": ""
} | ||
c164223 | train | // Similar to setInfoHostPortAndGenerateJSON, but for routeInfo. | {
"resource": ""
} | ||
c164224 | train | // Checks to make sure the route is still valid. | {
"resource": ""
} | ||
c164225 | train | // NewSysLogger creates a log using the windows event logger | {
"resource": ""
} | ||
c164226 | train | // NewRemoteSysLogger creates a remote event logger | {
"resource": ""
} | ||
c164227 | train | // Create a new ring buffer with at most max items. | {
"resource": ""
} | ||
c164228 | train | // Adds in a new closed connection. If there is no more room,
// remove the oldest. | {
"resource": ""
} | ||
c164229 | train | // This will return a sorted copy of the list which recipient can
// modify. If the contents of the client itself need to be modified,
// meaning swapping in any optional items, a copy should be made. We
// could introduce a new lock and hold that but since we return this
// list inside monitor which allows programatic... | {
"resource": ""
} | ||
c164230 | train | // Run starts the NATS server as a Windows service. | {
"resource": ""
} | ||
c164231 | train | // Used to create shallow copies of accounts for transfer
// from opts to real accounts in server struct. | {
"resource": ""
} | ||
c164232 | train | // NumClients returns active number of clients for this account for
// all known servers. | {
"resource": ""
} | ||
c164233 | train | // NumLocalClients returns active number of clients for this account
// on this server. | {
"resource": ""
} | ||
c164234 | train | // Do not account for the system accounts. | {
"resource": ""
} | ||
c164235 | train | // MaxTotalConnectionsReached returns if we have reached our limit for number of connections. | {
"resource": ""
} | ||
c164236 | train | // MaxActiveConnections return the set limit for the account system
// wide for total number of active connections. | {
"resource": ""
} | ||
c164237 | train | // NumLeafNodes returns the active number of local and remote
// leaf node connections. | {
"resource": ""
} | ||
c164238 | train | // NumRemoteLeafNodes returns the active number of remote
// leaf node connections. | {
"resource": ""
} | ||
c164239 | train | // RoutedSubs returns how many subjects we would send across a route when first
// connected or expressing interest. Local client subs. | {
"resource": ""
} | ||
c164240 | train | // TotalSubs returns total number of Subscriptions for this account. | {
"resource": ""
} | ||
c164241 | train | // addClient keeps our accounting of local active clients or leafnodes updated.
// Returns previous total. | {
"resource": ""
} | ||
c164242 | train | // numServiceRoutes returns the number of service routes on this account. | {
"resource": ""
} | ||
c164243 | train | // removeServiceImport will remove the route by subject. | {
"resource": ""
} | ||
c164244 | train | // MaxAutoExpireResponseMaps return the maximum number of
// auto expire response maps we will allow. | {
"resource": ""
} | ||
c164245 | train | // SetMaxAutoExpireResponseMaps sets the max outstanding auto expire response maps. | {
"resource": ""
} | ||
c164246 | train | // AutoExpireTTL returns the ttl for response maps. | {
"resource": ""
} | ||
c164247 | train | // SetAutoExpireTTL sets the ttl for response maps. | {
"resource": ""
} | ||
c164248 | train | // Return a list of the current autoExpireResponseMaps. | {
"resource": ""
} | ||
c164249 | train | // Add a route to connect from an implicit route created for a response to a request.
// This does no checks and should be only called by the msg processing code. Use
// addServiceImport from above if responding to user input or config changes, etc. | {
"resource": ""
} | ||
c164250 | train | // This will prune the list to below the threshold and remove all ttl'd maps. | {
"resource": ""
} | ||
c164251 | train | // AddStreamImportWithClaim will add in the stream import from a specific account with optional token. | {
"resource": ""
} | ||
c164252 | train | // AddStreamImport will add in the stream import from a specific account. | {
"resource": ""
} | ||
c164253 | train | // AddStreamExport will add an export to the account. If accounts is nil
// it will signify a public export, meaning anyone can impoort. | {
"resource": ""
} | ||
c164254 | train | // Check if another account is authorized to import from us. | {
"resource": ""
} | ||
c164255 | train | // Will fetch the activation token for an import. | {
"resource": ""
} | ||
c164256 | train | // These are import stream specific versions for when an activation expires. | {
"resource": ""
} | ||
c164257 | train | // These are import service specific versions for when an activation expires. | {
"resource": ""
} | ||
c164258 | train | // Fires for expired activation tokens. We could track this with timers etc.
// Instead we just re-analyze where we are and if we need to act. | {
"resource": ""
} | ||
c164259 | train | // checkActivation will check the activation token for validity. | {
"resource": ""
} | ||
c164260 | train | // Returns true if the activation claim is trusted. That is the issuer matches
// the account or is an entry in the signing keys. | {
"resource": ""
} | ||
c164261 | train | // Returns true if `a` and `b` stream imports are the same. Note that the
// check is done with the account's name, not the pointer. This is used
// during config reload where we are comparing current and new config
// in which pointers are different.
// No lock is acquired in this function, so it is assumed that the
/... | {
"resource": ""
} | ||
c164262 | train | // Check if another account is authorized to route requests to this service. | {
"resource": ""
} | ||
c164263 | train | // IsExpired returns expiration status. | {
"resource": ""
} | ||
c164264 | train | // Called when an account has expired. | {
"resource": ""
} | ||
c164265 | train | // Sets the expiration timer for an account JWT that has it set. | {
"resource": ""
} | ||
c164266 | train | // Check expiration and set the proper state as needed. | {
"resource": ""
} | ||
c164267 | train | // hasIssuer returns true if the issuer matches the account
// issuer or it is a signing key for the account. | {
"resource": ""
} | ||
c164268 | train | // SetAccountResolver will assign the account resolver. | {
"resource": ""
} | ||
c164269 | train | // AccountResolver returns the registered account resolver. | {
"resource": ""
} | ||
c164270 | train | // UpdateAccountClaims will call updateAccountClaims. | {
"resource": ""
} | ||
c164271 | train | // Helper to build an internal account structure from a jwt.AccountClaims. | {
"resource": ""
} | ||
c164272 | train | // Helper to build internal NKeyUser. | {
"resource": ""
} | ||
c164273 | train | // Fetch will fetch the account jwt claims from the internal sync.Map. | {
"resource": ""
} | ||
c164274 | train | // Store will store the account jwt claims in the internal sync.Map. | {
"resource": ""
} | ||
c164275 | train | // NewURLAccResolver returns a new resolver for the given base URL. | {
"resource": ""
} | ||
c164276 | train | // Fetch will fetch the account jwt claims from the base url, appending the
// account name onto the end. | {
"resource": ""
} | ||
c164277 | train | // ParseFile is a helper to open file, etc. and parse the contents. | {
"resource": ""
} | ||
c164278 | train | // ParseFileWithChecks is equivalent to ParseFile but runs in pedantic mode. | {
"resource": ""
} | ||
c164279 | train | // lookupVariable will lookup a variable reference. It will use block scoping on keys
// it has seen before, with the top level scoping being the environment variables. We
// ignore array contexts and only process the map contexts..
//
// Returns true for ok if it finds something, similar to map. | {
"resource": ""
} | ||
c164280 | train | // Adds a new sub to an existing result. | {
"resource": ""
} | ||
c164281 | train | // addToCache will add the new entry to the existing cache
// entries if needed. Assumes write lock is held. | {
"resource": ""
} | ||
c164282 | train | // removeFromCache will remove the sub from any active cache entries.
// Assumes write lock is held. | {
"resource": ""
} | ||
c164283 | train | // Match will match all entries to the literal subject.
// It will return a set of results for both normal and queue subscribers. | {
"resource": ""
} | ||
c164284 | train | // Helper function for auto-expanding remote qsubs. | {
"resource": ""
} | ||
c164285 | train | // UpdateRemoteQSub should be called when we update the weight of an existing
// remote queue sub. | {
"resource": ""
} | ||
c164286 | train | // This will add in a node's results to the total results. | {
"resource": ""
} | ||
c164287 | train | // We do not use a map here since we want iteration to be past when
// processing publishes in L1 on client. So we need to walk sequentially
// for now. Keep an eye on this in case we start getting large number of
// different queue subscribers for the same subject. | {
"resource": ""
} | ||
c164288 | train | // Raw low level remove, can do batches with lock held outside. | {
"resource": ""
} | ||
c164289 | train | // Remove will remove a subscription. | {
"resource": ""
} | ||
c164290 | train | // RemoveBatch will remove a list of subscriptions. | {
"resource": ""
} | ||
c164291 | train | // RemoveAllForClient will remove all subscriptions for a given client. | {
"resource": ""
} | ||
c164292 | train | // pruneNode is used to prune an empty node from the tree. | {
"resource": ""
} | ||
c164293 | train | // Return the number of nodes for the given level. | {
"resource": ""
} | ||
c164294 | train | // Count returns the number of subscriptions. | {
"resource": ""
} | ||
c164295 | train | // Stats will return a stats structure for the current state. | {
"resource": ""
} | ||
c164296 | train | // visitLevel is used to descend the Sublist tree structure
// recursively. | {
"resource": ""
} | ||
c164297 | train | // Determine if the subject has any wildcards. Fast version, does not check for
// valid subject. Used in caching layer. | {
"resource": ""
} | ||
c164298 | train | // IsValidSubject returns true if a subject is valid, false otherwise | {
"resource": ""
} | ||
c164299 | train | // Return all local client subscriptions. Use the supplied slice. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.