ref

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 2 Imported by: 40

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.

Directories

Path Synopsis
aws module
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.
principal/caveatflag
Package caveatflag provides support for specifying caveats via command line flags and for creating caveats via their VDL type and values.
Package caveatflag provides support for specifying caveats via command line flags and for creating caveats via their VDL type and values.
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.
vdl/gotagtest
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
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.
vrpc/internal
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
examples module
reflectutil
Package reflectutil provides reflection-based utilities.
Package reflectutil provides reflection-based utilities.
logger Module
lib
apilog
Package apilog provides functions to be used in conjunction with logcop.
Package apilog provides functions to be used in conjunction with logcop.
discovery
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
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
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
security/internal/lockedfile
Package lockedfile creates and manipulates files whose contents should only change atomically.
Package lockedfile creates and manipulates files whose contents should only change atomically.
security/internal/lockedfile/filelock
Package filelock provides a platform-independent API for advisory file locking.
Package filelock provides a platform-independent API for advisory file locking.
security/keys
Package keys provides support for working with an extensible set of cryptographic keys.
Package keys provides support for working with an extensible set of cryptographic keys.
security/keys/indirectkeyfiles
Package indirectkeyfiles provides support for key files whose contents refer to another keyfile.
Package indirectkeyfiles provides support for key files whose contents refer to another keyfile.
security/keys/sshkeys
Package sshkeys provides support for using ssh keys with the security/keys package, including private keys hosted within an ssh agent.
Package sshkeys provides support for using ssh keys with the security/keys package, including private keys hosted within an ssh agent.
security/keys/x509keys
Package x509 provides support for using x509/ssl keys with the security/keys package.
Package x509 provides support for using x509/ssl keys with the security/keys package.
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.
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/internal/vdltestutil
Package vdltestutil provides testing utilities for v.io/x/ref/lib/vdl/...
Package vdltestutil provides testing utilities for v.io/x/ref/lib/vdl/...
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/library/internal/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.
factories/library/internal/notpreparsed
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.
factories/library/internal/preparsed
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.
factories/library/internal/withflags
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.
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.
internal/cloudvm
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.
internal/flow/cipher/aead
Package aead provides a block cipher using aead.GCM with AES 256 encryption.
Package aead provides a block cipher using aead.GCM with AES 256 encryption.
internal/flow/cipher/naclbox
Package naclbox provides a block cipher using nacl/{box,secretbox}
Package naclbox provides a block cipher using nacl/{box,secretbox}
internal/flow/conn
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
internal/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.
internal/lib/bqueue/drrqueue
Package drrqueue implements a deficit round-robin buffer queue.
Package drrqueue implements a deficit round-robin buffer queue.
internal/lib/dependency
Package dependency keeps track of a dependency graph.
Package dependency keeps track of a dependency graph.
internal/lib/deque
Package deque implements a deque using a circular array.
Package deque implements a deque using a circular array.
internal/lib/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.
internal/lib/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.
internal/lib/sync
Package sync provides synchronization primitives.
Package sync provides synchronization primitives.
internal/lib/upcqueue
Package upcqueue implements an unbounded producer/consumer queue.
Package upcqueue implements an unbounded producer/consumer queue.
internal/naming
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.
internal/rpc/stress
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
Usage:
internal/rpc/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.
internal/rpc/stress/stressd
Command stressd runs the stress-test server.
Command stressd runs the stress-test server.
internal/rpc/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.
internal/test/concurrency
Package concurrency implements a framework for systematic testing of concurrent vanadium Go programs.
Package concurrency implements a framework for systematic testing of concurrent vanadium Go programs.
protocols/bidi
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
protocols/lib/framer
Package framer provides the ability to wrap a network connection (or any io.ReadWriteCloser) with framing that consists of a 3-byte length followed by data of that length.
Package framer provides the ability to wrap a network connection (or any io.ReadWriteCloser) with framing that consists of a 3-byte length followed by data of that length.
protocols/lib/tcputil
package tcputil contains functions commonly used to manipulate TCP connections.
package tcputil contains functions commonly used to manipulate TCP connections.
protocols/lib/websocket
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
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
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.
identity
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
internal/dirprinter
Package dirprinter contains utilities for dumping the contents and structure of a directory tree.
Package dirprinter contains utilities for dumping the contents and structure of a directory tree.
internal/logreaderlib
Package logreaderlib implements the LogFile interface from v.io/v23/services/logreader, which can be used to allow remote access to log files, and the ChildrenGlobber interface from v.io/v23/rpc to find the files in a logs directory.
Package logreaderlib implements the LogFile interface from v.io/v23/services/logreader, which can be used to allow remote access to log files, and the ChildrenGlobber interface from v.io/v23/rpc to find the files in a logs directory.
internal/multipart
Package multipart implements an http.File that acts as one logical file backed by several physical files (the 'parts').
Package multipart implements an http.File that acts as one logical file backed by several physical files (the 'parts').
internal/pproflib
Package pproflib defines a client-side proxy and server-side implementation of the v.io/v23/services/pprof interface.
Package pproflib defines a client-side proxy and server-side implementation of the v.io/v23/services/pprof interface.
internal/statslib
Package statslib implements the Stats interface from v.io/v23/services/stats.
Package statslib implements the Stats interface from v.io/v23/services/stats.
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.
stats
This file was auto-generated by the vanadium vdl tool.
This file was auto-generated by the vanadium vdl tool.
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.
compatibility
Package compatibility provides support for compatibility testing between different versions of vanadium.
Package compatibility provides support for compatibility testing between different versions of vanadium.
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.

Jump to

Keyboard shortcuts

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