consul

package
v0.0.0-...-d69b078 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfStore

func NewConfStore() engine.ConfStore

NewConfStore returns a new consul ConfStore object

func NewReaction

func NewReaction() engine.Reaction

NewReaction returns a new consul Reaction object

func RegisterConfStore

func RegisterConfStore()

RegisterConfStore returns the module name

func RegisterConfigDecoder

func RegisterConfigDecoder()

RegisterConfigDecoder with the engine.

func RegisterReaction

func RegisterReaction()

RegisterReaction returns the module name

Types

type ConfStore

type ConfStore struct {
	Config *Config
}

ConfStore object

func (*ConfStore) Setup

func (cs *ConfStore) Setup(eng *engine.Engine, cfg engine.Config) error

Setup ...

func (*ConfStore) Start

func (cs *ConfStore) Start() error

Start the ConfStore

func (*ConfStore) Stop

func (cs *ConfStore) Stop() error

Stop the ConfStore

type Config

type Config struct {
	Address    string `mapstructure:"address" version:"1"`
	Datacenter string `mapstructure:"datacenter" version:"1"`
	WaitTime   string `mapstructure:"wait_time" version:"1"`
	Token      string `mapstructure:"token" version:"1"`

	Discovery bool `mapstructure:"discovery" version:"1"`
	Exposed   bool `mapstructure:"exposed" version:"1"`
	Published bool `mapstructure:"published" version:"1"`

	Confstore bool `mapstructure:"confstore" version:"1"`
}

Config object for consul

func NewConfig

func NewConfig() *Config

NewConfig returns a Consul config with defaults

func (*Config) Hash

func (c *Config) Hash() string

Hash returns the unique hash for this config object

func (*Config) Target

func (c *Config) Target() *engine.NameSpace

Target returns the namespace of the target of this config

func (*Config) ValidateConfig

func (c *Config) ValidateConfig(cf *Config) (*Config, error)

ValidateConfig returns a validated object TODO: remove

func (*Config) Version

func (c *Config) Version() int

Version ...

type ConfigDecoder

type ConfigDecoder struct{}

ConfigDecoder ...

func (*ConfigDecoder) DecodeConfig

func (cd *ConfigDecoder) DecodeConfig(data interface{}) (engine.Config, error)

DecodeConfig returns a parsed config object

type Services

type Services struct {
	Config *Config
}

Services object

func (*Services) Command

func (s *Services) Command(cmd *engine.Command) error

Command takes a Command object, and executes actions

func (*Services) Setup

func (s *Services) Setup(eng *engine.Engine, cfg engine.Config) error

Setup ...

func (*Services) Start

func (s *Services) Start() error

Start the consul service advertiser

func (*Services) Stop

func (s *Services) Stop() error

Stop the consul service advertiser

Jump to

Keyboard shortcuts

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