_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c24500
train
// Create the response subscription we will use for all // new style responses. This will be on an _INBOX with an // additional terminal token. The subscription will be on // a wildcard. Caller is responsible for ensuring this is // only called once.
{ "resource": "" }
c24501
train
// Request will send a request payload and deliver the response message, // or an error, including a timeout if no message was received properly.
{ "resource": "" }
c24502
train
// NewInbox will return an inbox string which can be used for directed replies from // subscribers. These are guaranteed to be unique, but can be shared and subscribed // to by others.
{ "resource": "" }
c24503
train
// Function to init new response structures.
{ "resource": "" }
c24504
train
// newRespInbox creates a new literal response subject // that will trigger the mux subscription handler. // Lock should be held.
{ "resource": "" }
c24505
train
// NewRespInbox is the new format used for _INBOX.
{ "resource": "" }
c24506
train
// QueueSubscribe creates an asynchronous queue subscriber on the given subject. // All subscribers with the same queue name will form the queue group and // only one member of the group will be selected to receive any given // message asynchronously.
{ "resource": "" }
c24507
train
// subscribe is the internal subscribe function that indicates interest in a subject.
{ "resource": "" }
c24508
train
// NumSubscriptions returns active number of subscriptions.
{ "resource": "" }
c24509
train
// Lock for nc should be held here upon entry
{ "resource": "" }
c24510
train
// Type returns the type of Subscription.
{ "resource": "" }
c24511
train
// Drain will remove interest but continue callbacks until all messages // have been processed.
{ "resource": "" }
c24512
train
// Unsubscribe will remove interest in the given subject.
{ "resource": "" }
c24513
train
// checkDrained will watch for a subscription to be fully drained // and then remove it.
{ "resource": "" }
c24514
train
// AutoUnsubscribe will issue an automatic Unsubscribe that is // processed by the server when max messages have been received. // This can be useful when sending a request to an unknown number // of subscribers.
{ "resource": "" }
c24515
train
// NextMsg will return the next message available to a synchronous subscriber // or block until one is available. A timeout can be used to return when no // message has been delivered.
{ "resource": "" }
c24516
train
// validateNextMsgState checks whether the subscription is in a valid // state to call NextMsg and be delivered another message synchronously. // This should be called while holding the lock.
{ "resource": "" }
c24517
train
// processNextMsgDelivered takes a message and applies the needed // accounting to the stats from the subscription, returning an // error in case we have the maximum number of messages have been // delivered already. It should not be called while holding the lock.
{ "resource": "" }
c24518
train
// Pending returns the number of queued messages and queued bytes in the client for this subscription.
{ "resource": "" }
c24519
train
// PendingLimits returns the current limits for this subscription. // If no error is returned, a negative value indicates that the // given metric is not limited.
{ "resource": "" }
c24520
train
// The lock must be held entering this function.
{ "resource": "" }
c24521
train
// This will fire periodically and send a client origin // ping to the server. Will also check that we have received // responses from the server.
{ "resource": "" }
c24522
train
// resendSubscriptions will send our subscription state back to the // server. Used in reconnects
{ "resource": "" }
c24523
train
// This will clear any pending flush calls and release pending calls. // Lock is assumed to be held by the caller.
{ "resource": "" }
c24524
train
// This will clear any pending Request calls. // Lock is assumed to be held by the caller.
{ "resource": "" }
c24525
train
// Low level close call that will do correct cleanup and set // desired status. Also controls whether user defined callbacks // will be triggered. The lock should not be held entering this // function. This function will handle the locking manually.
{ "resource": "" }
c24526
train
// IsClosed tests if a Conn has been closed.
{ "resource": "" }
c24527
train
// IsReconnecting tests if a Conn is reconnecting.
{ "resource": "" }
c24528
train
// IsConnected tests if a Conn is connected.
{ "resource": "" }
c24529
train
// drainConnection will run in a separate Go routine and will // flush all publishes and drain all active subscriptions.
{ "resource": "" }
c24530
train
// IsDraining tests if a Conn is in the draining state.
{ "resource": "" }
c24531
train
// caller must lock
{ "resource": "" }
c24532
train
// Servers returns the list of known server urls, including additional // servers discovered after a connection has been established. If // authentication is enabled, use UserInfo or Token when connecting with // these urls.
{ "resource": "" }
c24533
train
// DiscoveredServers returns only the server urls that have been discovered // after a connection has been established. If authentication is enabled, // use UserInfo or Token when connecting with these urls.
{ "resource": "" }
c24534
train
// Status returns the current state of the connection.
{ "resource": "" }
c24535
train
// Test if Conn is in the draining state.
{ "resource": "" }
c24536
train
// Stats will return a race safe copy of the Statistics section for the connection.
{ "resource": "" }
c24537
train
// MaxPayload returns the size limit that a message payload can have. // This is set by the server configuration and delivered to the client // upon connect.
{ "resource": "" }
c24538
train
// AuthRequired will return if the connected server requires authorization.
{ "resource": "" }
c24539
train
// TLSRequired will return if the connected server requires TLS connections.
{ "resource": "" }
c24540
train
// GetClientID returns the client ID assigned by the server to which // the client is currently connected to. Note that the value may change if // the client reconnects. // This function returns ErrNoClientIDReturned if the server is of a // version prior to 1.2.0.
{ "resource": "" }
c24541
train
// NkeyOptionFromSeed will load an nkey pair from a seed file. // It will return the NKey Option and will handle // signing of nonce challenges from the server. It will take // care to not hold keys in memory and to wipe memory.
{ "resource": "" }
c24542
train
// Sign authentication challenges from the server. // Do not keep private seed in memory.
{ "resource": "" }
c24543
train
// CloneTLSConfig returns a copy of c.
{ "resource": "" }
c24544
train
// RequestWithContext takes a context, a subject and payload // in bytes and request expecting a single response.
{ "resource": "" }
c24545
train
// oldRequestWithContext utilizes inbox and subscription per request.
{ "resource": "" }
c24546
train
// NextMsgWithContext takes a context and returns the next message // available to a synchronous subscriber, blocking until it is delivered // or context gets canceled.
{ "resource": "" }
c24547
train
// RequestWithContext will create an Inbox and perform a Request // using the provided cancellation context with the Inbox reply // for the data v. A response will be decoded into the vPtrResponse.
{ "resource": "" }
c24548
train
// This allows the functionality for network channels by binding send and receive Go chans // to subjects and optionally queue groups. // Data will be encoded and decoded via the EncodedConn and its associated encoders. // BindSendChan binds a channel for send operations to NATS.
{ "resource": "" }
c24549
train
// Publish all values that arrive on the channel until it is closed or we // encounter an error.
{ "resource": "" }
c24550
train
// BindRecvChan binds a channel for receive operations from NATS.
{ "resource": "" }
c24551
train
// BindRecvQueueChan binds a channel for queue-based receive operations from NATS.
{ "resource": "" }
c24552
train
// Internal function to bind receive operations for a channel.
{ "resource": "" }
c24553
train
// lookup our current region and country..
{ "resource": "" }
c24554
train
// CSV generates a csv report of all the samples collected
{ "resource": "" }
c24555
train
// NewSample creates a new Sample initialized to the provided values. The nats.Conn information captured
{ "resource": "" }
c24556
train
// Throughput of bytes per second
{ "resource": "" }
c24557
train
// Rate of meessages in the job per second
{ "resource": "" }
c24558
train
// Duration that the sample was active
{ "resource": "" }
c24559
train
// MinRate returns the smallest message rate in the SampleGroup
{ "resource": "" }
c24560
train
// MaxRate returns the largest message rate in the SampleGroup
{ "resource": "" }
c24561
train
// AvgRate returns the average of all the message rates in the SampleGroup
{ "resource": "" }
c24562
train
// StdDev returns the standard deviation the message rates in the SampleGroup
{ "resource": "" }
c24563
train
// AddSample adds a Sample to the SampleGroup. After adding a Sample it shouldn't be modified.
{ "resource": "" }
c24564
train
// Report returns a human readable report of the samples taken in the Benchmark
{ "resource": "" }
c24565
train
// HumanBytes formats bytes as a human readable string
{ "resource": "" }
c24566
train
// MsgsPerClient divides the number of messages by the number of clients and tries to distribute them as evenly as possible
{ "resource": "" }
c24567
train
// Get returns a timer that completes after the given duration.
{ "resource": "" }
c24568
train
// NewBlacklistedImports reports when a blacklisted import is being used. // Typically when a deprecated technology is being used.
{ "resource": "" }
c24569
train
// NewBlacklistedImportRC4 fails if DES is imported
{ "resource": "" }
c24570
train
// NewHardcodedCredentials attempts to find high entropy string constants being // assigned to variables that appear to be related to credentials.
{ "resource": "" }
c24571
train
// NewBindsToAllNetworkInterfaces detects socket connections that are setup to // listen on all network interfaces.
{ "resource": "" }
c24572
train
// NewFilePerms creates a rule to detect file creation with a more permissive than configured // permission mask.
{ "resource": "" }
c24573
train
// NewWeakKeyStrength builds a rule that detects RSA keys < 2048 bits
{ "resource": "" }
c24574
train
// NewSubproc detects cases where we are forking out to an external process
{ "resource": "" }
c24575
train
// Match inspects AST nodes to determine if the filepath.Joins uses any argument derived from type zip.File
{ "resource": "" }
c24576
train
// NewArchive creates a new rule which detects the file traversal when extracting zip archives
{ "resource": "" }
c24577
train
// AddAll will add several calls to the call list at once
{ "resource": "" }
c24578
train
// Add a selector and call to the call list
{ "resource": "" }
c24579
train
// MatchCompLit will match an ast.CompositeLit based on the supplied type
{ "resource": "" }
c24580
train
// GetInt will read and return an integer value from an ast.BasicLit
{ "resource": "" }
c24581
train
// GetFloat will read and return a float value from an ast.BasicLit
{ "resource": "" }
c24582
train
// GetChar will read and return a char value from an ast.BasicLit
{ "resource": "" }
c24583
train
// GetString will read and return a string value from an ast.BasicLit
{ "resource": "" }
c24584
train
// GetCallObject returns the object and call expression and associated // object for a given AST node. nil, nil will be returned if the // object cannot be resolved.
{ "resource": "" }
c24585
train
// GetCallInfo returns the package or type and name associated with a // call expression.
{ "resource": "" }
c24586
train
// GetCallStringArgsValues returns the values of strings arguments if they can be resolved
{ "resource": "" }
c24587
train
// GetIdentStringValues return the string values of an Ident if they can be resolved
{ "resource": "" }
c24588
train
// GetImportedName returns the name used for the package within the // code. It will resolve aliases and ignores initialization only imports.
{ "resource": "" }
c24589
train
// GetImportPath resolves the full import path of an identifier based on // the imports in the current context.
{ "resource": "" }
c24590
train
// GetLocation returns the filename and line number of an ast.Node
{ "resource": "" }
c24591
train
// Gopath returns all GOPATHs
{ "resource": "" }
c24592
train
// Getenv returns the values of the environment variable, otherwise //returns the default if variable is not set
{ "resource": "" }
c24593
train
// GetPkgRelativePath returns the Go relative relative path derived // form the given path
{ "resource": "" }
c24594
train
// GetPkgAbsPath returns the Go package absolute path derived from // the given path
{ "resource": "" }
c24595
train
// ConcatString recursively concatenates strings from a binary expression
{ "resource": "" }
c24596
train
// FindVarIdentities returns array of all variable identities in a given binary expression
{ "resource": "" }
c24597
train
// PackagePaths returns a slice with all packages path at given root directory
{ "resource": "" }
c24598
train
// NewModernTLSCheck creates a check for Modern TLS ciphers // DO NOT EDIT - generated by tlsconfig tool
{ "resource": "" }
c24599
train
// Register adds a trigger for the supplied rule for the the // specified ast nodes.
{ "resource": "" }