_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c178900 | // MarshalText implements encoding.TextMarshaler.
// It will encode a zero if this Int is null. | |
c178901 | // SetValid changes this Int's value and also sets it to be non-null. | |
c178902 | // 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". | |
c178903 | // MarshalText implements encoding.TextMarshaler.
// It will encode a zero if this Bool is null. | |
c178904 | // MarshalJSON implements json.Marshaler.
// It will encode the zero value of time.Time
// if this time is invalid. | |
c178905 | // 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. | |
c178906 | // 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". | |
c178907 | // newGossipChannel returns a named, usable channel.
// It delegates receiving duties to the passed Gossiper. | |
c178908 | // GossipUnicast implements Gossip, relaying msg to dst, which must be a
// member of the channel. | |
c178909 | // GossipBroadcast implements Gossip, relaying update to all members of the
// channel. | |
c178910 | // Send relays data into the channel topology via random neighbours. | |
c178911 | // SendDown relays data into the channel topology via conn. | |
c178912 | // GobEncode gob-encodes each item and returns the resulting byte slice. | |
c178913 | // newTokenBucket returns a bucket containing capacity tokens, refilled at a
// rate of one token per tokenInterval. | |
c178914 | // Blocks until there is a token available.
// Not safe for concurrent use by multiple goroutines. | |
c178915 | // Determine the historic token timestamp representing a full bucket | |
c178916 | // 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. | |
c178917 | // newLocalPeer returns a usable LocalPeer. | |
c178918 | // Connections returns all the connections that the local peer is aware of. | |
c178919 | // createConnection creates a new connection, originating from
// localAddr, to peerAddr. If acceptNewPeer is false, peerAddr must
// already be a member of the mesh. | |
c178920 | // ACTOR client API
// Synchronous. | |
c178921 | // If the connection is successful, it will end up in the local peer's
// connections map. | |
c178922 | // SendProtocolMsg implements ProtocolSender. | |
c178923 | // NewStatus returns a Status object, taken as a snapshot from the router. | |
c178924 | // makePeerStatusSlice takes a snapshot of the state of peers. | |
c178925 | // makeUnicastRouteStatusSlice takes a snapshot of the unicast routes in routes. | |
c178926 | // makeBroadcastRouteStatusSlice takes a snapshot of the broadcast routes in routes. | |
c178927 | // makeLocalConnectionStatusSlice takes a snapshot of the active local
// connections in the ConnectionMaker. | |
c178928 | // makeTrustedSubnetsSlice makes a human-readable copy of the trustedSubnets. | |
c178929 | // Range implements gRPC KVServer.
// Range gets the keys in the range from the store. | |
c178930 | // 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. | |
c178931 | // 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. | |
c178932 | // 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. | |
c178933 | // Compact implements gRPC KVServer.
// Compact compacts the event history in s. User should compact the
// event history periodically, or it will grow infinitely. | |
c178934 | // From public API method to proposalc. | |
c178935 | // 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. | |
c178936 | // Descriptions returns descriptions for all known peers. | |
c178937 | // OnGC adds a new function to be set of functions that will be executed on
// all subsequent GC runs, receiving the GC'd peer. | |
c178938 | // 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. | |
c178939 | // Choose an available short ID at random. | |
c178940 | // 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. | |
c178941 | // Fetch returns a peer matching the passed name, without incrementing its
// refcount. If no matching peer is found, Fetch returns nil. | |
c178942 | // Like fetch, but increments local refcount. | |
c178943 | // FetchByShortID returns a peer matching the passed short ID.
// If no matching peer is found, FetchByShortID returns nil. | |
c178944 | // GarbageCollect takes a lock, triggers a GC, and invokes the accumulated GC
// callbacks. | |
c178945 | // newRoutes returns a usable Routes based on the LocalPeer and existing Peers. | |
c178946 | // OnChange appends callback to the functions that will be called whenever the
// routes are recalculated. | |
c178947 | // Unicast returns the next hop on the unicast route to the named peer,
// based on established and symmetric connections. | |
c178948 | // UnicastAll returns the next hop on the unicast route to the named peer,
// based on all connections. | |
c178949 | // 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. | |
c178950 | // 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. | |
c178951 | // 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. | |
c178952 | // Register injects the mesh.Gossip and enables full-duplex communication.
// Clients should consume from ReadFrom without blocking. | |
c178953 | // ReadFrom implements net.PacketConn.
// Clients should consume from ReadFrom without blocking. | |
c178954 | // WriteTo implements net.PacketConn. | |
c178955 | // LocalAddr implements net.PacketConn. | |
c178956 | // OnGossip implements mesh.Gossiper.
// The buf is a single pkt. | |
c178957 | // OnGossipBroadcast implements mesh.Gossiper.
// The buf is a single pkt | |
c178958 | // OnGossipUnicast implements mesh.Gossiper.
// The buf is a single pkt. | |
c178959 | // 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. | |
c178960 | // PeerNameFromUserInput parses PeerName from a user-provided string. | |
c178961 | // bytes encodes PeerName as a byte slice. | |
c178962 | // NewRouter returns a new router. It must be started. | |
c178963 | // Relay all pending gossip data for each channel via random neighbours. | |
c178964 | // Relay all pending gossip data for each channel via conn. | |
c178965 | // BroadcastTopologyUpdate is invoked whenever there is a change to the mesh
// topology, and broadcasts the new set of peers to the mesh. | |
c178966 | // OnGossipUnicast implements Gossiper, but always returns an error, as a
// router should only receive gossip broadcasts of TopologyGossipData. | |
c178967 | // OnGossipBroadcast receives broadcasts of TopologyGossipData.
// It returns the received update unchanged. | |
c178968 | // Gossip yields the current topology as GossipData. | |
c178969 | // OnGossip receives broadcasts of TopologyGossipData.
// It returns an "improved" version of the received update.
// See peers.ApplyUpdate. | |
c178970 | // Encode implements GossipData. | |
c178971 | // Construct an empty state object, ready to receive updates.
// This is suitable to use at program start.
// Other peers will populate us with data. | |
c178972 | // Merge the set into our state, abiding increment-only semantics.
// Return a non-nil mesh.GossipData representation of the received set. | |
c178973 | // Merge the set into our state, abiding increment-only semantics.
// Return our resulting, complete state. | |
c178974 | // OnGossipBroadcast implements Gossiper. | |
c178975 | // OnGossip should return "everything new I've just learnt".
// surrogateGossiper doesn't understand the content of messages, but it can eliminate simple duplicates | |
c178976 | // GenerateKeyPair is used during encrypted protocol introduction. | |
c178977 | // FormSessionKey is used during encrypted protocol introduction. | |
c178978 | // NewTCPCryptoState returns a valid TCPCryptoState. | |
c178979 | // Send implements TCPSender by encoding the msg. | |
c178980 | // Send implements TCPSender by writing the size of the msg as a big-endian
// uint32 before the msg. msgs larger than MaxTCPMsgSize are rejected. | |
c178981 | // Send implements TCPSender by sealing and sending the msg as-is. | |
c178982 | // Receive implements TCPReciever by Gob decoding into a byte slice directly. | |
c178983 | // Receive implements TCPReceiver by making a length-limited read into a byte buffer. | |
c178984 | // Receive implements TCPReceiver by reading from the wrapped TCPReceiver and
// unboxing the encrypted message, returning the decoded message. | |
c178985 | // Construct a peer with empty state.
// Be sure to register a channel, later,
// so we can make outbound communication. | |
c178986 | // Increment the counter by one. | |
c178987 | // 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... | |
c178988 | // String returns the peer name and nickname. | |
c178989 | // 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. | |
c178990 | // ParsePeerUID parses a decimal peer UID from a string. | |
c178991 | // Less implements sort.Interface. | |
c178992 | // DoIntro executes the protocol introduction. | |
c178993 | // 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. | |
c178994 | // 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. | |
c178995 | // connectionAborted marks the target identified by address as broken, and
// puts it in the TargetWaiting state. | |
c178996 | // NewGossipSender constructs a usable GossipSender. | |
c178997 | // Send accumulates the GossipData and will send it eventually.
// Send and Broadcast accumulate into different buckets. | |
c178998 | // Broadcast accumulates the GossipData under the given srcName and will send
// it eventually. Send and Broadcast accumulate into different buckets. | |
c178999 | // Flush sends all pending data, and returns true if anything was sent since
// the previous flush. For testing. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.