_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c171000
validation
// CreateDowntime adds a new downtme to the system. This returns a pointer // to a Downtime so you can pass that to UpdateDowntime or CancelDowntime // later if needed.
{ "resource": "" }
c171001
validation
// UpdateDowntime takes a downtime that was previously retrieved through some method // and sends it back to the server.
{ "resource": "" }
c171002
validation
// Getdowntime retrieves an downtime by identifier.
{ "resource": "" }
c171003
validation
// GetDowntimes returns a slice of all downtimes.
{ "resource": "" }
c171004
validation
// MarshalJSON is a custom method for handling datetime marshalling
{ "resource": "" }
c171005
validation
// UnmarshalJSON is a custom method for handling datetime unmarshalling
{ "resource": "" }
c171006
validation
// GetAPIKeys returns all API keys or error on failure
{ "resource": "" }
c171007
validation
// GetAPIKey returns a single API key or error on failure
{ "resource": "" }
c171008
validation
// CreateAPIKey creates an API key from given struct and fills the rest of its // fields, or returns an error on failure
{ "resource": "" }
c171009
validation
// DeleteAPIKey deletes API key given by key, returns an error
{ "resource": "" }
c171010
validation
// PostMetrics takes as input a slice of metrics and then posts them up to the // server for posting data.
{ "resource": "" }
c171011
validation
// GetScreenboard returns a single screenboard created on this account.
{ "resource": "" }
c171012
validation
// GetScreenboards returns a list of all screenboards created on this account.
{ "resource": "" }
c171013
validation
// CreateScreenboard creates a new screenboard when given a Screenboard struct. Note // that the Id, Resource, Url and similar elements are not used in creation.
{ "resource": "" }
c171014
validation
// UpdateScreenboard in essence takes a Screenboard struct and persists it back to // the server. Use this if you've updated your local and need to push it back.
{ "resource": "" }
c171015
validation
// ShareScreenboard shares an existing screenboard, it takes and updates ScreenShareResponse
{ "resource": "" }
c171016
validation
// RevokeScreenboard revokes a currently shared screenboard
{ "resource": "" }
c171017
validation
// GetTags returns a map of tags.
{ "resource": "" }
c171018
validation
// GetHostTags returns a slice of tags for a given host and source.
{ "resource": "" }
c171019
validation
// AddTagsToHost does exactly what it says on the tin. Given a list of tags, // add them to the host. The source is optionally specified, and defaults to // "users" as per the API documentation.
{ "resource": "" }
c171020
validation
// RemoveHostTags removes all tags from a host for the given source. If none is // given, the API defaults to "users".
{ "resource": "" }
c171021
validation
// redactError removes api and application keys from error strings
{ "resource": "" }
c171022
validation
// doRequestWithRetries performs an HTTP request repeatedly for maxTime or until // no error and no acceptable HTTP response code was returned.
{ "resource": "" }
c171023
validation
// PostEvent takes as input an event and then posts it to the server.
{ "resource": "" }
c171024
validation
// GetEvent gets a single event given an identifier.
{ "resource": "" }
c171025
validation
// GetEvents returns a slice of events from the query stream.
{ "resource": "" }
c171026
validation
// ViewMetricMetadata allows you to get metadata about a specific metric.
{ "resource": "" }
c171027
validation
// PostCheck posts the result of a check run to the server
{ "resource": "" }
c171028
validation
// WriteObject implements ObjectStream.
{ "resource": "" }
c171029
validation
// ReadObject implements ObjectStream.
{ "resource": "" }
c171030
validation
// SetParams sets r.Params to the JSON representation of v. If JSON // marshaling fails, it returns an error.
{ "resource": "" }
c171031
validation
// SetMeta sets r.Meta to the JSON representation of v. If JSON // marshaling fails, it returns an error.
{ "resource": "" }
c171032
validation
// SetResult sets r.Result to the JSON representation of v. If JSON // marshaling fails, it returns an error.
{ "resource": "" }
c171033
validation
// SetError sets e.Error to the JSON representation of v. If JSON // marshaling fails, it panics.
{ "resource": "" }
c171034
validation
// Close closes the JSON-RPC connection. The connection may not be // used after it has been closed.
{ "resource": "" }
c171035
validation
// Reply sends a successful response with a result.
{ "resource": "" }
c171036
validation
// ReplyWithError sends a response with an error.
{ "resource": "" }
c171037
validation
// LogMessages causes all messages sent and received on conn to be // logged using the provided logger.
{ "resource": "" }
c171038
validation
// HandlerWithError implements Handler by calling the func for each // request and handling returned errors and results.
{ "resource": "" }
c171039
validation
// ReadObject implements jsonrpc2.ObjectStream.
{ "resource": "" }
c171040
validation
// PickID returns a call option which sets the ID on a request. Care must be // taken to ensure there are no conflicts with any previously picked ID, nor // with the default sequence ID.
{ "resource": "" }
c171041
validation
// A zero Port is taken to mean no port provided, per BEP 7.
{ "resource": "" }
c171042
validation
// Generate the CRC used to make or validate secure node ID.
{ "resource": "" }
c171043
validation
// Stats returns statistics for the server.
{ "resource": "" }
c171044
validation
// NewServer initializes a new DHT node server.
{ "resource": "" }
c171045
validation
// Packets to and from any address matching a range in the list are dropped.
{ "resource": "" }
c171046
validation
// Adds directly to the node table.
{ "resource": "" }
c171047
validation
// Returns the node if it's in the routing table, adding it if appropriate.
{ "resource": "" }
c171048
validation
// Sends a ping query to the address given.
{ "resource": "" }
c171049
validation
// Add response nodes to node table.
{ "resource": "" }
c171050
validation
// Sends a find_node query to addr. targetID is the node we're looking for.
{ "resource": "" }
c171051
validation
// Populates the node table.
{ "resource": "" }
c171052
validation
// Returns how many nodes are in the node table.
{ "resource": "" }
c171053
validation
// Exports the current node table.
{ "resource": "" }
c171054
validation
// Stops the server network activity. This is all that's required to clean-up a Server.
{ "resource": "" }
c171055
validation
// Per the spec in BEP 5.
{ "resource": "" }
c171056
validation
// Returns the number of distinct remote addresses the announce has queried.
{ "resource": "" }
c171057
validation
// This is kind of the main thing you want to do with DHT. It traverses the // graph toward nodes that store peers for the infohash, streaming them to the // caller, and announcing the local node to each node if allowed and // specified.
{ "resource": "" }
c171058
validation
// Announce to a peer, if appropriate.
{ "resource": "" }
c171059
validation
// Stop the announce.
{ "resource": "" }
c171060
validation
// NewUUID returns a Version 1 UUID based on the current NodeID and clock // sequence, and the current time. If the NodeID has not been set by SetNodeID // or SetNodeInterface then it will be set automatically. If the NodeID cannot // be set NewUUID returns nil. If clock sequence has not been set by // SetClockSeque...
{ "resource": "" }
c171061
validation
// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs. // If name is "" then the first usable interface found will be used or a random // Node ID will be generated. If a named interface cannot be found then false // is returned. // // SetNodeInterface never fails when name is "".
{ "resource": "" }
c171062
validation
// NodeID returns a slice of a copy of the current Node ID, setting the Node ID // if not already set.
{ "resource": "" }
c171063
validation
// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes // of id are used. If id is less than 6 bytes then false is returned and the // Node ID is not set.
{ "resource": "" }
c171064
validation
// NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is // not valid. The NodeID is only well defined for version 1 and 2 UUIDs.
{ "resource": "" }
c171065
validation
// MustParse is like Parse but panics if the string cannot be parsed. // It simplifies safe initialization of global variables holding compiled UUIDs.
{ "resource": "" }
c171066
validation
// FromBytes creates a new UUID from a byte slice. Returns an error if the slice // does not have a length of 16. The bytes are copied from the slice.
{ "resource": "" }
c171067
validation
// Must returns uuid if err is nil and panics otherwise.
{ "resource": "" }
c171068
validation
// Variant returns the variant encoded in uuid.
{ "resource": "" }
c171069
validation
// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in // uuid. The time is only defined for version 1 and 2 UUIDs.
{ "resource": "" }
c171070
validation
// MarshalText implements encoding.TextMarshaler.
{ "resource": "" }
c171071
validation
// UnmarshalText implements encoding.TextUnmarshaler.
{ "resource": "" }
c171072
validation
// UnmarshalBinary implements encoding.BinaryUnmarshaler.
{ "resource": "" }
c171073
validation
// RunCursorAt executes the select list, initializing the cursor to the given // position. Invalid cursor positions will be clamped to valid values. It // displays the label and the list of items, asking the user to chose any value // within to list. Run will keep the prompt alive until it has been canceled // from th...
{ "resource": "" }
c171074
validation
// Run executes the select list. Its displays the label and the list of items, asking the user to chose any // value within to list or add his own. Run will keep the prompt alive until it has been canceled from // the command prompt or it has received a valid value. // // If the addLabel is selected in the list, this f...
{ "resource": "" }
c171075
validation
// New creates and initializes a new ScreenBuf.
{ "resource": "" }
c171076
validation
// Clear clears all previous lines and the output starts from the top.
{ "resource": "" }
c171077
validation
// Write writes a single line to the underlining buffer. If the ScreenBuf was // previously reset, all previous lines are cleared and the output starts from // the top. Lines with \r or \n will cause an error since they can interfere with the // terminal ability to move between lines.
{ "resource": "" }
c171078
validation
// Flush writes any buffered data to the underlying io.Writer, ensuring that any pending data is displayed.
{ "resource": "" }
c171079
validation
// Styler is a function that accepts multiple possible styling transforms from the state, // color and background colors constants and transforms them into a templated string // to apply those styles in the CLI. // // The returned styling function accepts a string that will be extended with // the wrapping function's s...
{ "resource": "" }
c171080
validation
// New creates and initializes a list of searchable items. The items attribute must be a slice type with a // size greater than 0. Error will be returned if those two conditions are not met.
{ "resource": "" }
c171081
validation
// Prev moves the visible list back one item. If the selected item is out of // view, the new select item becomes the last visible item. If the list is // already at the top, nothing happens.
{ "resource": "" }
c171082
validation
// Search allows the list to be filtered by a given term. The list must // implement the searcher function signature for this functionality to work.
{ "resource": "" }
c171083
validation
// CancelSearch stops the current search and returns the list to its // original order.
{ "resource": "" }
c171084
validation
// SetStart sets the current scroll position. Values out of bounds will be // clamped.
{ "resource": "" }
c171085
validation
// SetCursor sets the position of the cursor in the list. Values out of bounds // will be clamped.
{ "resource": "" }
c171086
validation
// Next moves the visible list forward one item. If the selected item is out of // view, the new select item becomes the first visible item. If the list is // already at the bottom, nothing happens.
{ "resource": "" }
c171087
validation
// PageUp moves the visible list backward by x items. Where x is the size of the // visible items on the list. The selected item becomes the first visible item. // If the list is already at the bottom, the selected item becomes the last // visible item.
{ "resource": "" }
c171088
validation
// PageDown moves the visible list forward by x items. Where x is the size of // the visible items on the list. The selected item becomes the first visible // item.
{ "resource": "" }
c171089
validation
// Items returns a slice equal to the size of the list with the current visible // items and the index of the active item in this list.
{ "resource": "" }
c171090
validation
// NewCursor create a new cursor, with the DefaultCursor, the specified input, // and position at the end of the specified starting input.
{ "resource": "" }
c171091
validation
// ensures we are in bounds.
{ "resource": "" }
c171092
validation
// insert the cursor rune array into r before the provided index
{ "resource": "" }
c171093
validation
// Format renders the input with the Cursor appropriately positioned.
{ "resource": "" }
c171094
validation
// FormatMask replaces all input runes with the mask rune.
{ "resource": "" }
c171095
validation
// Replace replaces the previous input with whatever is specified, and moves the // cursor to the end position
{ "resource": "" }
c171096
validation
// Place moves the cursor to the absolute array index specified by position
{ "resource": "" }
c171097
validation
// Move moves the cursor over in relative terms, by shift indices.
{ "resource": "" }
c171098
validation
// Backspace removes the rune that precedes the cursor // // It handles being at the beginning or end of the row, and moves the cursor to // the appropriate position.
{ "resource": "" }
c171099
validation
// Listen is a readline Listener that updates internal cursor state appropriately.
{ "resource": "" }