localstorage

package
v0.0.0-...-a002913 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TODO(axw) 2013-09-25 bug #1230131
	// Move these variables out of agent when we can do upgrades in
	// the right place. In this case, the local provider should do
	// the envvar-to-agent.conf migration.
	StorageDir       = agent.StorageDir
	StorageAddr      = agent.StorageAddr
	StorageCACert    = "StorageCACert"
	StorageCAKey     = "StorageCAKey"
	StorageHostnames = "StorageHostnames"
	StorageAuthKey   = "StorageAuthKey"
)

Variables

This section is empty.

Functions

func NewWorker

func NewWorker(config agent.Config) worker.Worker

func StoreConfig

func StoreConfig(storageConfig LocalStorageConfig) (map[string]string, error)

StoreConfig takes a LocalStorageConfig (or derivative interface), and stores it in a map[string]string suitable for updating an agent.Config's key/value map.

Types

type LocalStorageConfig

type LocalStorageConfig interface {
	StorageDir() string
	StorageAddr() string
}

LocalStorageConfig is an interface that, if implemented, may be used to configure a machine agent for use with the localstorage worker in this package.

type LocalTLSStorageConfig

type LocalTLSStorageConfig interface {
	LocalStorageConfig

	// StorageCACert is the CA certificate in PEM format.
	StorageCACert() string

	// StorageCAKey is the CA private key in PEM format.
	StorageCAKey() string

	// StorageHostnames is the set of hostnames that will
	// be assigned to the storage server's certificate.
	StorageHostnames() []string

	// StorageAuthKey is the key that clients must present
	// to perform modifying operations.
	StorageAuthKey() string
}

LocalTLSStorageConfig is an interface that extends LocalStorageConfig to support serving storage over TLS.

Jump to

Keyboard shortcuts

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