ref

package
Version: v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: BSD-3-Clause Imports: 2 Imported by: 31

README

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.

Documentation

Overview

Package ref defines constants used through the Vanadium reference implementation, which is implemented in its subdirectories.

Index

Constants

View Source
const (
	// EnvCredentials is the name of the environment variable pointing to a
	// directory containing all the credentials of a principal (the blessing
	// store, the blessing roots, possibly the private key etc.).
	//
	// Typically only one of EnvCredentials or EnvAgentPath will be set in a
	// process. If both are set, then EnvCredentials takes preference.
	//
	// See v.io/x/ref/lib/security.CreatePersistentPrincipal.
	EnvCredentials = "V23_CREDENTIALS"

	// When set and non-empty, EnvCredentials is hosted on a read-only
	// filesystem.
	EnvCredentialsReadonlyFileSystem = "V23_CREDENTIALS_READONLY_FILESYSTEM"

	// EnvCredentialsNoLockDeprecated and V23_CREDENTIALS_NO_LOCK will
	// be removed in a subsequent release. This is essentially an alias
	// for V23_CREDENTIALS_READONLY_FILESYSTEM which should be used
	// instead.
	EnvCredentialsNoLockDeprecated = "V23_CREDENTIALS_NO_LOCK"

	// EnvCredentialsReloadInterval is the name of the environment variable
	// that specifies the interval between credentials reloads.
	EnvCredentialsReloadInterval = "V23_CREDENTIALS_RELOAD_INTERVAL"

	// EnvNamespacePrefix is the prefix of all environment variables that
	// define a namespace root.
	EnvNamespacePrefix = "V23_NAMESPACE"

	// EnvI18nCatalogueFiles is the name of the environment variable
	// pointing to a comma-separated list of i18n catalogue files to be
	// loaded at startup.
	EnvI18nCatalogueFiles = "V23_I18N_CATALOGUE"

	// EnvOAuthIdentityProvider is the name of the environment variable
	// pointing to the url of the OAuth identity provider used by the
	// principal seekblessings command.
	EnvOAuthIdentityProvider = "V23_OAUTH_IDENTITY_PROVIDER"

	// When EnvExpectGoogleComputeEngine is set and non-empty, the runtime
	// initialization will fail if the GCE metadata is inaccessible.
	// Deprecated: use V23_VIRTUALIZATION_PROVIDER instead.
	EnvExpectGoogleComputeEngine = "V23_EXPECT_GOOGLE_COMPUTE_ENGINE"

	// EnvVirtualizationProvider is the name of the environment variable
	// naming the virtualization/cloud provider that the process is
	// expected to be run under. It replaces EnvExpectGoogleComputeEngine.
	EnvVirtualizationProvider = "V23_VIRTUALIZATION_PROVIDER"

	// A comma-separated list of path names to export disk stats for.
	EnvSysStatsDiskPaths = "V23_SYS_STATS_DISK_PATHS"

	// When set and non-empty, the namespace client will not use caching.
	EnvDisableNamespaceCache = "V23_DISABLE_NS_CACHE"
)

Variables

This section is empty.

Functions

func EnvClearCredentials

func EnvClearCredentials() error

EnvClearCredentials unsets all environment variables that are used by the Runtime to initialize the principal.

func EnvNamespaceRoots

func EnvNamespaceRoots() (map[string]string, []string)

EnvNamespaceRoots returns the set of namespace roots to be used by the process, as specified by environment variables.

It returns both a map of environment variable name to value and the list of values.

func ReadonlyCredentialsDir added in v0.1.10

func ReadonlyCredentialsDir() (reason string, readonly bool)

ReadonlyCredentialsDir returns true if the credentials directory is to be treated as readonly, for example, because it exists on a read-only filesystem. Any attempt to write to this directory should result in an error. It also returns the reason that the directory is considered readonly, for now, the name of the environment variable that is used to indicate this.

Types

This section is empty.

Source Files

Directories

Path Synopsis
cmd
gclogs
Command gclogs safely deletes old log files.
Command gclogs safely deletes old log files.
mounttable
Command mounttable sends commands to Vanadium mounttable services.
Command mounttable sends commands to Vanadium mounttable services.
namespace
Command namespace resolves and manages names in the Vanadium namespace.
Command namespace resolves and manages names in the Vanadium namespace.
principal
Command principal creates and manages Vanadium principals and blessings.
Command principal creates and manages Vanadium principals and blessings.
uniqueid
Command uniqueid generates unique identifiers.
Command uniqueid generates unique identifiers.
vdl
Command vdl manages Vanadium Definition Language source code.
Command vdl manages Vanadium Definition Language source code.
vom
Command vom helps debug the Vanadium Object Marshaling wire protocol.
Command vom helps debug the Vanadium Object Marshaling wire protocol.
vrpc
Command vrpc sends and receives Vanadium remote procedure calls.
Command vrpc sends and receives Vanadium remote procedure calls.
examples
echo/echo
Command echo is a client for the Echo service.
Command echo is a client for the Echo service.
echo/echod
Command echo is a server for the Echo service.
Command echo is a server for the Echo service.
fortune
Package fortune defines the Fortune example interface.
Package fortune defines the Fortune example interface.
fortune/fortune
Command fortune is a client to the Fortune interface.
Command fortune is a client to the Fortune interface.
fortune/fortuned
Command fortuned runs a daemon that implements the Fortune interface.
Command fortuned runs a daemon that implements the Fortune interface.
noflags
An example using the 'library' factory which is configured via exported variables rather than by command line flags.
An example using the 'library' factory which is configured via exported variables rather than by command line flags.
rps
Package rps defines interfaces for playing the game Rock-Paper-Scissors.
Package rps defines interfaces for playing the game Rock-Paper-Scissors.
rps/rpsbot
Command rpsbot repeatedly runs automated games, implementing all three roles.
Command rpsbot repeatedly runs automated games, implementing all three roles.
rps/rpsplayer
Command rpsplayer implements the Player interface, which enables a human to play the game.
Command rpsplayer implements the Player interface, which enables a human to play the game.
rps/rpsscorekeeper
Command rpsscorekeeper implements the ScoreKeeper interface.
Command rpsscorekeeper implements the ScoreKeeper interface.
tunnel
Package tunnel defines an interface for creating a network tunnel from client to server.
Package tunnel defines an interface for creating a network tunnel from client to server.
tunnel/tunneld
Command tunneld runs the tunneld daemon, which implements the Tunnel interface.
Command tunneld runs the tunneld daemon, which implements the Tunnel interface.
tunnel/vsh
Command vsh runs the Vanadium shell, a Tunnel client that can be used to run shell commands or start an interactive shell on a remote tunneld server.
Command vsh runs the Vanadium shell, a Tunnel client that can be used to run shell commands or start an interactive shell on a remote tunneld server.
lib
apilog
Package apilog provides functions to be used in conjunction with logcop.
Package apilog provides functions to be used in conjunction with logcop.
aws/vxray
Package vxray integrates amazon's xray distributed tracing system with vanadium's vtrace.
Package vxray integrates amazon's xray distributed tracing system with vanadium's vtrace.
discovery/global
TODO(jhahn): This is an experimental work to see its feasibility and set the long-term goal, and can be changed without notice.
TODO(jhahn): This is an experimental work to see its feasibility and set the long-term goal, and can be changed without notice.
discovery/plugins/loopback
Package loopback implements loopback plugin for discovery service.
Package loopback implements loopback plugin for discovery service.
discovery/plugins/mdns
Package mdns implements mDNS plugin for discovery service.
Package mdns implements mDNS plugin for discovery service.
discovery/plugins/vine
Package vine contains a discovery plugin that is using Vine protocol.
Package vine contains a discovery plugin that is using Vine protocol.
discovery/test
package test contains tests that rely on a fake runtime.
package test contains tests that rely on a fake runtime.
discovery/testutil
Package testutil defines helpers for discovery tests.
Package testutil defines helpers for discovery tests.
exec
Package exec implements configuration and secret-sharing between parent and child processes via anoymous pipes.
Package exec implements configuration and secret-sharing between parent and child processes via anoymous pipes.
flags
Package flags implements utilities to augment the standard Go flag package.
Package flags implements utilities to augment the standard Go flag package.
publisher
Package publisher provides a type to publish names to a mounttable.
Package publisher provides a type to publish names to a mounttable.
pubsub
Package pubsub defines interfaces for accessing dynamically changing process configuration information.
Package pubsub defines interfaces for accessing dynamically changing process configuration information.
security
Package security implements utilities for creating and using Vanadium security primitives.
Package security implements utilities for creating and using Vanadium security primitives.
security/audit
Package audit implements a mechanism for writing auditable events to an audit log.
Package audit implements a mechanism for writing auditable events to an audit log.
security/bcrypter
Package bcrypter defines the mechanisms for blessings based encryption and decryption.
Package bcrypter defines the mechanisms for blessings based encryption and decryption.
security/passphrase
Package passphrase contains utilities for reading a passphrase.
Package passphrase contains utilities for reading a passphrase.
security/securityflag
Package securityflag implements utilities for creating security objects based on flags.
Package securityflag implements utilities for creating security objects based on flags.
security/serialization
Package serialization implements utilities for reading and writing data with signature-based integrity checking.
Package serialization implements utilities for reading and writing data with signature-based integrity checking.
security/signing/keyfile
Package keyfile provides a signing service that uses files to store keys.
Package keyfile provides a signing service that uses files to store keys.
security/signing/sshagent
Package sshagent provides the ability to use openssh's ssh-agent to carry out key signing operations using keys stored therein.
Package sshagent provides the ability to use openssh's ssh-agent to carry out key signing operations using keys stored therein.
signals
Package signals implements utilities for managing process shutdown with support for signal-handling.
Package signals implements utilities for managing process shutdown with support for signal-handling.
slang
Package slang provides a simple, type checked scripting language.
Package slang provides a simple, type checked scripting language.
stats
Package stats implements a global repository of stats objects.
Package stats implements a global repository of stats objects.
stats/counter
Package counter implements counters that keeps track of their recent values over different periods of time.
Package counter implements counters that keeps track of their recent values over different periods of time.
stats/histogram
Package histogram implements a basic histogram to keep track of data distribution.
Package histogram implements a basic histogram to keep track of data distribution.
stats/sysstats
Package sysstats implements system statistics and updates them periodically.
Package sysstats implements system statistics and updates them periodically.
timekeeper
Package timekeeper defines an interface to allow switching between real time and simulated time.
Package timekeeper defines an interface to allow switching between real time and simulated time.
v23cmd
Package v23cmd implements utilities for running v23 cmdline programs.
Package v23cmd implements utilities for running v23 cmdline programs.
vdl/build
Package build implements utilities to collect VDL build information and run the parser and compiler.
Package build implements utilities to collect VDL build information and run the parser and compiler.
vdl/codegen
Package codegen implements utilities for VDL code generators.
Package codegen implements utilities for VDL code generators.
vdl/codegen/golang
Package golang implements Go code generation from compiled VDL packages.
Package golang implements Go code generation from compiled VDL packages.
vdl/codegen/java
Package java implements Java code generation from compiled VDL packages.
Package java implements Java code generation from compiled VDL packages.
vdl/codegen/javascript
Package javascript implements Javascript code generation from compiled VDL packages.
Package javascript implements Javascript code generation from compiled VDL packages.
vdl/codegen/json
Package json implements JSON generation for VDL const values.
Package json implements JSON generation for VDL const values.
vdl/codegen/swift
Package swift implements Swift code generation from compiled VDL packages.
Package swift implements Swift code generation from compiled VDL packages.
vdl/codegen/vdlgen
Package vdlgen implements VDL code generation from compiled VDL packages.
Package vdlgen implements VDL code generation from compiled VDL packages.
vdl/compile
Package compile implements the VDL compiler, converting a parse tree into compiled results.
Package compile implements the VDL compiler, converting a parse tree into compiled results.
vdl/opconst
Package opconst defines the representation and operations for VDL constants.
Package opconst defines the representation and operations for VDL constants.
vdl/parse
Package parse implements the VDL parser, converting source files into a parse tree.
Package parse implements the VDL parser, converting source files into a parse tree.
vdl/vdlutil
Package vdlutil implements utilities used by many VDL components.
Package vdlutil implements utilities used by many VDL components.
vtrace
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.
Package runtime and its subdirectories provide implementations of the Vanadium runtime for different runtime environments.
Package runtime and its subdirectories provide implementations of the Vanadium runtime for different runtime environments.
factories/fake
Package fake implements a fake RuntimeFactory, useful in tests for mocking out certain components.
Package fake implements a fake RuntimeFactory, useful in tests for mocking out certain components.
factories/generic
Package generic implements a RuntimeFactory that is useful in tests.
Package generic implements a RuntimeFactory that is useful in tests.
factories/library
Package library implements a RuntimeFactory suitable for building a Vanadium library that is linked into other applications.
Package library implements a RuntimeFactory suitable for building a Vanadium library that is linked into other applications.
factories/roaming
Package roaming implements a RuntimeFactory suitable for a variety of network configurations, including 1-1 NATs, dhcp auto-configuration, Amazon Web Services and Google Compute Engine.
Package roaming implements a RuntimeFactory suitable for a variety of network configurations, including 1-1 NATs, dhcp auto-configuration, Amazon Web Services and Google Compute Engine.
factories/static
Package static implements a RuntimeFactory suitable for a variety of network configurations, including 1-1 NATs, Amazon Web Services and Google Compute Engine but hosted on a static IP address with no support for adapting to dhcp changes.
Package static implements a RuntimeFactory suitable for a variety of network configurations, including 1-1 NATs, Amazon Web Services and Google Compute Engine but hosted on a static IP address with no support for adapting to dhcp changes.
protocols/lib/tcputil
package tcputil contains functions commonly used to manipulate TCP connections.
package tcputil contains functions commonly used to manipulate TCP connections.
protocols/vine
Package vine contains Vanadium's Implementation of Network Emulation (VINE).
Package vine contains Vanadium's Implementation of Network Emulation (VINE).
protocols/wsh
Package wsh registers the websocket 'hybrid' protocol.
Package wsh registers the websocket 'hybrid' protocol.
protocols/wsh_nacl
Package wsh_nacl registers the websocket 'hybrid' protocol for nacl architectures.
Package wsh_nacl registers the websocket 'hybrid' protocol for nacl architectures.
services
ben
Package ben defines datastructures to archive microbenchmark results.
Package ben defines datastructures to archive microbenchmark results.
ben/archive
Package archive defines the RPC interface for archiving benchmark results.
Package archive defines the RPC interface for archiving benchmark results.
ben/benarchd
Command benarchd implements a benchmark archival daemon.
Command benarchd implements a benchmark archival daemon.
debug/debug
Command debug supports debugging Vanadium servers.
Command debug supports debugging Vanadium servers.
debug/debug/browseserver
Package browseserver provides a web interface that can be used to interact with the vanadium debug interface.
Package browseserver provides a web interface that can be used to interact with the vanadium debug interface.
debug/debuglib
Package debuglib implements debug server support.
Package debuglib implements debug server support.
discharger
Package discharger defines an interface for obtaining discharges for third-party caveats.
Package discharger defines an interface for obtaining discharges for third-party caveats.
groups/groups
Command groups creates and manages Vanadium groups of blessing patterns.
Command groups creates and manages Vanadium groups of blessing patterns.
groups/groupsd
Daemon groupsd implements the v.io/v23/services/groups interfaces for managing access control groups.
Daemon groupsd implements the v.io/v23/services/groups interfaces for managing access control groups.
identity
Package identity defines interfaces for Vanadium identity providers.
Package identity defines interfaces for Vanadium identity providers.
identity/identityd
Command identityd runs a daemon HTTP server that uses OAuth to create security.Blessings objects.
Command identityd runs a daemon HTTP server that uses OAuth to create security.Blessings objects.
identity/identitylib
Package identitylib implements a test identityd service registered using the v.io/x/lib/gosh library.
Package identitylib implements a test identityd service registered using the v.io/x/lib/gosh library.
mounttable/mounttabled
Command mounttabled runs the mount table daemon, which implements the v.io/v23/services/mounttable interfaces.
Command mounttabled runs the mount table daemon, which implements the v.io/v23/services/mounttable interfaces.
mounttable/mounttablelib
Package mounttablelib implements utilities for mounttable implementations.
Package mounttablelib implements utilities for mounttable implementations.
role
Package role defines an interface for requesting blessings from a role account server.
Package role defines an interface for requesting blessings from a role account server.
role/roled
Command roled runs the Role interface daemon.
Command roled runs the Role interface daemon.
stats
Packages stats defines the non-native types exported by the stats service.
Packages stats defines the non-native types exported by the stats service.
xproxy
Package xproxy enables services to export (proxy) themselves across networks (behind NATs for example).
Package xproxy enables services to export (proxy) themselves across networks (behind NATs for example).
xproxy/xproxy
Package xproxy contains the implementation of the proxy service.
Package xproxy contains the implementation of the proxy service.
xproxy/xproxyd
Command proxyd is a daemon that listens for connections from Vanadium services (typically behind NATs) and proxies these services to the outside world.
Command proxyd is a daemon that listens for connections from Vanadium services (typically behind NATs) and proxies these services to the outside world.
Package test implements initialization for unit and integration tests.
Package test implements initialization for unit and integration tests.
basics
Package basics implements some benchmarks for important basic operations in go.
Package basics implements some benchmarks for important basic operations in go.
benchmark
Package benchmark implements utilities to augment the standard Go testing.Benchmark functionality.
Package benchmark implements utilities to augment the standard Go testing.Benchmark functionality.
expect
Package expect implements support for checking expectations against a buffered input stream.
Package expect implements support for checking expectations against a buffered input stream.
hello
Package hello defines a simple client and server and uses them in a series of regression tests.
Package hello defines a simple client and server and uses them in a series of regression tests.
hello/helloclient
Command helloclient is a simple client mainly used in regression tests.
Command helloclient is a simple client mainly used in regression tests.
hello/helloserver
Command helloserver is a simple server mainly used in regression tests.
Command helloserver is a simple server mainly used in regression tests.
testutil
Package testutil implements utilities for unit and integration tests.
Package testutil implements utilities for unit and integration tests.
timekeeper
Package timekeeper implements simulated time against the v.io/x/ref/lib/timekeeper.TimeKeeper interface.
Package timekeeper implements simulated time against the v.io/x/ref/lib/timekeeper.TimeKeeper interface.
v23test
Package v23test defines Shell, a wrapper around gosh.Shell that provides Vanadium-specific functionality such as credentials management, StartRootMountTable, and StartSyncbase.
Package v23test defines Shell, a wrapper around gosh.Shell that provides Vanadium-specific functionality such as credentials management, StartRootMountTable, and StartSyncbase.
reflectutil
Package reflectutil provides reflection-based utilities.
Package reflectutil provides reflection-based utilities.
logger Module

Jump to

Keyboard shortcuts

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