_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c27600
train
// NewAttachClient wraps conn in an implementation of AttachClient.
{ "resource": "" }
c27601
train
// Dial establishes a TLS connection to addr and checks the peer leaf // certificate against the configured pin. The underlying type of the returned // net.Conn is a Conn.
{ "resource": "" }
c27602
train
// CloseWrite shuts down the writing side of the connection.
{ "resource": "" }
c27603
train
// Retrieves current pin value
{ "resource": "" }
c27604
train
// Update the currently pinned server
{ "resource": "" }
c27605
train
// Updates the list of peers
{ "resource": "" }
c27606
train
// ReusableListen returns a TCP listener with SO_REUSEPORT and keepalives // enabled.
{ "resource": "" }
c27607
train
// NewWithAddr uses addr as the specified API url and returns a client.
{ "resource": "" }
c27608
train
// NewProcess returns a new instance of Process with defaults.
{ "resource": "" }
c27609
train
// Start begins the process. // Returns an error if the process is already running.
{ "resource": "" }
c27610
train
// Stop attempts to gracefully stop the process. If the process cannot be // stopped gracefully then it is forcefully stopped. Returns an error if the // process is already stopped.
{ "resource": "" }
c27611
train
// monitorCmd waits for cmd to finish and reports an error if it was unexpected. // Also closes the stopped channel to notify other listeners that it has finished.
{ "resource": "" }
c27612
train
// writeConfig generates a new redis.conf at the config path.
{ "resource": "" }
c27613
train
// Info returns information about the process.
{ "resource": "" }
c27614
train
// ping executes a PING command against addr until timeout occurs.
{ "resource": "" }
c27615
train
// pingWait continually pings a server until successful response or timeout.
{ "resource": "" }
c27616
train
// Restore stops the process, copies an RDB from r, and restarts the process. // Redis automatically handles recovery when there's a dump.rdb file present.
{ "resource": "" }
c27617
train
// RedisInfo executes an INFO command against a Redis server and returns the results.
{ "resource": "" }
c27618
train
// ParseRedisInfo parses the response from an INFO command.
{ "resource": "" }
c27619
train
// atoi returns the parsed integer value of s. Returns zero if a parse error occurs.
{ "resource": "" }
c27620
train
// needsDefaultScale indicates whether a release needs a default scale based on // whether it has a web process type and either has no previous release or no // previous scale.
{ "resource": "" }
c27621
train
// setEnv sets the given environment variables for the command, ensuring they // are only set once.
{ "resource": "" }
c27622
train
// Resume writes ControlMsgResume to the control socket and waits for a // ControlMsgOK response
{ "resource": "" }
c27623
train
// Host returns the host identified by id.
{ "resource": "" }
c27624
train
// Hosts returns a list of hosts in the cluster.
{ "resource": "" }
c27625
train
// Apply 'y' to 'x', returning a new structure. 'y' trumps.
{ "resource": "" }
c27626
train
// DecodeJSONArg decodes JSON into v from a file named name, if name is empty or // "-", stdin is used.
{ "resource": "" }
c27627
train
// LockDB acquires a read lock on the DB mutex so that it cannot be closed // until the caller has finished performing actions which will lead to changes // being persisted to the DB. // // For example, creating a volume first delegates to the provider to create the // volume and then persists to the DB, but if the DB ...
{ "resource": "" }
c27628
train
// Called to sync changes to disk when a volume is updated
{ "resource": "" }
c27629
train
// sets IP4 addr on link removing any existing ones first
{ "resource": "" }
c27630
train
// Parse parses RFC5424 syslog messages into a Message.
{ "resource": "" }
c27631
train
// Add adds an element to the Buffer. If the Buffer is already full, it removes // an existing message.
{ "resource": "" }
c27632
train
// Read returns a copied slice with the contents of the Buffer. It does not // modify the underlying buffer in any way. You are free to modify the // returned slice without affecting Buffer, though modifying the individual // elements in the result will also modify those elements in the Buffer.
{ "resource": "" }
c27633
train
// ReadAndSubscribe returns all buffered messages just like Read, and also // returns a channel that will stream new messages as they arrive.
{ "resource": "" }
c27634
train
// Subscribe returns a channel that sends all future messages added to the // Buffer. The returned channel is buffered, and any attempts to send new // messages to the channel will drop messages if the channel is full. // // The caller closes the donec channel to stop receiving messages.
{ "resource": "" }
c27635
train
// _read expects b.mu to already be locked
{ "resource": "" }
c27636
train
// _subscribe assumes b.mu is already locked
{ "resource": "" }
c27637
train
// NewClient creates a new Client pointing at uri and using key for // authentication.
{ "resource": "" }
c27638
train
// NewClientWithConfig acts like NewClient, but supports custom configuration.
{ "resource": "" }
c27639
train
// NewServerCodec returns a new rpc.ServerCodec using JSON-RPC on conn.
{ "resource": "" }
c27640
train
// ServeConnWithContext is like ServeConn but it allows to pass a // connection context to the RPC methods.
{ "resource": "" }
c27641
train
// CloseDB closes the persistence DB, waiting for the state to be fully // released first.
{ "resource": "" }
c27642
train
// Acquire acquires the state for use by incrementing s.dbUsers, which prevents // the state DB being closed until the caller has finished performing actions // which will lead to changes being persisted to the DB. // // For example, running a job starts the job and then persists the change of // state, but if the DB i...
{ "resource": "" }
c27643
train
// Release releases the state by decrementing s.dbUsers, broadcasting the // condition variable if no users are left to wake CloseDB.
{ "resource": "" }
c27644
train
// GetEntrypoint returns an image entrypoint for a process type from a list of // artifacts, first iterating through them and returning any entrypoint having // the exact type, then iterating through them and returning the artifact's // default entrypoint if it has one. // // The artifacts are traversed in reverse orde...
{ "resource": "" }
c27645
train
// SetupMountspecs populates job.Mountspecs using the layers from a list of // Flynn image artifacts, expecting each artifact to have a single rootfs entry // containing squashfs layers
{ "resource": "" }
c27646
train
// IsScaleDownOf returns whether a diff is the complete scale down of any // process types in the given processes
{ "resource": "" }
c27647
train
// RectifyOmni updates the process counts for omni jobs by multiplying them by // the host count, returning whether or not any counts have changed
{ "resource": "" }
c27648
train
// Diff returns the diff between the given running processes and what is // expected to be running for the formation
{ "resource": "" }
c27649
train
// updateTUFClient updates the given client, initializing and re-running the // update if ErrNoRootKeys is returned.
{ "resource": "" }
c27650
train
// Tags returns the tags for the job's process type from the formation
{ "resource": "" }
c27651
train
// TagsMatchHost checks whether all of the job's tags match the corresponding // host's tags
{ "resource": "" }
c27652
train
// WithFormationAndType returns a list of jobs which belong to the given // formation and have the given type, ordered with the most recently started // job first
{ "resource": "" }
c27653
train
// Follow starts a goroutine that reads log lines from the reader into the mux. // It runs until the reader is closed or an error occurs. If an error occurs, // the reader may still be open.
{ "resource": "" }
c27654
train
// jobDoneCh returns a channel that is closed when all of the streams we are // following from the job have been closed. It will never unblock if the job has // already finished.
{ "resource": "" }
c27655
train
// logFiles returns a list of app IDs and the list of log file names associated // with them, from oldest to newest. There is always at least one file, the // current log for the app.
{ "resource": "" }
c27656
train
// Release releases the app log, when the last job releases an app log, it is // closed.
{ "resource": "" }
c27657
train
// insert a new route into the tree, replacing entry if it exists
{ "resource": "" }
c27658
train
// lookup returns the best match for a given path
{ "resource": "" }
c27659
train
// slices string into path segments performing 0 heap allocation
{ "resource": "" }
c27660
train
// Notify filters the event based on it's type and objectID and then pushes // it to the event queue.
{ "resource": "" }
c27661
train
// loop pops events off the queue and sends them to the Events channel.
{ "resource": "" }
c27662
train
// Close unsubscribes from the EventListener and stops the loop.
{ "resource": "" }
c27663
train
// CloseWithError sets the Err field and then closes the subscriber.
{ "resource": "" }
c27664
train
// Subscribe creates and returns an EventSubscriber for the given app, type and object. // Using an empty string for appID subscribes to all apps
{ "resource": "" }
c27665
train
// Unsubscribe unsubscribes the given subscriber.
{ "resource": "" }
c27666
train
// Listen creates a postgres listener for events and starts a goroutine to // forward the events to subscribers.
{ "resource": "" }
c27667
train
// Notify notifies all sbscribers of the given event.
{ "resource": "" }
c27668
train
// IsClosed returns whether or not the listener is closed.
{ "resource": "" }
c27669
train
// CloseWithError marks the listener as closed and closes all subscribers // with the given error.
{ "resource": "" }
c27670
train
// prepareMethod returns a methodType for the provided method or nil // in case if the method was unsuitable.
{ "resource": "" }
c27671
train
// ServeConnWithContext is like ServeConn but makes it possible to // pass a connection context to the RPC methods.
{ "resource": "" }
c27672
train
// ServeCodecWithContext is like ServeCodec but it makes it possible // to pass a connection context to the RPC methods.
{ "resource": "" }
c27673
train
// Accept accepts connections on the listener and serves requests // for each incoming connection. Accept blocks; the caller typically // invokes it in a go statement.
{ "resource": "" }
c27674
train
// ServeHTTP implements an http.Handler that answers RPC requests.
{ "resource": "" }
c27675
train
// Backup returns a reader for streaming a backup in xbstream format.
{ "resource": "" }
c27676
train
// Restore restores the database from an xbstream backup.
{ "resource": "" }
c27677
train
// DSN returns the data source name for connecting to the local process as the "flynn" user.
{ "resource": "" }
c27678
train
// XLogPosition returns the current XLogPosition of node specified by DSN.
{ "resource": "" }
c27679
train
// installDB initializes the data directory for a new database.
{ "resource": "" }
c27680
train
// Close waits for the backup command to finish and verifies that the backup completed successfully.
{ "resource": "" }
c27681
train
// Read reads n bytes of backup data into p.
{ "resource": "" }
c27682
train
// discoverdDial is a discoverd aware dialer which resolves a discoverd host to // an address using the configured discoverd client as the host is likely not // using discoverd to resolve DNS queries
{ "resource": "" }
c27683
train
// NewPostgresDataStore returns a DataStore that stores route information in a // Postgres database. It uses pg_notify and a listener connection to watch for // route changes.
{ "resource": "" }
c27684
train
// updateImageIDs updates REDIS_IMAGE_ID, SLUGBUILDER_IMAGE_ID and // SLUGRUNNER_IMAGE_ID if they are set and have an old ID, and also // replaces the legacy REDIS_IMAGE_URI, SLUGBUILDER_IMAGE_URI and // SLUGRUNNER_IMAGE_URI
{ "resource": "" }
c27685
train
// Increment increments an xlog position by the given number.
{ "resource": "" }
c27686
train
// parse takes an xlog position emitted by postgres and returns an array of two // integers representing the filepart and offset components of the xlog // position. This is an internal representation that should not be exposed // outside of this package.
{ "resource": "" }
c27687
train
// MakePosition constructs an xlog position string from a numeric file part and // offset.
{ "resource": "" }
c27688
train
// Parses JobID and ProcType from header ProcID field // Always returns JobID, returns ProcType if available
{ "resource": "" }
c27689
train
// CheckScale examines sirenia cluster formation to check if cluster // has been scaled up yet. // Returns true if scaled, false if not.
{ "resource": "" }
c27690
train
// Launch starts a new worker process. The worker subscribes // to the default queue and processes incoming registered tasks
{ "resource": "" }
c27691
train
// LaunchAsync is a non blocking version of Launch
{ "resource": "" }
c27692
train
// retryTask decrements RetryCount counter and republishes the task to the queue
{ "resource": "" }
c27693
train
// taskSucceeded updates the task state and triggers success callbacks or a // chord callback if this was the last task of a group with a chord callback
{ "resource": "" }
c27694
train
// taskFailed updates the task state and triggers error callbacks
{ "resource": "" }
c27695
train
// Returns true if the worker uses AMQP backend
{ "resource": "" }
c27696
train
// Connect opens a connection to RabbitMQ, declares an exchange, opens a channel, // declares and binds the queue and enables publish notifications
{ "resource": "" }
c27697
train
// DeleteQueue deletes a queue by name
{ "resource": "" }
c27698
train
// InspectQueue provides information about a specific queue
{ "resource": "" }
c27699
train
// Open new RabbitMQ connection
{ "resource": "" }