_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c30200 | train | // OnRegister registers a callback which is called when a Kite registers
// to a Kontrol. | {
"resource": ""
} | ||
c30201 | train | // RSAKey returns the corresponding public key for the issuer of the token.
// It is called by jwt-go package when validating the signature in the token. | {
"resource": ""
} | ||
c30202 | train | // Error implements the built-in error interface. | {
"resource": ""
} | ||
c30203 | train | // RunCleaner deletes every "interval" duration rows which are older than
// "expire" duration based on the "updated_at" field. For more info check
// CleanExpireRows which is used to delete old rows. | {
"resource": ""
} | ||
c30204 | train | // CleanExpiredRows deletes rows that are at least "expire" duration old. So if
// say an expire duration of 10 second is given, it will delete all rows that
// were updated 10 seconds ago | {
"resource": ""
} | ||
c30205 | train | // selectQuery returns a SQL query for the given query | {
"resource": ""
} | ||
c30206 | train | // inseryKiteQuery inserts the given kite, url and key to the kite.kite table | {
"resource": ""
} | ||
c30207 | train | // SetupSignalHandler listens to signals and toggles the log level to DEBUG
// mode when it received a SIGUSR2 signal. Another SIGUSR2 toggles the log
// level back to the old level. | {
"resource": ""
} | ||
c30208 | train | // DialXHR establishes a SockJS session over a XHR connection.
//
// Requires cfg.XHR to be a valid client. | {
"resource": ""
} | ||
c30209 | train | // ServeKite implements Hander interface. | {
"resource": ""
} | ||
c30210 | train | // handleLog prints a log message to stderr. | {
"resource": ""
} | ||
c30211 | train | // handlePrint prints a message to stdout. | {
"resource": ""
} | ||
c30212 | train | // handlePrompt asks user a single line input. | {
"resource": ""
} | ||
c30213 | train | // handleGetPass reads a line of input from a terminal without local echo. | {
"resource": ""
} | ||
c30214 | train | // handleNotifyDarwin displays a desktop notification on OS X. | {
"resource": ""
} | ||
c30215 | train | // handleTunnel opens two websockets, one to proxy kite and one to itself,
// then it copies the message between them. | {
"resource": ""
} | ||
c30216 | train | // parse the token string and set | {
"resource": ""
} | ||
c30217 | train | // The duration from now to the time token needs to be renewed.
// Needs to be calculated after renewing the token. | {
"resource": ""
} | ||
c30218 | train | // renewToken gets a new token from a kontrolClient, parses it and sets it as the token. | {
"resource": ""
} | ||
c30219 | train | // NewFromKiteKey parses the given kite key file and gives a new Config value. | {
"resource": ""
} | ||
c30220 | train | // ReadKiteKey parsed the user's kite key and returns a new Config. | {
"resource": ""
} | ||
c30221 | train | // ReadToken reads Kite Claims from JWT token and uses them to initialize Config. | {
"resource": ""
} | ||
c30222 | train | // Copy returns a new copy of the config object. | {
"resource": ""
} | ||
c30223 | train | // runMethod is called when a method is received from remote Kite. | {
"resource": ""
} | ||
c30224 | train | // runCallback is called when a callback method call is received from remote Kite. | {
"resource": ""
} | ||
c30225 | train | // authenticate tries to authenticate the user by selecting appropriate
// authenticator function. | {
"resource": ""
} | ||
c30226 | train | // AuthenticateFromToken is the default Authenticator for Kite. | {
"resource": ""
} | ||
c30227 | train | // AuthenticateFromKiteKey authenticates user from kite key. | {
"resource": ""
} | ||
c30228 | train | // publicIP returns an IP that is supposed to be Public. | {
"resource": ""
} | ||
c30229 | train | // extractTar reads from the io.Reader and writes the files into the directory. | {
"resource": ""
} | ||
c30230 | train | // validatePackage does some checks on kite bundle and returns the bundle path. | {
"resource": ""
} | ||
c30231 | train | // RemoveCallback removes the callback with id from callbacks.
// Can be used to remove unused callbacks to free memory. | {
"resource": ""
} | ||
c30232 | train | // addHandle is an internal method to add a handler | {
"resource": ""
} | ||
c30233 | train | // PreHandler adds a new kite handler which is executed before the method. | {
"resource": ""
} | ||
c30234 | train | // PostHandle adds a new kite handler which is executed after the method. | {
"resource": ""
} | ||
c30235 | train | // FinalFunc registers a function that is always called as a last one
// after pre-, handler and post- functions for the given method.
//
// It receives a result and an error from last handler that
// got executed prior to calling final func. | {
"resource": ""
} | ||
c30236 | train | // Handle registers the handler for the given method. The handler is called
// when a method call is received from a Kite. | {
"resource": ""
} | ||
c30237 | train | // PreHandle registers an handler which is executed before a kite.Handler
// method is executed. Calling PreHandle multiple times registers multiple
// handlers. A non-error return triggers the execution of the next handler. The
// execution order is FIFO. | {
"resource": ""
} | ||
c30238 | train | // PostHandle registers an handler which is executed after a kite.Handler
// method is executed. Calling PostHandler multiple times registers multiple
// handlers. A non-error return triggers the execution of the next handler. The
// execution order is FIFO. | {
"resource": ""
} | ||
c30239 | train | // FinalFunc registers a function that is always called as a last one
// after pre-, handler and post- functions.
//
// It receives a result and an error from last handler that
// got executed prior to calling final func. | {
"resource": ""
} | ||
c30240 | train | // Matches checks to see if other matches p.
//
// Path matching will probably not always be a direct
// comparison; this method assures that paths can be
// easily and consistently matched. | {
"resource": ""
} | ||
c30241 | train | // Write wraps the underlying Write method to do compression. | {
"resource": ""
} | ||
c30242 | train | // IsHidden checks if file with FileInfo d is on hide list. | {
"resource": ""
} | ||
c30243 | train | // Redirect sends an HTTP redirect to the client but will preserve
// the query string for the new path. Based on http.localRedirect
// from the Go standard library. | {
"resource": ""
} | ||
c30244 | train | // TapperFromContext will return a Tapper if the dnstap plugin is enabled. | {
"resource": ""
} | ||
c30245 | train | // TapBuilder implements Tapper. | {
"resource": ""
} | ||
c30246 | train | // Compare what we have in the cache with what we have in the pool | {
"resource": ""
} | ||
c30247 | train | // Reserves an IP in the pool, returns an error if the IP has already been reserved | {
"resource": ""
} | ||
c30248 | train | // Frees an IP in the pool, returns an error if the IP is already free | {
"resource": ""
} | ||
c30249 | train | // Returns a random free IP address, an error if the pool is full | {
"resource": ""
} | ||
c30250 | train | // Returns the amount of free IPs in the pool | {
"resource": ""
} | ||
c30251 | train | // Send an SSO stop to the WatchGuard firewall
// Returns an error unless there is a valid reply from the firewall | {
"resource": ""
} | ||
c30252 | train | // Build the RADIUS packet for an SSO stop | {
"resource": ""
} | ||
c30253 | train | // Setup the rate limiter with the configuration in the Caddyfile | {
"resource": ""
} | ||
c30254 | train | // Middleware that will rate limit the amount of concurrent requests the webserver can do at once
// Controlled via the sem channel which has a capacity defined by the limit that is in the Caddyfile | {
"resource": ""
} | ||
c30255 | train | // Grab a context that includes a UUID of the request for logging purposes | {
"resource": ""
} | ||
c30256 | train | // Copies data r1->w1 and r2->w2, flushes as needed, and returns when both streams are done. | {
"resource": ""
} | ||
c30257 | train | // Hijacks the connection from ResponseWriter, writes the response and proxies data between targetConn
// and hijacked connection. | {
"resource": ""
} | ||
c30258 | train | // Returns nil error on successful credentials check. | {
"resource": ""
} | ||
c30259 | train | // returns true if `s` is `domain` or subdomain of `domain`. Inputs are expected to be sanitized. | {
"resource": ""
} | ||
c30260 | train | // Removes hop-by-hop headers, and writes response into ResponseWriter. | {
"resource": ""
} | ||
c30261 | train | // Based on http Request from client, generates new request to be forwarded to target server.
// Some fields are shallow-copied, thus genOutReq will mutate original request.
// If error is not nil - http.StatusBadRequest is to be sent to client. | {
"resource": ""
} | ||
c30262 | train | // createUpstremRequest shallow-copies r into a new request
// that can be sent upstream.
//
// Derived from reverseproxy.go in the standard Go httputil package. | {
"resource": ""
} | ||
c30263 | train | // StartupHooks executes the startup hooks defined when the
// plugins were registered and returns the first error
// it encounters. | {
"resource": ""
} | ||
c30264 | train | // BreadcrumbMap returns l.Path where every element is a map
// of URLs and path segment names. | {
"resource": ""
} | ||
c30265 | train | // Add sorting method to "Listing"
// it will apply what's in ".Sort" and ".Order" | {
"resource": ""
} | ||
c30266 | train | // ServeHTTP determines if the request is for this plugin, and if all prerequisites are met.
// If so, control is handed over to ServeListing. | {
"resource": ""
} | ||
c30267 | train | // executeShutdownCallbacks executes the shutdown callbacks as initiated
// by signame. It logs any errors and returns the recommended exit status.
// This function is idempotent; subsequent invocations always return 0. | {
"resource": ""
} | ||
c30268 | train | // standardizeAddress parses an address string into a structured format with separate
// scheme, host, port, and path portions, as well as the original input string. | {
"resource": ""
} | ||
c30269 | train | // Close closes open log files or connections to syslog. | {
"resource": ""
} | ||
c30270 | train | // Transport returns the protocol of the string s | {
"resource": ""
} | ||
c30271 | train | // normalizeZone parses an zone string into a structured format with separate
// host, and port portions, as well as the original input string. | {
"resource": ""
} | ||
c30272 | train | // cloneTLSClientConfig is like cloneTLSConfig but omits
// the fields SessionTicketsDisabled and SessionTicketKey.
// This makes it safe to call cloneTLSClientConfig on a config
// in active use by a server. | {
"resource": ""
} | ||
c30273 | train | // matches matches re to filename, if is is a match, the subexpression will be used to expand
// template to an origin. When match is true that origin is returned. Origin is fully qualified. | {
"resource": ""
} | ||
c30274 | train | // Accept accepts a connection. | {
"resource": ""
} | ||
c30275 | train | // Close immediately closes the listener. | {
"resource": ""
} | ||
c30276 | train | // Close closes c's underlying connection while updating the wg count. | {
"resource": ""
} | ||
c30277 | train | // OnRestart adds fn to the list of callback functions to execute
// when the server is about to be restarted. | {
"resource": ""
} | ||
c30278 | train | // OnFinalShutdown adds fn to the list of callback functions to execute
// when the server is about to be shut down NOT as part of a restart. | {
"resource": ""
} | ||
c30279 | train | // Parse reads the hostsfile and populates the byName and byAddr maps. | {
"resource": ""
} | ||
c30280 | train | // LookupStaticAddr looks up the hosts for the given address from the hosts file. | {
"resource": ""
} | ||
c30281 | train | // Return key under which we store the item, -1 will be returned if we don't store the
// message.
// Currently we do not cache Truncated, errors zone transfers or dynamic update messages. | {
"resource": ""
} | ||
c30282 | train | // registerCallback registers a callback function to execute by
// using c to parse the directive. It registers the callback
// to be executed using registerFunc. | {
"resource": ""
} | ||
c30283 | train | // AddrMsg parses the info of net.Addr and dns.Msg. | {
"resource": ""
} | ||
c30284 | train | // Msg parses the info of dns.Msg. | {
"resource": ""
} | ||
c30285 | train | // HostPort decodes into Data any string returned by dnsutil.ParseHostPortOrFile. | {
"resource": ""
} | ||
c30286 | train | // RemoteAddr parses the information about the remote address into Data. | {
"resource": ""
} | ||
c30287 | train | // Pack encodes the DNS message into Data. | {
"resource": ""
} | ||
c30288 | train | // newUpstream returns an upstream initialized with hosts. | {
"resource": ""
} | ||
c30289 | train | // replaceEnvReferences performs the actual replacement of env variables
// in s, given the placeholder start and placeholder end strings. | {
"resource": ""
} | ||
c30290 | train | // redirPlaintextHost returns a new plaintext HTTP configuration for
// a virtualHost that simply redirects to cfg, which is assumed to
// be the HTTPS configuration. The returned configuration is set
// to listen on port 80. The TLS field of cfg must not be nil. | {
"resource": ""
} | ||
c30291 | train | // Report reports the metrics data associcated with request. | {
"resource": ""
} | ||
c30292 | train | // Setup the api-aaa middleware
// Also loads the pfconfig resources and registers them in the pool | {
"resource": ""
} | ||
c30293 | train | // Build the ApiAAAHandler which will initialize the cache and instantiate the router along with its routes | {
"resource": ""
} | ||
c30294 | train | // Handle an API login | {
"resource": ""
} | ||
c30295 | train | // Handle getting the token info | {
"resource": ""
} | ||
c30296 | train | // NewServergRPC returns a new CoreDNS GRPC server and compiles all plugin in to it. | {
"resource": ""
} | ||
c30297 | train | // Query is the main entry-point into the gRPC server. From here we call ServeDNS like
// any normal server. We use a custom responseWriter to pick up the bytes we need to write
// back to the client as a protobuf. | {
"resource": ""
} | ||
c30298 | train | // DefaultErrorFunc responds to an DNS request with an error. | {
"resource": ""
} | ||
c30299 | train | // Reload reloads a zone when it is changed on disk. If z.NoRoload is true, no reloading will be done. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.