consul

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StartCommand             = CommandName("start")
	StopConsulCommand        = CommandName("stop")
	RegisterServiceCommand   = CommandName("register_service")
	DeregisterServiceCommand = CommandName("deregister_service")
	UpdateServiceCommand     = CommandName("update_service")
	ReleaseLockCommand       = CommandName("release_lock")
)

list of commands the Consul connection can handle

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command is the payload sent to the Consul connection it consist of the commad name and the redis state

func NewCommand

func NewCommand(cmd CommandName, redisState state.Redis) Command

NewCommand will create a Command object

func (*Command) Name

func (c *Command) Name() CommandName

Name will return the Command name

func (*Command) String

func (c *Command) String() string

String will return the Command name as a string

type CommandName

type CommandName string

CommandName is a special string type

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(c *cli.Context, redisConfig redis.Config) (*Manager, error)

func (*Manager) CommandRunner

func (m *Manager) CommandRunner()

func (*Manager) GetCommandWriter

func (m *Manager) GetCommandWriter() chan<- Command

func (*Manager) GetStateReader

func (m *Manager) GetStateReader() <-chan state.Consul

Jump to

Keyboard shortcuts

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