Namespace: go.std.expvar
v1.0Contents
Summary
Provides a low-level interface to the expvar package.
Package expvar provides a standardized interface to public variables, such
as operation counters in servers. It exposes these variables via HTTP at
/debug/vars in JSON format.
Operations to set or modify these public variables are atomic.
In addition to adding the HTTP handler, this package registers the
following variables:
cmdline os.Args
memstats runtime.Memstats
The package is sometimes only imported for the side effect of
registering its HTTP handler and the above variables. To use it
this way, link this package into your program:
import _ "expvar"
Index
- *Float
- *Func
- *Int
- *KeyValue
- *Map
- *String
- Float
- Func
- Get
- Handler
- Int
- KeyValue
- Map
- NewFloat
- NewInt
- NewMap
- NewString
- Publish
- String
- Var
- arrayOfFloat
- arrayOfFunc
- arrayOfInt
- arrayOfKeyValue
- arrayOfMap
- arrayOfString
- arrayOfVar
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
(None.)
Functions, Macros, and Special Forms
-
Get
Function v1.0(Get name)
Get retrieves a named exported variable. It returns nil if the name has
not been registered.
Go input arguments: (name string)
Go returns: Var
Joker input arguments: [^String name]
Joker returns: ^Var -
Handler
Function v1.0(Handler)
Handler returns the expvar HTTP Handler.
This is only needed to install the handler in a non-standard location.
Go returns: net/http.Handler
Joker input arguments: []
Joker returns: ^go.std.net.http/Handler -
NewFloat
Function v1.0(NewFloat name)
Go input arguments: (name string)
Go returns: *Float
Joker input arguments: [^String name]
Joker returns: ^*Float -
NewInt
Function v1.0(NewInt name)
Go input arguments: (name string)
Go returns: *Int
Joker input arguments: [^String name]
Joker returns: ^*Int -
NewMap
Function v1.0(NewMap name)
Go input arguments: (name string)
Go returns: *Map
Joker input arguments: [^String name]
Joker returns: ^*Map -
NewString
Function v1.0(NewString name)
Go input arguments: (name string)
Go returns: *String
Joker input arguments: [^String name]
Joker returns: ^*String -
Publish
Function v1.0(Publish name v)
Publish declares a named exported variable. This should be called from a
package's init function when it creates its Vars. If the name is already
registered then this will log.Panic.
Go input arguments: (name string, v Var)
Joker input arguments: [^String name, ^Var v]
Types
-
*Float
Concrete Type v1.0Float is a 64-bit float variable that satisfies the Var interface.
-
Add
Receiver for *Float v1.0([delta])
Add adds delta to v.
-
Set
Receiver for *Float v1.0([value])
Set sets v to value.
-
String
Receiver for *Float v1.0([])
-
Value
Receiver for *Float v1.0([])
-
*Func
Concrete Type v1.0Func implements Var by calling the function
and formatting the returned value using JSON.
-
*Int
Concrete Type v1.0Int is a 64-bit integer variable that satisfies the Var interface.
-
Add
Receiver for *Int v1.0([delta])
-
Set
Receiver for *Int v1.0([value])
-
String
Receiver for *Int v1.0([])
-
Value
Receiver for *Int v1.0([])
-
*KeyValue
Concrete Type v1.0KeyValue represents a single entry in a Map.
-
*Map
Concrete Type v1.0Map is a string-to-Var map variable that satisfies the Var interface.
-
Add
Receiver for *Map v1.0([key delta])
Add adds delta to the *Int value stored under the given map key.
-
AddFloat
Receiver for *Map v1.0([key delta])
AddFloat adds delta to the *Float value stored under the given map key.
-
Delete
Receiver for *Map v1.0([key])
Delete deletes the given key from the map.
-
Get
Receiver for *Map v1.0([key])
-
Init
Receiver for *Map v1.0([])
Init removes all keys from the map.
-
Set
Receiver for *Map v1.0([key av])
-
String
Receiver for *Map v1.0([])
-
*String
Concrete Type v1.0String is a string variable, and satisfies the Var interface.
-
Set
Receiver for *String v1.0([value])
-
String
Receiver for *String v1.0([])
String implements the Var interface. To get the unquoted string
use Value.
-
Value
Receiver for *String v1.0([])
-
Float
Concrete Type v1.0Float is a 64-bit float variable that satisfies the Var interface.
-
Func
Concrete Type v1.0Func implements Var by calling the function
and formatting the returned value using JSON.
-
String
Receiver for Func v1.0([])
-
Value
Receiver for Func v1.0([])
-
Int
Concrete Type v1.0Int is a 64-bit integer variable that satisfies the Var interface.
-
KeyValue
Concrete Type v1.0KeyValue represents a single entry in a Map.
-
Map
Concrete Type v1.0Map is a string-to-Var map variable that satisfies the Var interface.
-
String
Concrete Type v1.0String is a string variable, and satisfies the Var interface.
-
Var
Abstract Type v1.0Var is an abstract type for all exported variables.
-
String
Method for Var v1.0([])
-
arrayOfFloat
Concrete Type v1.0Float is a 64-bit float variable that satisfies the Var interface.
-
arrayOfFunc
Concrete Type v1.0Func implements Var by calling the function
and formatting the returned value using JSON.
-
arrayOfInt
Concrete Type v1.0Int is a 64-bit integer variable that satisfies the Var interface.
-
arrayOfKeyValue
Concrete Type v1.0KeyValue represents a single entry in a Map.
-
arrayOfMap
Concrete Type v1.0Map is a string-to-Var map variable that satisfies the Var interface.
-
arrayOfString
Concrete Type v1.0String is a string variable, and satisfies the Var interface.
-
arrayOfVar
Concrete Type v1.0Var is an abstract type for all exported variables.