config

package
v2.0.437+incompatible Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChannelSeparator = '/'   // The separator character.
	MaxMessageSize   = 65536 // Maximum message size allowed from/to the peer.
)

Constants used throughout the service.

Variables

View Source
var LoadProvider = cfg.LoadProvider

LoadProvider loads a provider from the configuration or panics if the configuration is specified, but the provider was not found or not able to configure. This uses the first provider as a default value.

View Source
var VaultUser = toUsername(address.External())

VaultUser is the vault user to use for authentication

Functions

func NewDefault

func NewDefault() cfg.Config

NewDefault creates a default configuration.

Types

type ClusterConfig

type ClusterConfig struct {

	// The name of this node. This must be unique in the cluster. If this is not set, Emitter
	// will set it to the external IP address of the running machine.
	NodeName string `json:"name,omitempty"`

	// The IP address and port that is used to bind the inter-node communication network. This
	// is used for the actual binding of the port.
	ListenAddr string `json:"listen"`

	// The address and port to advertise inter-node communication network. This is used for nat
	// traversal.
	AdvertiseAddr string `json:"advertise"`

	// The seed address (or a domain name) for cluster join.
	Seed string `json:"seed,omitempty"`

	// Passphrase is used to initialize the primary encryption key in a keyring. This key
	// is used for encrypting all the gossip messages (message-level encryption).
	Passphrase string `json:"passphrase,omitempty"`
}

ClusterConfig represents the configuration for the cluster.

type Config

type Config struct {
	ListenAddr string              `json:"listen"`             // The API port used for TCP & Websocket communication.
	License    string              `json:"license"`            // The license file to use for the broker.
	TLS        *cfg.TLSConfig      `json:"tls,omitempty"`      // The API port used for Secure TCP & Websocket communication.
	Secrets    *cfg.VaultConfig    `json:"vault,omitempty"`    // The configuration for the Hashicorp Vault.
	Cluster    *ClusterConfig      `json:"cluster,omitempty"`  // The configuration for the clustering.
	Storage    *cfg.ProviderConfig `json:"storage,omitempty"`  // The configuration for the storage provider.
	Contract   *cfg.ProviderConfig `json:"contract,omitempty"` // The configuration for the contract provider.
	Metering   *cfg.ProviderConfig `json:"metering,omitempty"` // The configuration for the usage storage for metering.
	Logging    *cfg.ProviderConfig `json:"logging,omitempty"`  // The configuration for the logger.
}

Config represents main configuration.

func (*Config) Certificate

func (c *Config) Certificate() (tls *tls.Config, tlsValidator http.Handler, ok bool)

Certificate returns TLS configuration.

func (*Config) Vault

func (c *Config) Vault() *cfg.VaultConfig

Vault returns a vault configuration.

Jump to

Keyboard shortcuts

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