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 ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶
type ClusterConfig struct { NodeName string `json:"node,omitempty"` // The name of the node to use. Broadcast string `json:"broadcast"` // The address to broadcast. Port int `json:"port"` // The port used for gossip.' Seed string `json:"seed"` // The seed address (or a domain name) for cluster join. ClusterKey string `json:"key"` // The cluster passphrase for the handshake. }
ClusterConfig represents the configuration for the cluster.
func (*ClusterConfig) Key ¶
func (c *ClusterConfig) Key() []byte
Key returns the key based on the passphrase
type Config ¶
type Config struct { TCPPort string `json:"tcp"` // The API port used for TCP & Websocket communication.' TLSPort string `json:"tls"` // The API port used for Secure TCP & Websocket communication.' License string `json:"license"` // The port used for gossip.' Vault *VaultConfig `json:"vault,omitempty"` // The configuration for the Hashicorp Vault. Cluster *ClusterConfig `json:"cluster,omitempty"` // The configuration for the clustering. }
Config represents main configuration.
func ReadOrCreate ¶
func ReadOrCreate(path string, stores ...SecretStore) (cfg *Config, err error)
ReadOrCreate reads or creates the configuration object.
type SecretStore ¶
type SecretStore interface { Configure(c *Config) error GetSecret(secretName string) (string, bool) }
SecretStore represents a contract for a store capable of resolving secrets.
type VaultConfig ¶
type VaultConfig struct { Address string `json:"address"` // The vault address to use. Application string `json:"app"` // The vault application ID to use. }
VaultConfig represents Vault configuration.
Click to show internal directories.
Click to hide internal directories.