config

package
v0.0.0-...-43dea2a Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheConfig

type CacheConfig struct {
	ShardCount int `toml:"shards"`
	Size       int
	Lambda     float64
}

type Config

type Config struct {
	Title  string
	Cache  CacheConfig  `toml:"cache"`
	Filter FilterConfig `toml:"filter"`
	Http   HermesHTTP   `toml:"http"`
	Peers  PeerConfig   `toml:"peers"`
}

This is the base Config type for hermes. Extend as needed.

func LoadConfig

func LoadConfig(filename string) (*Config, error)

type FilterConfig

type FilterConfig struct {
	FilterItemCount uint `toml:"default_filter_count"`
	Enabled         bool
}

type HermesHTTP

type HermesHTTP struct {
	Host      int
	AccessLog string `toml:"access_log_location"`
}

type PeerConfig

type PeerConfig struct {
	Listen                    int
	PeerListenPort            int `toml:"peer_listen_port"`
	Heartbeat                 int
	MulticastEnabled          bool   `toml:"multicast_enabled"`
	MulticastClusterName      string `toml:"multicast_cluster_name"`
	MulticastAddress          string `toml:"multicast_address"`
	MulticastPort             int    `toml:"multicast_port"`
	MulticastAnnounceInterval int    `toml:"multicast_announce_interval"`
	Nodes                     []string
}

Jump to

Keyboard shortcuts

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