_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c30100 | train | // HasDir returns true if the directory exists in the box | {
"resource": ""
} | ||
c30101 | train | // Resolve will attempt to find the file in the box,
// returning an error if the find can not be found. | {
"resource": ""
} | ||
c30102 | train | // NewFromRoots scans the file roots provided and returns a
// new Parser containing the prospects | {
"resource": ""
} | ||
c30103 | train | // NewFile returns a virtual File implementation | {
"resource": ""
} | ||
c30104 | train | // RegisterHTTPForever is just like RegisterHTTP however it first tries to
// register forever until a response from kontrol is received. It's useful to
// use it during app initializations. After the registration a reconnect is
// automatically handled inside the RegisterHTTP method. | {
"resource": ""
} | ||
c30105 | train | // handleHeartbeat pings the callback with the given interval seconds. | {
"resource": ""
} | ||
c30106 | train | // Call the received function. | {
"resource": ""
} | ||
c30107 | train | // parseCallbacks parses the message's "callbacks" field and prepares
// callback functions in "arguments" field. | {
"resource": ""
} | ||
c30108 | train | // Flatten converts the recursive etcd directory structure to a flat one that
// contains all kontrolNodes | {
"resource": ""
} | ||
c30109 | train | // Kite returns a single kite gathered from the key and the value for the
// current node. | {
"resource": ""
} | ||
c30110 | train | // Value returns the value associated with the current node. | {
"resource": ""
} | ||
c30111 | train | // Kites returns a list of kites that are gathered by collecting recursively
// all nodes under the current node. | {
"resource": ""
} | ||
c30112 | train | // createError creates a new kite.Error for the given r variable | {
"resource": ""
} | ||
c30113 | train | // isWebsocket checks wether the incoming request is a part of websocket
// handshake | {
"resource": ""
} | ||
c30114 | train | // ListenAndServe listens on the TCP network address addr and then calls Serve
// with handler to handle requests on incoming connections. | {
"resource": ""
} | ||
c30115 | train | // diskStats returns information about the amount of space that is available on
// a current disk volume for the user who calls this function. | {
"resource": ""
} | ||
c30116 | train | // memoryStatus retrieves information about the system's current usage of
// physical memory. | {
"resource": ""
} | ||
c30117 | train | // ParsePayload parses the payload if it is not parsed previously. This method
// can be called concurrently. | {
"resource": ""
} | ||
c30118 | train | // getLogLevel returns the logging level defined via the KITE_LOG_LEVEL
// environment. It returns Info by default if no environment variable
// is set. | {
"resource": ""
} | ||
c30119 | train | // convertLevel converts a kite level into logging level | {
"resource": ""
} | ||
c30120 | train | // fields walks over a structure and scrubs its fields. | {
"resource": ""
} | ||
c30121 | train | // methods walks over a structure and scrubs its exported methods. | {
"resource": ""
} | ||
c30122 | train | // SetupKontrolClient setups and prepares a the kontrol instance. It connects
// to kontrol and reconnects again if there is any disconnections. This method
// is called internally whenever a kontrol client specific action is taking.
// However if you wish to connect earlier you may call this method. | {
"resource": ""
} | ||
c30123 | train | // GetToken is used to get a token for a single Kite.
//
// In case of calling GetToken multiple times, it usually
// returns the same token until it expires on Kontrol side. | {
"resource": ""
} | ||
c30124 | train | // GetTokenForce is used to obtain a new token for the given kite.
//
// It always returns a new token and forces a Kontrol to
// forget about any previous ones. | {
"resource": ""
} | ||
c30125 | train | // GetKey is used to get a new public key from kontrol if the current one is
// invalidated. The key is also replaced in memory and every request is going
// to use it. This means even if kite.key contains the old key, the kite itself
// uses the new one. | {
"resource": ""
} | ||
c30126 | train | // NewKeyRenewer renews the internal key every given interval | {
"resource": ""
} | ||
c30127 | train | // signalReady is an internal method to notify that a successful registration
// is done. | {
"resource": ""
} | ||
c30128 | train | // RegisterToTunnel finds a tunnel proxy kite by asking kontrol then registers
// itself on proxy. On error, retries forever. On every successful
// registration, it sends the proxied URL to the registerChan channel. There is
// no register URL needed because the Tunnel Proxy automatically gets the IP
// from tunneling... | {
"resource": ""
} | ||
c30129 | train | // RegisterToProxy is just like RegisterForever but registers the given URL
// to kontrol over a kite-proxy. A Kiteproxy is a reverseproxy that can be used
// for SSL termination or handling hundreds of kites behind a single. This is a
// blocking function. | {
"resource": ""
} | ||
c30130 | train | // registerToProxyKite dials the proxy kite and calls register method then
// returns the reverse-proxy URL. | {
"resource": ""
} | ||
c30131 | train | // TellKontrolWithTimeout is a lower level function for communicating directly with
// kontrol. Like GetKites and GetToken, this automatically sets up and connects to
// kontrol as needed. | {
"resource": ""
} | ||
c30132 | train | // Get returns a lock that is bound to a specific id. | {
"resource": ""
} | ||
c30133 | train | // BinPath returns the path of the executable binary file. | {
"resource": ""
} | ||
c30134 | train | // Error implements the buildin error interface. | {
"resource": ""
} | ||
c30135 | train | // IsSessionClosed tests whether given error is caused
// by a closed session. | {
"resource": ""
} | ||
c30136 | train | // DialWebsocket establishes a SockJS session over a websocket connection.
//
// Requires cfg.Websocket to be a valid client. | {
"resource": ""
} | ||
c30137 | train | // Recv reads one text frame from session. | {
"resource": ""
} | ||
c30138 | train | // Send sends one text frame to session | {
"resource": ""
} | ||
c30139 | train | // Close closes the session with provided code and reason. | {
"resource": ""
} | ||
c30140 | train | // isInstalled returns true if the kite is installed. | {
"resource": ""
} | ||
c30141 | train | // NewCachedStorage creates a new CachedStorage | {
"resource": ""
} | ||
c30142 | train | // Attach attaches the given token to each kite. It replaces any previous
// token. | {
"resource": ""
} | ||
c30143 | train | // Shuffle shuffles the order of the kites. This is useful if you want send
// back a randomized list of kites. | {
"resource": ""
} | ||
c30144 | train | // Filter filters out kites with the given constraints | {
"resource": ""
} | ||
c30145 | train | // Dial connects to the remote Kite. If it can't connect, it retries
// indefinitely. It returns a channel to check if it's connected or not. | {
"resource": ""
} | ||
c30146 | train | // run consumes incoming dnode messages. Reconnects if necessary. | {
"resource": ""
} | ||
c30147 | train | // readLoop reads a message from websocket and processes it. | {
"resource": ""
} | ||
c30148 | train | // receiveData reads a message from session. | {
"resource": ""
} | ||
c30149 | train | // processMessage processes a single message and calls a handler or callback. | {
"resource": ""
} | ||
c30150 | train | // sendhub sends the msg received from the send channel to the remote client | {
"resource": ""
} | ||
c30151 | train | // OnConnect adds a callback which is called when client connects
// to a remote kite. | {
"resource": ""
} | ||
c30152 | train | // OnDisconnect adds a callback which is called when client disconnects
// from a remote kite. | {
"resource": ""
} | ||
c30153 | train | // OnTokenExpire adds a callback which is called when client receives
// token-is-expired error from a remote kite. | {
"resource": ""
} | ||
c30154 | train | // OnTokenRenew adds a callback which is called when client successfully
// renews its token. | {
"resource": ""
} | ||
c30155 | train | // callOnConnectHandlers runs the registered connect handlers. | {
"resource": ""
} | ||
c30156 | train | // callOnDisconnectHandlers runs the registered disconnect handlers. | {
"resource": ""
} | ||
c30157 | train | // callOnTokenExpireHandlers calls registered functions when an error
// from remote kite is received that token used is expired. | {
"resource": ""
} | ||
c30158 | train | // callOnTokenRenewHandlers calls all registered functions when
// we successfully obtain new token from kontrol. | {
"resource": ""
} | ||
c30159 | train | // Tell makes a blocking method call to the server.
// Waits until the callback function is called by the other side and
// returns the result and the error. | {
"resource": ""
} | ||
c30160 | train | // Go makes an unblocking method call to the server.
// It returns a channel that the caller can wait on it to get the response. | {
"resource": ""
} | ||
c30161 | train | // sendMethod wraps the arguments, adds a response callback,
// marshals the message and send it over the wire. | {
"resource": ""
} | ||
c30162 | train | // marshalAndSend takes a method and arguments, scrubs the arguments to create
// a dnode message, marshals the message to JSON and sends it over the wire. | {
"resource": ""
} | ||
c30163 | train | // sendCallbackID send the callback number to be deleted after response is received. | {
"resource": ""
} | ||
c30164 | train | // onError is called when an error happened in a method handler. | {
"resource": ""
} | ||
c30165 | train | // Run is a blocking method. It runs the kite server and then accepts requests
// asynchronously. It supports graceful restart via SIGUSR2. | {
"resource": ""
} | ||
c30166 | train | // Close stops the server and the kontrol client instance. | {
"resource": ""
} | ||
c30167 | train | // listenAndServe listens on the TCP network address k.URL.Host and then
// calls Serve to handle requests on incoming connectionk. | {
"resource": ""
} | ||
c30168 | train | // Do calls the function f if and only if Do hits the given periodic interval.
// In other words Do can be called multiple times during the interval but it
// gets called only once if it hits the interval tick. So if the interval is
// 10 seconds, and a total of 100 calls are made during this period, f will
// be calle... | {
"resource": ""
} | ||
c30169 | train | // generic Sysctl buffer unmarshalling | {
"resource": ""
} | ||
c30170 | train | // KiteHome returns the home path of Kite directory.
// The returned value can be overridden by setting KITE_HOME environment variable. | {
"resource": ""
} | ||
c30171 | train | // Read the contents of the kite.key file. | {
"resource": ""
} | ||
c30172 | train | // Write over the kite.key file. | {
"resource": ""
} | ||
c30173 | train | // Parse the kite.key file and return it as JWT token. | {
"resource": ""
} | ||
c30174 | train | // ParseFile reads the given kite key file and parses it as a JWT token. | {
"resource": ""
} | ||
c30175 | train | // Extract is a keyFunc argument for jwt.Parse function. | {
"resource": ""
} | ||
c30176 | train | // registerSelf adds Kontrol itself to the storage as a kite. | {
"resource": ""
} | ||
c30177 | train | // KeyPair looks up a key pair that was used to sign Kontrol's kite key.
//
// The value is cached on first call of the function. | {
"resource": ""
} | ||
c30178 | train | // cacheToken cached the signed token under the given key.
//
// It also ensures the token is invalidated after its expiration time.
//
// If the token was already exists in the cache, it will be
// overwritten with a new value. | {
"resource": ""
} | ||
c30179 | train | // UnmarshalJSON puts the data into Partial.Raw. | {
"resource": ""
} | ||
c30180 | train | // SliceOfLength is a helper method to unmarshal a JSON Array with specified length. | {
"resource": ""
} | ||
c30181 | train | // Map is a helper method to unmarshal to a JSON Object. | {
"resource": ""
} | ||
c30182 | train | // String is a helper to unmarshal a JSON String. | {
"resource": ""
} | ||
c30183 | train | // Float64 is a helper to unmarshal a JSON Number. | {
"resource": ""
} | ||
c30184 | train | // Bool is a helper to unmarshal a JSON Boolean. | {
"resource": ""
} | ||
c30185 | train | // Function is a helper to unmarshal a callback function. | {
"resource": ""
} | ||
c30186 | train | // validateKiteKey returns a string representing the kite uniquely
// that is suitable to use as a key for etcd. | {
"resource": ""
} | ||
c30187 | train | // onlyIDQuery returns true if the query contains only a non-empty ID and all
// others keys are empty | {
"resource": ""
} | ||
c30188 | train | // getQueryKey returns the etcd key for the query. | {
"resource": ""
} | ||
c30189 | train | // New creates, initializes and then returns a new Kite instance.
//
// Version must be in 3-digit semantic form.
//
// Name is important that it's also used to be searched by others. | {
"resource": ""
} | ||
c30190 | train | // NewWithConfig builds a new kite value for the given configuration. | {
"resource": ""
} | ||
c30191 | train | // Kite returns the definition of the kite. | {
"resource": ""
} | ||
c30192 | train | // KiteKey gives a kite key used to authenticate to kontrol and other kites. | {
"resource": ""
} | ||
c30193 | train | // KontrolKey gives a Kontrol's public key.
//
// The value is taken form kite key's kontrolKey claim. | {
"resource": ""
} | ||
c30194 | train | // HandleHTTP registers the HTTP handler for the given pattern into the
// underlying HTTP muxer. | {
"resource": ""
} | ||
c30195 | train | // HandleHTTPFunc registers the HTTP handler for the given pattern into the
// underlying HTTP muxer. | {
"resource": ""
} | ||
c30196 | train | // ServeHTTP helps Kite to satisfy the http.Handler interface. So kite can be
// used as a standard http server. | {
"resource": ""
} | ||
c30197 | train | // OnConnect registers a callbacks which is called when a Kite connects
// to the k Kite. | {
"resource": ""
} | ||
c30198 | train | // OnFirstRequest registers a function to run when we receive first request
// from other Kite. | {
"resource": ""
} | ||
c30199 | train | // OnDisconnect registers a function to run when a connected Kite is disconnected. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.