_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c177900
// Cat the content at the given path. Callers need to drain and close the returned reader after usage.
c177901
// List entries at the given path
c177902
// Pin the given path
c177903
// Pins returns a map of the pin hashes to their info (currently just the // pin type, one of DirectPin, RecursivePin, or IndirectPin. A map is returned // instead of a slice because it is easier to do existence lookup by map key // than unordered array searching. The map is likely to be more useful to a // client than...
c177904
// returns ipfs version and commit sha
c177905
// SwarmPeers gets all the swarm peers
c177906
// SwarmConnect opens a swarm connection to a specific address.
c177907
// DagPutOptions applies the given options to a DagPutSettings instance.
c177908
// Pin is an option for Dag.Put which specifies whether to pin the added // dags. Default is "false".
c177909
// Kind is an option for Dag.Put which specifies the format that the dag // will be added as. Default is "cbor".
c177910
// Hash is an option for Dag.Put which specifies the hash function to use
c177911
// AddDir adds a directory recursively with all of the files under it
c177912
// Publish updates a mutable name to point to a given value
c177913
// PublishWithDetails is used for fine grained control over record publishing
c177914
// ResolveValue resolves a PlanValue as a single value based on the supplied bindvars.
c177915
// EncodeValue encodes one bind variable value into the query.
c177916
// skipStatement scans until the EOF, or end of statement is encountered.
c177917
// reset clears any internal state.
c177918
// Preview analyzes the beginning of the query using a simpler and faster // textual comparison to identify the statement type.
c177919
// NewPlanValue builds a sqltypes.PlanValue from an Expr.
c177920
// StringIn is a convenience function that returns // true if str matches any of the values.
c177921
// NewStringArena creates an arena of the specified size.
c177922
// NewString copies a byte slice into the arena and returns it as a string. // If the arena is full, it returns a traditional go string.
c177923
// SpaceLeft returns the amount of space left in the arena.
c177924
// ParseNext parses a single SQL statement from the tokenizer // returning a Statement which is the AST representation of the query. // The tokenizer will always read up to the end of the statement, allowing for // the next call to ParseNext to parse any subsequent SQL statements. When // there are no more statements t...
c177925
// ExprFromValue converts the given Value into an Expr or returns an error.
c177926
// Backtick produces a backticked literal given an input string.
c177927
// NewValue builds a Value using typ and val. If the value and typ // don't match, it returns an error.
c177928
// String returns a printable version of the value.
c177929
// EncodeSQL encodes the value into an SQL statement. Can be binary.
c177930
// WalkStatement is the top level walk function. // If it encounters a Select, it switches to a mode // where variables are deduped.
c177931
// BindVariablesEqual compares two maps of bind variables.
c177932
// New constructs a new Secure instance with supplied options.
c177933
// Special implementation for Negroni, but could be used elsewhere.
c177934
// FromAuthHeader is a "TokenExtractor" that takes a give request and extracts // the JWT token from the Authorization header.
c177935
// FromParameter returns a function that extracts the token from the specified // query string parameter
c177936
// FromFirst returns a function that runs multiple token extractors and takes the // first token it finds
c177937
// get the initial RPC containing all of our subscriptions to send to new peers
c177938
// NewFloodsubWithProtocols returns a new floodsub-enabled PubSub objecting using the protocols specified in ps.
c177939
// NewFloodSub returns a new PubSub object using the FloodSubRouter.
c177940
// NewLRUBlacklist creates a new LRUBlacklist with capacity cap
c177941
// NewRandomSub returns a new PubSub object using RandomSubRouter as the router.
c177942
// NewGossipSub returns a new PubSub object using GossipSubRouter as the router.
c177943
// NewPubSub returns a new PubSub management object.
c177944
// WithValidateThrottle sets the upper bound on the number of active validation // goroutines.
c177945
// WithBlacklist provides an implementation of the blacklist; the default is a // MapBlacklist
c177946
// handleRemoveSubscription removes Subscription sub from bookeeping. // If this was the last Subscription for a given topic, it will also announce // that this node is not subscribing to this topic anymore. // Only called from processLoop.
c177947
// handleAddSubscription adds a Subscription for a particular topic. If it is // the first Subscription for the topic, it will announce that this node // subscribes to the topic. // Only called from processLoop.
c177948
// announce announces whether or not this node is interested in a given topic // Only called from processLoop.
c177949
// notifySubs sends a given message to all corresponding subscribers. // Only called from processLoop.
c177950
// seenMessage returns whether we already saw this message before
c177951
// subscribedToMessage returns whether we are subscribed to one of the topics // of a given message
c177952
// msgID returns a unique ID of the passed Message
c177953
// pushMsg pushes a message performing validation as necessary
c177954
// validate performs validation and only sends the message if all validators succeed
c177955
// fast path for single topic validation that avoids the extra goroutine
c177956
// getValidators returns all validators that apply to a given message
c177957
// Subscribe returns a new Subscription for the given topic. // Note that subscription is not an instanteneous operation. It may take some time // before the subscription is processed by the pubsub main loop and propagated to our peers.
c177958
// SubscribeByTopicDescriptor lets you subscribe a topic using a pb.TopicDescriptor.
c177959
// GetTopics returns the topics this node is subscribed to.
c177960
// Publish publishes data to the given topic.
c177961
// ListPeers returns a list of peers we are connected to in the given topic.
c177962
// WithValidatorTimeout is an option that sets the topic validator timeout.
c177963
// WithValidatorConcurrency is an option that sets topic validator throttle.
c177964
// RegisterTopicValidator registers a validator for topic.
c177965
// UnregisterTopicValidator removes a validator from a topic. // Returns an error if there was no validator registered with the topic.
c177966
// DefaultMetricPrefix is the default mapping for metrics to statsd keys. // It uses a "tchannel" prefix for all stats.
c177967
// MetricWithPrefix is the default mapping for metrics to statsd keys.
c177968
// NewClient returns a json.Client used to make outbound JSON calls.
c177969
// Call makes a JSON call, with retries.
c177970
// CallPeer makes a JSON call using the given peer.
c177971
// CallSC makes a JSON call using the given subchannel.
c177972
// ReadResponse reads a http.Response from the given readers.
c177973
// writeHeaders writes out the HTTP headers as arg2, and creates the arg3 writer.
c177974
// ResponseWriter returns a http.ResponseWriter that will write to an underlying writer. // It also returns a function that should be called once the handler has completed.
c177975
// ReadHeaders reads key-value pairs encoded using WriteHeaders.
c177976
// NewTCPRawRelay creates a relay that just pipes data from one connection // to another directly.
c177977
// NewClient creates a new Hyperbahn client using the given channel. // config is the environment-specific configuration for Hyperbahn such as the list of initial nodes. // opts are optional, and are used to customize the client.
c177978
// Advertise advertises the service with Hyperbahn, and returns any errors on initial advertisement. // Advertise can register multiple services hosted on the same endpoint. // If the advertisement succeeds, a goroutine is started to re-advertise periodically.
c177979
// Handle deserializes the JSON arguments and calls the underlying handler.
c177980
// Port returns the actual port the server listens to
c177981
// SetStrategy sets customized peer selection strategy.
c177982
// Add adds a peer to the list if it does not exist, or returns any existing peer.
c177983
// GetNew returns a new, previously unselected peer from the peer list, or nil, // if no new unselected peer can be found.
c177984
// Get returns a peer from the peer list, or nil if none can be found, // will avoid previously selected peers if possible.
c177985
// Remove removes a peer from the peer list. It returns an error if the peer cannot be found. // Remove does not affect connections to the peer in any way.
c177986
// Copy returns a copy of the PeerList as a map from hostPort to peer.
c177987
// Len returns the length of the PeerList.
c177988
// exists checks if a hostport exists in the peer list.
c177989
// getPeerScore is called to find the peer and its score from a host port key. // Note that at least a Read lock must be held to call this function.
c177990
// onPeerChange is called when there is a change that may cause the peer's score to change. // The new score is calculated, and the peer heap is updated with the new score if the score changes.
c177991
// updatePeer is called to update the score of the peer given the existing score. // Note that a Write lock must be held to call this function.
c177992
// getConn treats inbound and outbound connections as a single virtual list // that can be indexed. The peer must be read-locked.
c177993
// GetConnection returns an active connection to this peer. If no active connections // are found, it will create a new outbound connection and return it.
c177994
// getConnectionRelay gets a connection, and uses the given timeout to lazily // create a context if a new connection is required.
c177995
// canRemove returns whether this peer can be safely removed from the root peer list.
c177996
// addConnection adds an active connection to the peer's connection list. // If a connection is not active, returns ErrInvalidConnectionState.
c177997
// removeConnection will check remove the connection if it exists on connsPtr // and returns whether it removed the connection.
c177998
// connectionStateChanged is called when one of the peers' connections states changes. // All non-active connections are removed from the peer. The connection will // still be tracked by the channel until it's completely closed.
c177999
// Connect adds a new outbound connection to the peer.