_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c178900 | test | // MarshalText implements encoding.TextMarshaler.
// It will encode a zero if this Int is null. | {
"resource": ""
} | ||
c178901 | test | // SetValid changes this Int's value and also sets it to be non-null. | {
"resource": ""
} | ||
c178902 | test | // UnmarshalText implements encoding.TextUnmarshaler.
// It will unmarshal to a null Int if the input is a blank or not an integer.
// It will return an error if the input is not an integer, blank, or "null". | {
"resource": ""
} | ||
c178903 | test | // MarshalText implements encoding.TextMarshaler.
// It will encode a zero if this Bool is null. | {
"resource": ""
} | ||
c178904 | test | // MarshalJSON implements json.Marshaler.
// It will encode the zero value of time.Time
// if this time is invalid. | {
"resource": ""
} | ||
c178905 | test | // UnmarshalJSON implements json.Unmarshaler.
// It supports number and null input.
// 0 will not be considered a null Float.
// It also supports unmarshalling a sql.NullFloat64. | {
"resource": ""
} | ||
c178906 | test | // UnmarshalText implements encoding.TextUnmarshaler.
// It will unmarshal to a null Float if the input is a blank or not an integer.
// It will return an error if the input is not an integer, blank, or "null". | {
"resource": ""
} | ||
c178907 | test | // newGossipChannel returns a named, usable channel.
// It delegates receiving duties to the passed Gossiper. | {
"resource": ""
} | ||
c178908 | test | // GossipUnicast implements Gossip, relaying msg to dst, which must be a
// member of the channel. | {
"resource": ""
} | ||
c178909 | test | // GossipBroadcast implements Gossip, relaying update to all members of the
// channel. | {
"resource": ""
} | ||
c178910 | test | // Send relays data into the channel topology via random neighbours. | {
"resource": ""
} | ||
c178911 | test | // SendDown relays data into the channel topology via conn. | {
"resource": ""
} | ||
c178912 | test | // GobEncode gob-encodes each item and returns the resulting byte slice. | {
"resource": ""
} | ||
c178913 | test | // newTokenBucket returns a bucket containing capacity tokens, refilled at a
// rate of one token per tokenInterval. | {
"resource": ""
} | ||
c178914 | test | // Blocks until there is a token available.
// Not safe for concurrent use by multiple goroutines. | {
"resource": ""
} | ||
c178915 | test | // Determine the historic token timestamp representing a full bucket | {
"resource": ""
} | ||
c178916 | test | // PrefixRangeEnd allows Get, Delete, and Watch requests to operate on all keys
// with a matching prefix. Pass the prefix to this function, and use the result
// as the RangeEnd value. | {
"resource": ""
} | ||
c178917 | test | // newLocalPeer returns a usable LocalPeer. | {
"resource": ""
} | ||
c178918 | test | // Connections returns all the connections that the local peer is aware of. | {
"resource": ""
} | ||
c178919 | test | // createConnection creates a new connection, originating from
// localAddr, to peerAddr. If acceptNewPeer is false, peerAddr must
// already be a member of the mesh. | {
"resource": ""
} | ||
c178920 | test | // ACTOR client API
// Synchronous. | {
"resource": ""
} | ||
c178921 | test | // If the connection is successful, it will end up in the local peer's
// connections map. | {
"resource": ""
} | ||
c178922 | test | // SendProtocolMsg implements ProtocolSender. | {
"resource": ""
} | ||
c178923 | test | // NewStatus returns a Status object, taken as a snapshot from the router. | {
"resource": ""
} | ||
c178924 | test | // makePeerStatusSlice takes a snapshot of the state of peers. | {
"resource": ""
} | ||
c178925 | test | // makeUnicastRouteStatusSlice takes a snapshot of the unicast routes in routes. | {
"resource": ""
} | ||
c178926 | test | // makeBroadcastRouteStatusSlice takes a snapshot of the broadcast routes in routes. | {
"resource": ""
} | ||
c178927 | test | // makeLocalConnectionStatusSlice takes a snapshot of the active local
// connections in the ConnectionMaker. | {
"resource": ""
} | ||
c178928 | test | // makeTrustedSubnetsSlice makes a human-readable copy of the trustedSubnets. | {
"resource": ""
} | ||
c178929 | test | // Range implements gRPC KVServer.
// Range gets the keys in the range from the store. | {
"resource": ""
} | ||
c178930 | test | // Put implements gRPC KVServer.
// Put puts the given key into the store.
// A put request increases the revision of the store,
// and generates one event in the event history. | {
"resource": ""
} | ||
c178931 | test | // Delete implements gRPC KVServer.
// Delete deletes the given range from the store.
// A delete request increase the revision of the store,
// and generates one event in the event history. | {
"resource": ""
} | ||
c178932 | test | // Txn implements gRPC KVServer.
// Txn processes all the requests in one transaction.
// A txn request increases the revision of the store,
// and generates events with the same revision in the event history.
// It is not allowed to modify the same key several times within one txn. | {
"resource": ""
} | ||
c178933 | test | // Compact implements gRPC KVServer.
// Compact compacts the event history in s. User should compact the
// event history periodically, or it will grow infinitely. | {
"resource": ""
} | ||
c178934 | test | // From public API method to proposalc. | {
"resource": ""
} | ||
c178935 | test | // applyCompare applies the compare request.
// It returns the revision at which the comparison happens. If the comparison
// succeeds, the it returns true. Otherwise it returns false. | {
"resource": ""
} | ||
c178936 | test | // Descriptions returns descriptions for all known peers. | {
"resource": ""
} | ||
c178937 | test | // OnGC adds a new function to be set of functions that will be executed on
// all subsequent GC runs, receiving the GC'd peer. | {
"resource": ""
} | ||
c178938 | test | // OnInvalidateShortIDs adds a new function to a set of functions that will be
// executed on all subsequent GC runs, when the mapping from short IDs to
// peers has changed. | {
"resource": ""
} | ||
c178939 | test | // Choose an available short ID at random. | {
"resource": ""
} | ||
c178940 | test | // fetchWithDefault will use reference fields of the passed peer object to
// look up and return an existing, matching peer. If no matching peer is
// found, the passed peer is saved and returned. | {
"resource": ""
} | ||
c178941 | test | // Fetch returns a peer matching the passed name, without incrementing its
// refcount. If no matching peer is found, Fetch returns nil. | {
"resource": ""
} | ||
c178942 | test | // Like fetch, but increments local refcount. | {
"resource": ""
} | ||
c178943 | test | // FetchByShortID returns a peer matching the passed short ID.
// If no matching peer is found, FetchByShortID returns nil. | {
"resource": ""
} | ||
c178944 | test | // GarbageCollect takes a lock, triggers a GC, and invokes the accumulated GC
// callbacks. | {
"resource": ""
} | ||
c178945 | test | // newRoutes returns a usable Routes based on the LocalPeer and existing Peers. | {
"resource": ""
} | ||
c178946 | test | // OnChange appends callback to the functions that will be called whenever the
// routes are recalculated. | {
"resource": ""
} | ||
c178947 | test | // Unicast returns the next hop on the unicast route to the named peer,
// based on established and symmetric connections. | {
"resource": ""
} | ||
c178948 | test | // UnicastAll returns the next hop on the unicast route to the named peer,
// based on all connections. | {
"resource": ""
} | ||
c178949 | test | // Broadcast returns the set of peer names that should be notified
// when we receive a broadcast message originating from the named peer
// based on established and symmetric connections. | {
"resource": ""
} | ||
c178950 | test | // BroadcastAll returns the set of peer names that should be notified
// when we receive a broadcast message originating from the named peer
// based on all connections. | {
"resource": ""
} | ||
c178951 | test | // NewPeer returns a Peer, which can be used as a net.PacketConn.
// Clients must Register a mesh.Gossip before calling ReadFrom or WriteTo.
// Clients should aggressively consume from ReadFrom. | {
"resource": ""
} | ||
c178952 | test | // Register injects the mesh.Gossip and enables full-duplex communication.
// Clients should consume from ReadFrom without blocking. | {
"resource": ""
} | ||
c178953 | test | // ReadFrom implements net.PacketConn.
// Clients should consume from ReadFrom without blocking. | {
"resource": ""
} | ||
c178954 | test | // WriteTo implements net.PacketConn. | {
"resource": ""
} | ||
c178955 | test | // LocalAddr implements net.PacketConn. | {
"resource": ""
} | ||
c178956 | test | // OnGossip implements mesh.Gossiper.
// The buf is a single pkt. | {
"resource": ""
} | ||
c178957 | test | // OnGossipBroadcast implements mesh.Gossiper.
// The buf is a single pkt | {
"resource": ""
} | ||
c178958 | test | // OnGossipUnicast implements mesh.Gossiper.
// The buf is a single pkt. | {
"resource": ""
} | ||
c178959 | test | // NewDefaultServer is like NewServer, but we take care of creating a
// mesh.Router and meshconn.Peer for you, with sane defaults. If you need more
// fine-grained control, create the components yourself and use NewServer. | {
"resource": ""
} | ||
c178960 | test | // PeerNameFromUserInput parses PeerName from a user-provided string. | {
"resource": ""
} | ||
c178961 | test | // bytes encodes PeerName as a byte slice. | {
"resource": ""
} | ||
c178962 | test | // NewRouter returns a new router. It must be started. | {
"resource": ""
} | ||
c178963 | test | // Relay all pending gossip data for each channel via random neighbours. | {
"resource": ""
} | ||
c178964 | test | // Relay all pending gossip data for each channel via conn. | {
"resource": ""
} | ||
c178965 | test | // BroadcastTopologyUpdate is invoked whenever there is a change to the mesh
// topology, and broadcasts the new set of peers to the mesh. | {
"resource": ""
} | ||
c178966 | test | // OnGossipUnicast implements Gossiper, but always returns an error, as a
// router should only receive gossip broadcasts of TopologyGossipData. | {
"resource": ""
} | ||
c178967 | test | // OnGossipBroadcast receives broadcasts of TopologyGossipData.
// It returns the received update unchanged. | {
"resource": ""
} | ||
c178968 | test | // Gossip yields the current topology as GossipData. | {
"resource": ""
} | ||
c178969 | test | // OnGossip receives broadcasts of TopologyGossipData.
// It returns an "improved" version of the received update.
// See peers.ApplyUpdate. | {
"resource": ""
} | ||
c178970 | test | // Encode implements GossipData. | {
"resource": ""
} | ||
c178971 | test | // Construct an empty state object, ready to receive updates.
// This is suitable to use at program start.
// Other peers will populate us with data. | {
"resource": ""
} | ||
c178972 | test | // Merge the set into our state, abiding increment-only semantics.
// Return a non-nil mesh.GossipData representation of the received set. | {
"resource": ""
} | ||
c178973 | test | // Merge the set into our state, abiding increment-only semantics.
// Return our resulting, complete state. | {
"resource": ""
} | ||
c178974 | test | // OnGossipBroadcast implements Gossiper. | {
"resource": ""
} | ||
c178975 | test | // OnGossip should return "everything new I've just learnt".
// surrogateGossiper doesn't understand the content of messages, but it can eliminate simple duplicates | {
"resource": ""
} | ||
c178976 | test | // GenerateKeyPair is used during encrypted protocol introduction. | {
"resource": ""
} | ||
c178977 | test | // FormSessionKey is used during encrypted protocol introduction. | {
"resource": ""
} | ||
c178978 | test | // NewTCPCryptoState returns a valid TCPCryptoState. | {
"resource": ""
} | ||
c178979 | test | // Send implements TCPSender by encoding the msg. | {
"resource": ""
} | ||
c178980 | test | // Send implements TCPSender by writing the size of the msg as a big-endian
// uint32 before the msg. msgs larger than MaxTCPMsgSize are rejected. | {
"resource": ""
} | ||
c178981 | test | // Send implements TCPSender by sealing and sending the msg as-is. | {
"resource": ""
} | ||
c178982 | test | // Receive implements TCPReciever by Gob decoding into a byte slice directly. | {
"resource": ""
} | ||
c178983 | test | // Receive implements TCPReceiver by making a length-limited read into a byte buffer. | {
"resource": ""
} | ||
c178984 | test | // Receive implements TCPReceiver by reading from the wrapped TCPReceiver and
// unboxing the encrypted message, returning the decoded message. | {
"resource": ""
} | ||
c178985 | test | // Construct a peer with empty state.
// Be sure to register a channel, later,
// so we can make outbound communication. | {
"resource": ""
} | ||
c178986 | test | // Increment the counter by one. | {
"resource": ""
} | ||
c178987 | test | // makeRaftPeer converts a net.Addr into a raft.Peer.
// All peers must perform the Addr-to-Peer mapping in the same way.
//
// The etcd Raft implementation tracks the committed entry for each node ID,
// and panics if it discovers a node has lost previously committed entries.
// In effect, it assumes commitment implie... | {
"resource": ""
} | ||
c178988 | test | // String returns the peer name and nickname. | {
"resource": ""
} | ||
c178989 | test | // Apply f to all peers reachable by peer. If establishedAndSymmetric is true,
// only peers with established bidirectional connections will be selected. The
// exclude maps is treated as a set of remote peers to blacklist. | {
"resource": ""
} | ||
c178990 | test | // ParsePeerUID parses a decimal peer UID from a string. | {
"resource": ""
} | ||
c178991 | test | // Less implements sort.Interface. | {
"resource": ""
} | ||
c178992 | test | // DoIntro executes the protocol introduction. | {
"resource": ""
} | ||
c178993 | test | // In the V1 protocol, the intro fields are sent unencrypted. So we
// restrict them to an established subset of fields that are assumed
// to be safe. | {
"resource": ""
} | ||
c178994 | test | // newConnectionMaker returns a usable ConnectionMaker, seeded with
// peers, making outbound connections from localAddr, and listening on
// port. If discovery is true, ConnectionMaker will attempt to
// initiate new connections with peers it's not directly connected to. | {
"resource": ""
} | ||
c178995 | test | // connectionAborted marks the target identified by address as broken, and
// puts it in the TargetWaiting state. | {
"resource": ""
} | ||
c178996 | test | // NewGossipSender constructs a usable GossipSender. | {
"resource": ""
} | ||
c178997 | test | // Send accumulates the GossipData and will send it eventually.
// Send and Broadcast accumulate into different buckets. | {
"resource": ""
} | ||
c178998 | test | // Broadcast accumulates the GossipData under the given srcName and will send
// it eventually. Send and Broadcast accumulate into different buckets. | {
"resource": ""
} | ||
c178999 | test | // Flush sends all pending data, and returns true if anything was sent since
// the previous flush. For testing. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.