runtime

package
v0.0.0-...-65440e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package runtime exposes information about the resource usage of the application. It also provides a way to run code in a new background context of a module.

This package does not work on App Engine "flexible environment".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunInBackground

func RunInBackground(c context.Context, f func(c context.Context)) error

RunInBackground runs f in a background goroutine in this process. f is provided a context that may outlast the context provided to RunInBackground. This is only valid to invoke from a service set to basic or manual scaling.

Types

type Statistics

type Statistics struct {
	// CPU records the CPU consumed by this instance, in megacycles.
	CPU struct {
		Total   float64
		Rate1M  float64 // consumption rate over one minute
		Rate10M float64 // consumption rate over ten minutes
	}
	// RAM records the memory used by the instance, in megabytes.
	RAM struct {
		Current    float64
		Average1M  float64 // average usage over one minute
		Average10M float64 // average usage over ten minutes
	}
}

Statistics represents the system's statistics.

func Stats

func Stats(c context.Context) (*Statistics, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL