Documentation
¶
Index ¶
- func CloudVMPublicAddress() *net.IPAddr
- func ConfigureGlobalLoggerFromFlags() error
- func HasPublicIP(log logging.Logger) bool
- func InitCloudVM() error
- func NewAddressChooser(logger logging.Logger) rpc.AddressChooser
- func ParseFlags(f *flags.Flags) error
- func ParseFlagsAndConfigureGlobalLogger(f *flags.Flags) error
- type IPAddressChooser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudVMPublicAddress ¶
CloudVMPublicAddress returns the public IP address of the Cloud VM instance it is run from, or nil if run from anywhere else. The returned address is the public address of a 1:1 NAT tunnel to this host.
func ConfigureGlobalLoggerFromFlags ¶
func ConfigureGlobalLoggerFromFlags() error
ConfigureGlobalLoggerFromFlags configures the global logger from command line flags. Should be called immediately after ParseFlags.
func HasPublicIP ¶
HasPublicIP returns true if the host has at least one public IP address.
func InitCloudVM ¶
func InitCloudVM() error
InitCloudVM initializes the CloudVM metadata.
If EnvExpectGoogleComputeEngine is set, this function returns after the initialization is done. Otherwise, the initialization is done asynchronously and future calls to CloudVMPublicAddress() will block until the initialization is complete.
Returns an error if EnvExpectGoogleComputeEngine is set and the metadata server is inaccessible.
func NewAddressChooser ¶
func NewAddressChooser(logger logging.Logger) rpc.AddressChooser
NewAddressChooser will return the public IP of process if the process is being hosted by a cloud service provider (e.g. Google Compute Engine, Amazon EC2), and if not will be the same as IPAddressChooser.
func ParseFlags ¶
ParseFlags parses all registered flags taking into account overrides from other configuration and environment variables. It must be called by the profile and flags.RuntimeFlags() must be passed to the runtime initialization function. The profile can use or modify the flags as it pleases.
func ParseFlagsAndConfigureGlobalLogger ¶
ParseFlagsAndConfigurGlobalLogger calls ParseFlags and then ConfigureGlobalLoggerFromFlags.
Types ¶
type IPAddressChooser ¶
type IPAddressChooser struct{}
IPAddressChooser returns the preferred IP address, which is, a public IPv4 address, then any non-loopback IPv4, then a public IPv6 address and finally any non-loopback/link-local IPv6
func (IPAddressChooser) ChooseAddresses ¶
Directories
¶
Path | Synopsis |
---|---|
Package cloudvm provides functions to test whether the current process is running on Google Compute Engine or Amazon Web Services, and to extract settings from this environment.
|
Package cloudvm provides functions to test whether the current process is running on Google Compute Engine or Amazon Web Services, and to extract settings from this environment. |
lib
|
|
bqueue
Package bqueue implements several kinds of buffer queues, as a N-writer, 1-reader queue.
|
Package bqueue implements several kinds of buffer queues, as a N-writer, 1-reader queue. |
bqueue/drrqueue
Package drrqueue implements a deficit round-robin buffer queue.
|
Package drrqueue implements a deficit round-robin buffer queue. |
dependency
Package dependency keeps track of a dependency graph.
|
Package dependency keeps track of a dependency graph. |
deque
Package deque implements a deque using a circular array.
|
Package deque implements a deque using a circular array. |
iobuf
Package iobuf performs explicit memory management for data buffers used to perform network IO.
|
Package iobuf performs explicit memory management for data buffers used to perform network IO. |
pcqueue
A producer/consumer queue is a concurrent bounded buffer supporting multiple concurrent producers and consumers, with timeouts.
|
A producer/consumer queue is a concurrent bounded buffer supporting multiple concurrent producers and consumers, with timeouts. |
sync
Package sync provides synchronization primitives.
|
Package sync provides synchronization primitives. |
upcqueue
Package upcqueue implements an unbounded producer/consumer queue.
|
Package upcqueue implements an unbounded producer/consumer queue. |
Package naming provides an implementation of the interfaces in v.io/v23/naming.
|
Package naming provides an implementation of the interfaces in v.io/v23/naming. |
benchmark
package benchmark provides simple tools to measure the performance of the IPC system.
|
package benchmark provides simple tools to measure the performance of the IPC system. |
benchmark/benchmark
Command benchmark runs the benchmark client.
|
Command benchmark runs the benchmark client. |
benchmark/benchmarkd
Command benchmarkd runs the benchmark server.
|
Command benchmarkd runs the benchmark server. |
stress/mtstress
Usage: mtstress [flags] <command> The mtstress commands are: mount Measure latency of the Mount RPC at a fixed request rate resolve Measure latency of the Resolve RPC at a fixed request rate help Display help for commands or topics The global flags are: -duration=10s Duration for sending test traffic and measuring latency -rate=1 Rate, in RPCs per second, to send to the test server -reauthenticate=false If true, establish a new authenticated connection for each RPC, simulating load from a distinct process -alsologtostderr=true log to standard error as well as files -log_backtrace_at=:0 when logging hits line file:N, emit a stack trace -log_dir= if non-empty, write log files to this directory -logtostderr=false log to standard error instead of files -max_stack_buf_size=4292608 max size in bytes of the buffer to use for logging stack traces -metadata=<just specify -metadata to activate> Displays metadata for the program and exits.
|
Usage: mtstress [flags] <command> The mtstress commands are: mount Measure latency of the Mount RPC at a fixed request rate resolve Measure latency of the Resolve RPC at a fixed request rate help Display help for commands or topics The global flags are: -duration=10s Duration for sending test traffic and measuring latency -rate=1 Rate, in RPCs per second, to send to the test server -reauthenticate=false If true, establish a new authenticated connection for each RPC, simulating load from a distinct process -alsologtostderr=true log to standard error as well as files -log_backtrace_at=:0 when logging hits line file:N, emit a stack trace -log_dir= if non-empty, write log files to this directory -logtostderr=false log to standard error instead of files -max_stack_buf_size=4292608 max size in bytes of the buffer to use for logging stack traces -metadata=<just specify -metadata to activate> Displays metadata for the program and exits. |
stress/stress
Command stress is a tool to stress/load test RPC by issuing randomly generated requests.
|
Command stress is a tool to stress/load test RPC by issuing randomly generated requests. |
stress/stressd
Command stressd runs the stress-test server.
|
Command stressd runs the stress-test server. |
test
package test contains test for rpc code that do not rely on unexposed rpc declarations.
|
package test contains test for rpc code that do not rely on unexposed rpc declarations. |
testing
|
|
Package vtrace implements the Trace and Span interfaces in v.io/v23/vtrace.
|
Package vtrace implements the Trace and Span interfaces in v.io/v23/vtrace. |