app

package
v0.0.0-...-f6ecaf9 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP_LEVEL_SYSTEM        = "system"
	APP_LEVEL_COMMUNICATION = "communication"
	APP_LEVEL_APPLICATION   = "application"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NodeName    string
	ServiceName string
	GroupName   string
	// contains filtered or unexported fields
}

func NewConsulConfig

func NewConsulConfig() *Config

func (*Config) FullName

func (c *Config) FullName() (fullName string)

type DistributedLock

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

func NewDistributedLock

func NewDistributedLock(name string, config *Config, stopLock chan struct{}) *DistributedLock

func (*DistributedLock) GetLock

func (dl *DistributedLock) GetLock(name string) (*api.Lock, error)

func (*DistributedLock) Lock

func (dl *DistributedLock) Lock() (leaderCh <-chan struct{}, err error)

type Signal

type Signal struct {
	Signal chan string
	// contains filtered or unexported fields
}

func NewSignal

func NewSignal(config *Config) *Signal

func (*Signal) Start

func (s *Signal) Start()

func (*Signal) Stop

func (s *Signal) Stop()

Jump to

Keyboard shortcuts

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