config

package
v0.0.0-...-7cb0e1f Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_CONFIG = `{"HeartbeatInterval":"3s","HeartbeatTimeout":"6s","StateDumpInterval":"10s"}`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MemberID      string
	ListenAddress string
	EtcdPrefix    string
	EtcdMembers   []string
	EtcdUserPass  string
	Tags          []string
	DalClient     dal.IDal
	EQClient      event.IClient
	Health        *Health

	Version string
	SemVer  string
	// contains filtered or unexported fields
}

func New

func New(memberID, listenAddress, etcdPrefix, etcdUserPass string, etcdMembers, tags []string,
	dalClient dal.IDal, eqClient *event.Client, version, semver string) *Config

Pass in the dal client in order to facilitate better/easier testing story

func (*Config) Load

func (c *Config) Load() error

func (*Config) ValidateDirs

func (c *Config) ValidateDirs() []string

type Health

type Health struct {
	Ok      bool
	Message string
	Lock    *sync.Mutex
}

func (*Health) Read

func (h *Health) Read() (bool, string)

func (*Health) Write

func (h *Health) Write(ok bool, message string)

Jump to

Keyboard shortcuts

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